Linux Command Line - PdfTK and FFmpeg

Linux Command Line - PdfTK and FFmpeg


Part 5 of a Free Technology Workshop on Linux Command Line. PDF manipulation with PdfTk, and video and audio file processing using FFmpeg. Given by Steven Gordon at Sirindhorn International Institute of Technology, Thammasat University. Course material via: http://sandilands.info/sgordon/teaching
Closed Caption:

okay first thing
on the command line this download
I A file W get is a program to get
a web page when i'd get and we passed as
a parameter
URL you need to know the URL
I'll I know some and
well do I maybe I'll just copy and paste
from the web
browser I don't make a mistake
W get some URL a HTML file these guys a
PDF file
all it will do is download that file
inside I'm a hot tits
I hope
yep
thank some time to get started print
print some status information
and says I i 100 percent complete
I downloaded the big collection the
slides from
what about earlier workshops and if we
do any less
we should see big kind of media so very
simple download a particular file from a
website with W get
useful if you want to include inside
scripts
maybe your script relies on some web
page or some some program
on a web server you can download
automatically in a script useful for
other things to automatically
downloading many webpages
you
I would not do I don't have the exact
same text but there are many options for
W get
which will allow it to download a hasty
know if I'll
automatically look for all the links
inside that file and download those
links
and then download those links and so on
so it can act like a spy to and download
many web pages automatically
we may see an example toward the end as
download another one what we hear
which one a internet privacy
so we have to two pts
I've got two pts let's do something with
those pts
let's combine them PDF TK is a program
that does
I'll I say basic manipulation of PDF
files
combining splitting a few other
operations
PDF TK the two files
gonna wrap around and then take those
two thousand can cash tonight them
so the operator is Kat an output
a new file PDF TK
the two files that we want to combine
can cash tonight and then we tell
PDF TK to cat cat issue of work at night
kick at night the two files and output
to some new file
YouTube video should just
return to the prom output if they're not
areas
now open a new file I would not do it
here but
you can do it from your test all order
to stop the PDF viewer evi- dence
the Vince new doc pdf
even sees the lyrics
so that the PDF you on our operating
system instead of Acrobat Reader we have
evens
press Enter
are not present occurs on log into
another computer
it won't work but you can't the Vince
new doc pdf it should open up your PDF
reader and should contain
the lecture slides for both of those
topics
one pink at night it out the other
evens
even sees a PDF reader so you may have
Acrobat Reader you have
1l Foxit Reader even says another one
thing
I'll let you look at this ATF are 10
just a couple of other examples with PDF
TK before we move
away from that I the man paid for PDF
TK's quite short but
that very good it let's give a couple I
A
who's we can use some labels for files
I A is out internet privacy options PDF
be is a big point PDF
so we don't have to you refer to their
full names I can refer to I am be
think at night the two tight
the first pager file I A i won
the first to the second page %uh
a file a a 122
rotate them which direction
West day ninety degrees to the west
that's what W me rotate 90 degrees to
the west
and take this is just an example it's
not very useful
the first two pages a file be right type
them to the east
and output the
some other media so here
just illustrating that weekend select
the individual pages from those input
PDS
we can use shortcuts it's a
I A eight with this import PDF be
it was be calling doc pdf cat means
combine the two
but I combine all of them for file
I 88 pages 122 W mains road tight
rotate those pages ninety degrees to the
Wes
to the west that way at counterclockwise
and for
file be take the first two pages and
rotate them
ninety degrees to the east and then
output a new file
and then you look in the new farm just
check if it their work
I wanna open a you need us
face
PDF TK stop all
sorry let let me show the command at the
top so to be clear
the PDF talk it combines and selects
pages from that
those two in book PBS
open it up just checked press Enter
present
are you on someone else's spring
okay your you're right I'm confused why
would you want to manipulate PDF files
on the command line
again if you want to automate thinks one
example I've used it for a size Kaname
everyone's exam are thousands of pages
just dance
and then use PDF TK to separate them out
persecuted because every student exam is
the same number fighters
rotate the page is a few or if he
scanned the front pages first and then
scanned the back pages
second then PDF TK can combine them
shuffle them
incorrectly act and do other things
that a useful if you have scans or a few
Needham automatically processed
different PDF files
I would all go through any more examples
there's a few more on the website
it can do things like if you look at the
man page to PDF TK
the man pages bike would merge PDF
documents
sleep then rotate d crypt if there's a
password in some cases not all cases
encrypt feeling PDF forms
again in some cases some PDF files
actually forms we can talk stop into the
apply what a mock
a background watermark over the top %uh
PDF
and a few other things extract some data
from those PDF files
that's moved beyond PDF and let's go to
video I know you've all been waiting to
watch the video on your desktop
I'm gonna delete my PDF files I don't
need them RM
for the late or remove be careful when
you delete things
that is a game is no trash or recycle
bin its goal
I should tell you this but rm has a
recursive option
R A minus appliques I maynes donate
this and the subdirectories so I R M
minus up a guys ass ta means delete
everything in this directory
and all its subdirectories and all its
subdirectories
and so on don't do that
especially stop from the top directory
the route and delete all its
subdirectories
that it's too late the entire filesystem
don't do that
videos
I've downloaded and I think you'll have
on your computer
a movie tears of steel let's do some
processing on this movie and we're going
to use of a cold
at and kemp et FF IM pei
a is is a stand-alone program for
processing video
and also isn't provide libraries which
many other programs use
so many web sites if they have some
video processing my used the F have an
impact library
and many I other programs that display
video may use the epidemic libraries
to get the things that we want it now
damn I had to install
FFM pay and compile it from the source
code as I had to set up
to do the things that we won't so that's
a bit of
time-consuming task is not too hot
that's why you see these
FF Ampeg build directory a it contains
the card after the compilation
and the bin directory contains actually
execute oppose
FMP let's use it to
first look at the the well
why don't you liar you can use FF IM pei
to play video calls but normally we use
it to process the there many media
players
one that you have on your computer is
VLC correct VLC
trial PLC system
as a media player which also uses the
FAA Ampeg live race
see if the video lights on your computer
you probably don't have audio and those
speakers to do if you bring headphones
you can listen as well
we were not what little
let me just set up for you watching
I casey you can watch the video it's a
full movie that
what this fall short movie but let's do
some processing on a
and in fact a process videos you need to
know a little bit about what is a video
that makes things a little bit more
confusing let's have a look
first thing we do is look at some
information about that file
its use FF pro which is a hot a.m. pay
but just gives us the info about the
file
and then the file name is a steal FF pro
presenter and you'll see all a lot about
poor a
mine scrolled through a game
FF pro followed by the phone I'm
at the top you cannot say I'm I screamed
at the top it shows some information
about the
this version of FFM pay also useful for
us
then it shows I think from here onwards
input
it shows something about the file and
the things that we're going to focus on
is if you go to the bottom we have two
streams
member video or movie is not just video
its
video plus audio a and I separate
streams
so it says there are two streams inside
this file
one is a video stream stream 00 is a
video stream
and it uses a codec which converts the
video information into binary code h264
and some other color information and the
resolution
a video 1280 by 534
24 frames per second and some other
information
the second stream is audio
so the soundtrack using the codec
I A C to convert the the sound
into binary as some sampling frequency a
44,000
hurts using stereo audio so two channels
so tells us something about the the
streams inside this file
what the format love this file
again
what is the format of this file MKV
so the format was sometimes called a
container that's the structure in which
we include the streams
so this is MKV OGM across guys the night
so the extension MKV that's the format
of the file
but inside this file there in fact two
streams
and audio and video stream and I use
different codecs
that is the video codec is page 264 the
audio codec I A C
is confusing sometimes a you we often
need to distinguish between that
the format usually from the file
extension
but not always but the format and the
codex used for the streams inside
that far will come up as
as we go right so we know the
information about the file its
do something with it how long is the
movie
to say somewhere duration:
it's a short movie 12 minutes 14 seconds
so we know the duration let's let's play
to and just
grab maybe twenty seconds from that
movie
so use FFM pay
we want to stop
so the movie starts at time 0
we want a cop Potter that movie
let's say stopping at time fifty and I
just did this
yesterday as an example sold repeated s
dash is s Mets go to the top so
if you look on the screen you can
cities SAS is the stop time get it right
0 hours
but I'm wrong 0 hours
0 minutes 50 seconds so stop
50 seconds into the movie the import
file is they'll move the party is a
steal
don't get confused with the other one
which is a stereo
audio-only far and duration that we
wanna take up this file
my honesty is twenty seconds too so we
get a short hot out there movie
that it I wanna grab just from time
fifty seconds to time one minute 10
seconds
of the movie and put it into another far
maybe want to make a clipboard
and we're gonna take the input file
and videos and audio files use a
particular codec to convert that into
binary
and convert the regionally important a
binary the Kodak
this one we saw use h264
we take the import file which uses h264
and the output file that we want to
create we want to use the same coding
we don't want to change it later we will
change
so we're just copy so when we specify
the video card a
we use the same issue input so it's a be
codec copy
an audio coding we will not change your
copy from the input
so these parameters I telling us how to
create the output
and the end the night with the output
file
is a steal whatever you want to call the
bar toos
MKV MK yes
try presenter by car alright
which may take a second also ish
if it if there's an air are a usually
printer color coded message on this
terminal read or something so you don't
see red
you're okay so it
every leaders processes the following
cuts for 20 seconds out of that movie
from 12 minutes ten to twenty seconds
so we now have the other while we can
probe that you 1
FF probe on the
the output file and we see
what the duration is now twenty seconds
same video codec
same audio codec you comply if you like
just to check
we should have just 20 seconds %uh video
I would not fly on my
computer some log into another if you
see
red then isn't it syntax error
I'll show it again the command
so it's clear now is the command I use
dash be codec dash
a codec MK
and Kb not MPK
unable to find so checked the the syntax
exactly
minus be Kotick minus
decoded it's very confusing the syntax
sometimes in some of these options
from why run
just run if it and pick by cell
just if anything
mmm this computer 29 doesn't have this
software doesn't have the latest update
I
try this one this fall I don't know what
happened
maybe I didn't update that on correctly
work
maybe
I
hi
okay will fix it
okay now I think you fixed
ok
have the password
so didn't convert anything it just cop
and its case
is quite fast less than a second to do
that conversion
maybe more time-consuming
is messing with my terminal
its convert
very easy to convert will convert just
the small
20-second clip conversion in some cases
may be very slow
okay you need to decode and encode and
that may be slow especially on these all
computers there
three or four years all we getting new
ones next month okay
so do what you like with them today
we're gonna re
new ones next month let's convert
and we just do on the short 20-second
clip import
mind as I and then
specify the output
but what are we so I want to convert my
MKV encoded well my M Kb
format file which has H 264 video and I
A C
audio I want to convert it into a
different format
well let's try
what another format anyone
MKV mp4
try and pay mp4
so that's it
if this works we'll see take these input
file and produces output file
and in many cases FFM peg will check the
output extension and determined
automatically what
format you want mp4 and what codec to
use
sometimes you must specify the exact
quote it
but im the most common cases it works
automatic should run it may take a few
a while okay
do it only on the Shaw this is on the
22nd clip
done a few seconds
if you do it on the 12-minute clip you
movie you'll be waiting a long time
that's probe that file the output file
just to check
what we got FF pro
out EOS thought mp4
the input the the format now is listed
as all of the NUS
are all related or I think all this time
but it's Mb and pick for
format that
the
the video stream h264 so
I think it's the same
codec there may be some different
parameters but it was reincarnated
and the audio I A C so in fact it's
using the same
audio and video codec but just a
different container
and that's common with videos that is
the video and audio
are encoded the same but the container
file the wonder
combine them together is different and
be four verses MKV
and in fact converting between them is
not too hot in that case
let's convert a couple of others
any other containers always style videos
AVI AVI
I've tried webcam is a web
format ok optimize for some web
streaming web pages
webcam AVI mp4 MKV
a different formats
some will be faster than others some
require a
different algorithms to reading to
encode the video
which are faster than others this one's
doing about 10 frames per second quite
slow
so really if you want to convert videos
you need to know something about
what containers may know what formats
and also the Codex use a video and audio
to choose the right one
have a look at the file size:
compare the file sizes and maybe even
run if a probe on each of those two to
see the different codecs use
so my MKB a nice
option for LS is LS minus hates
heights for human friendly
the size is a human friendly
so normally the size is a given in by if
you include the minus height
option you get a min megabytes gigabytes
kilobytes and sell
gonna be easy to read MKV
6.6 made Mb 43 make abit 1.9
wear them 732 K different codecs
the produce different quality video and
audio
and as a result you get different size
files generally the smaller the size the
lower the quality
but not always some codecs can produce
the same quality with smaller size
naff Ampeg
for supports many different I
formats and codecs
that's compared to MKB original file
used h264 is a video codec
I A C as the audio codec the webcam
contain a or format used vp8
is video involve missus audio so I had
to
re encode the audio and video using
different codecs different albums
if you wanna see the Codex and for my
supported by FF Ampeg
FF Ampeg minus
formats will show you all the containers
like AVI MKV mp4
and all the ones that supports and their
many
a some very alt some hardly ever use but
it supports many different formats
some you recognize
and codecs the way that no audio and
video hookup encoded
and decoded you can see the list of
codecs it supports
including at
mp3 the the ones we saw the
PPI h264 age to 65 and many others
our show at the and have a look
what about that a question questions
you may ask
let's extract the audio from the movie
extract just the audio stream from that
movie remember
there are two streams if we do NFL Pro
Val
original clip the 20-second clip
video stream using Hayes 264
audio stream using AC maybe we just one
audio
for some reason FF Ampeg
import al
.mkv file video
not on now the the shortcut there is
minus the and we don't want the videos
output audio output
copy
okay so we take take the movie is
important two streams video stream
we don't want to copy so minus the end
saying now
for the video stream audio codec copy
from the input that is used the same for
codec for the audio and then you specify
the output file name
maybe Toso audio
DAW don't walk what extension should we
use
mp3dl using mp3 codecs
what was the import quota the audio
codec was a AC
okay mp3's another quote it a AC
a is a different one there many
different audio codecs
it's not mp3 well you don't see it very
often
what about a AC
yep next come on we will so just repeat
that come on it happens quite quick
thank the import file
the minus the end now video no video
i want video audio codec copy
and the Apapa the next thing is okay
what if you do want mp3
thats repeat that come on but also
convert at the same time
so again same input
VN audio codec mp3
and with mp3 you can have different
quality
out we specify quality in mp3
sometimes you may have heard of
different quality mp3 files
what what the major it right say may
have
128 kilometres a second 256
let's do a simple 164 kilobits per
second sorry
minus AB
get on the sideline minus
AB audio bitrate: to be 64k
and now mp3 think so takeout import
video
don't grab the video table movie I'll
call it don't grab the video
no audio codec converted to mp3
and use audio be right 64 kilobits per
second
and done and you can check and see if
that place
see it Matt
the AC input audio to mp3
output quality be right 63.9 kilobits
per second
and of course with different codecs and
different be rights you get different
file sizes and different quality so
quite easy to extract
but we are from a movie and
convert it to a particular format that
you desire
of course we can also convert
I want to wake up
we could take the AC is important and
convert it to
a different format
I don't know
w&i okay so similar way that we can
convert videos we can cover
audio only files take the audio file
import audio far output
and use the FFM pay will determine based
upon the file extension what codec to
use
so here I selected dot WM I the windows
media audio and it runs out
and then
so the the command I use take right a
different way
output in some codecs
you may need to specify options so with
mp3 I specify the audio bitrate:
and the default may have been I think
was 128
but I said a 64 so depending on what you
want as output there are many different
options a.m. paying
provides and that's when it gets complex
this come on is easy
input file Apapa it works good
but if you want to do something a little
bit more peculiar
then you need to maybe learn some the
options which
become more complex and which I don't
know it so
you need to read the man page I
What's Next any questions on video we
going to reply fast
a game the intention is the you
be aware that FFM exists ATF tape TK
exist
W get exists and maybe if you need it
for your task to learn a little bit more
about the menu on time
to use simple in a duffel we cannot
teach you everything
questions
ever
plan to finish at 3 I'll be here but the
maybe we just do one more thing
and then we can do as as you wish
but any any requests for this last one
more thing
any requests what we want to do
regarding to
so we can keep converting audio and
video we can
what we missed scroll down
screen Coss
record audio from microphone a
and we don't have a microphone
I do you don't
is try the last thing as a screencast

Video Length: 40:43
Uploaded By: Steven Gordon
View Count: 2,058

Related Software Products
PDF to Any Command Line
PDF to Any Command Line

Published By:
oakdoc.com

Description:
PDF to Any Converter is an easy-to-use end-user wizard for converting Adobe PDF file(s) to high quality vector formats and raster image formats, such as pcl/pxl, ps/eps, plt, microsoft xps files, bmp, jpeg, tiff, png, gif, pcx and so on. It does not need the third part software support such as Adobe Acrobat, Adobe Reader etc, quickly converting Adobe PDF files. It supports all versions of Adobe PDF in batch mode. PDF to Any Converter supports the fast, affordable way to create ...

pdf text command line
pdf text command line

Published By:
opoosoft.com

Description:
PDF TEXT Converter is a perfect tool for extracting text from PDF to plain text files and convert text document to PDF file. PDF TEXT Converter is the fast, affordable way to convert once time for saving your time! It supports batch converter mode. And it doesn't depend on the Acrobat or Acrobat Reader application. The interface of PDF TEXT Converter has been designed to be user-friendly and can be easily operated by anyone. All a user needs to do is click on the menu and all the options of the ...


Related Videos
Convert image to text using CMD Command Prompt ,Tesseract Optical Character Recoginition(OCR)
Convert image to text using CMD Command Prompt ,Tesseract Optical Character Recoginition(OCR)

Download OCR set up here https://goo.gl/ruojIC Visit https://youtu.be/gZyk2JtCSG0 for OCR web project
Video Length: 10:47
Uploaded By: jinu jawad m
View Count: 45,830

imagemagick pdf2png it is so easy at the command line: convert your.pdf your.png
imagemagick pdf2png it is so easy at the command line: convert your.pdf your.png

Thanks to metalx1000 for pointing out that this command convert this.pdf that.png will take a multi page pdf and generate individual pngs for each pdf page. hr / bClosed Caption:/b greetings Dennis Daniels here couple days ago I posted video on how to export multiple PDF pages to multiple PNG using game reply again well metal X is down again he pointed out and a super simple way of doing when I didbr ...
Video Length: 02:11
Uploaded By: Dennis G Daniels
View Count: 5,882

Converting Word DOC files to PDF's using the Linux command line
Converting Word DOC files to PDF's using the Linux command line

http://www.linuxbyexample.com Showing you how to combine the find command with AbiWord to convert a folder full of Microsoft Word files to PDF files. find *.doc exec abiword --to=PDF -o {}.pdf {} \; hr / bClosed Caption:/b the move in hi this is paul I hope everyone is having a great day this is video number eight and today I'm going to show you how to use I B word from the command line to convert to ...
Video Length: 02:14
Uploaded By: Practical Penguin
View Count: 5,434

Pdfgrep - Search Text Inside PDF Files - Linux CLI
Pdfgrep - Search Text Inside PDF Files - Linux CLI

Package: pdfgrep Description: search in pdf files for strings matching a regular expression Pdfgrep is a tool to search text in PDF files. It works similar to `grep'. Features: * search for regular expressions. * support for some important grep options, including: + filename output. + page number output. + optional case insensitivity. + count occurrences. * and the most important feature: color output! Homepage: ...
Video Length: 03:54
Uploaded By: gotbletu
View Count: 4,065

Adobe Reader *.PDF command line execution exploit
Adobe Reader *.PDF command line execution exploit

I reported this problem to Adobe. If this error will be not corrected to Easter Holidays i will provide exploit on my YT channel. vulnerability found by BTD-C exploit coded by BTD-C Contact: btdc@tormail.org About: http://j.gs/1qOs Verified Thanks to the finder MO 0day for give me idea and inspirations. Greetz for DevilTeam.pl
Video Length: 01:54
Uploaded By: btdc0x000
View Count: 3,769

VeryPDF PDF to HTML Converter Command Line
VeryPDF PDF to HTML Converter Command Line

VeryPDF PDF to HTML Converter Command Line is a powerful tool which can help you convert PDF to HTML by command line, enabling you to publish your PDF online conveniently. Homepage: http://www.verypdf.com/app/pdf-to-htm...
Video Length: 01:28
Uploaded By: Heng XUE
View Count: 1,595

VeryPDF PDFPrint Command Line
VeryPDF PDFPrint Command Line

VeryPDF PDFPrint Command Line is a MS-DOS based tool for printing PDF to printers or virtual printers. Homepage: http://www.verypdf.com/app/pdf-print-cmd/index.html
Video Length: 01:25
Uploaded By: Heng XUE
View Count: 1,121

VeryPDF PDF to Text OCR Converter Command Line
VeryPDF PDF to Text OCR Converter Command Line

VeryPDF PDF to Text OCR Converter Command Line can recognize text from scanned documents with Optical Character Recognition technology. Homepage: http://www.verypdf.com/app/pdf-to-tex...
Video Length: 01:46
Uploaded By: Heng XUE
View Count: 1,003

VeryPDF PDF Stamp Command Line
VeryPDF PDF Stamp Command Line

VeryPDF PDF Stamp Command Line is a professional PDF stamp creator or PDF watermark creator, which can help you stamp PDF with images, text, graphic lines and rectangles. Learn more: http://www.verypdf.com/app/pdf-stamp/...
Video Length: 03:53
Uploaded By: Heng XUE
View Count: 875

VeryPDF Advanced PDF Tools Command Line
VeryPDF Advanced PDF Tools Command Line

VeryPDF Advanced PDF Tools Command Line is developed for editing PDF property contents without opening PDF documents. Learn more: http://www.verypdf.com/app/advanced-pdf-tools/index.html
Video Length: 02:13
Uploaded By: Heng XUE
View Count: 871

Copyright © 2025, Ivertech. All rights reserved.