RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
Commands
Linux
A-Z
LINUX COMMANDS 13 I TecMint :
Commands for
Video, Audio and
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 1/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
Image Conversion
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
in Linux – Part 2
by Aaron Kili | Published: October 29, 2015 |
Last Updated: October 29, 2015
FFmpeg
Multimedia
Framework
Installation Guide on
Linux – PartPreparation
1 for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 2/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
Useful FFmpeg
Commands
FFmpeg utility supports
almost all major audio
and video formats, if you
want to check the ffmpeg
supported available
formats you can use
./ffmpeg -formats
command to list all
supported formats. If you
are new to this tool, here
are some handy
commands that will give
you a better idea about
the capabilities of this
powerful tool.
+
Get Video Information
Download Chrome at Work 0- Chrome for Enterprise
Enterprise Browser Solution for Your Organization. Deploy Chrome Now!
enterprise.google.com
Note: The 0
-hide_banner option is
used to hide a copyright
notice shown my ffmpeg, 16
such as build options and
library versions. This
option can be used to
suppress printing this
information.
LINUX EBOOKS
YES! SIGN ME UP
After successful
execution of above
command you can verify
that the video turn into
multiple images using
following ls command.
$ ls -l
total 11648
-rw-r--r-- 1 tecmint tecmint 14592 Oct 19 13:19 image100.jpg
-rw-r--r-- 1 tecmint tecmint 14603 Oct 19 13:19 image101.jpg
-rw-r--r-- 1 tecmint tecmint 14584 Oct 19 13:19 image102.jpg
-rw-r--r-- 1 tecmint tecmint 14598 Oct 19 13:19 image103.jpg
-rw-r--r-- 1 tecmint tecmint 14634 Oct 19 13:19 image104.jpg
-rw-r--r-- 1 tecmint tecmint 14693 Oct 19 13:19 image105.jpg
-rw-r--r-- 1 tecmint tecmint 14641 Oct 19 13:19 image106.jpg
-rw-r--r-- 1 tecmint tecmint 14581 Oct 19 13:19 image107.jpg
-rw-r--r-- 1 tecmint tecmint 14508 Oct 19 13:19 image108.jpg
-rw-r--r-- 1 tecmint tecmint 14540 Oct 19 13:19 image109.jpg
-rw-r--r-- 1 tecmint tecmint 12219 Oct 19 13:18 image10.jpg
-rw-r--r-- 1 tecmint tecmint 14469 Oct 19 13:19 image110.jpg
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 5/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
3. Convert
images into a
video
Turn number of images
to a video sequence, use
the following command.
This command will
transform all the images
from the current
directory (named
image1.jpg, image2.jpg,
etc…) to a video le
named
imagestovideo.mpg.
4. Convert a
video into mp3
format Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 6/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
To convert
RedHat an . and
RHCSA v format
RHCE Certi cation Exam Study Ebook ($35) Get This Book
video le to Mp3 format,
run the following
command.
$ ffmpeg -i video.flv -vn -ar 44100 -ac 2 -ab 192 -f mp3 audio.mp3
5. Covert v
video le to mpg
format
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 7/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
To convert
RedHat a . vand
RHCSA video le Certi cation Exam Study Ebook ($35)
RHCE Get This Book
to .mpg, use the
following command.
6. Convert video
into animated gif
To convert a . v video le
to animated,
uncompressed gif le,
use the command below.
7. Convert mpg
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
video le to v
To convert a .mpg le to
. v format, use the
following command.
8. Convert avi
video le to mpeg
To convert a .avi le to
mpeg for dvd players, run
the command below:
target pal-dvd :
Output format
ps 2000000000
maximum size for
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 9/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
theRHCSA
RedHat output and
le, in bits Certi cation Exam Study Ebook ($35)
RHCE Get This Book
(here, 2 Gb).
aspect 16:9 :
Widescreen.
9. Convert a
video to CD or
DVD format
To create a video CD or
DVD, FFmpeg makes it
simple by letting you
specify a target type and
the format options
required automatically.
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
$ ffmpeg -i video1.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 audio3.mp3
Source video :
video.avi
Audio bitrate :
192kb/s
output format : mp3
Generated sound :
audio3.mp3
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
12.
Increase/Reduce
Video Playback
Speed
To increase video play
back speed, run this
command. The -vf option
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 12/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
sets theRHCSA
RedHat video and
ltersRHCE
that Certi cation Exam Study Ebook ($35) Get This Book
helps to adjust the
speed.
13.
Compare/Test
Video and Audio
Quality
To compare
RedHat videos
RHCSA and and
RHCE Certi cation Exam Study Ebook ($35) Get This Book
audios after converting
you can use the
commands below. This
helps you to test videos
and audio quality.
$ ffplay video1.mp4
$ ffplay audio_filename1.mp3
compare
RedHat the qualities
RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
from the sound.
$ ffmpeg -loop 1 -i image.jpg -i Bryan\ Adams\ -\ Heaven.mp3 -c:v libx264 -c:a aac -stri
$ ffmpeg -i video.mp4 -i subtitles.srt -map 0 -map 1 -c copy -c:v libx264 -crf 23 -prese
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 15/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
Summary
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
Reference:
https://ffmpeg.org/
If You Appreciate
What We Do Here
On TecMint, You
Should Consider:
1. Stay Connected to:
Twitter | Facebook |
Google Plus
4. Become
RedHat a Supporter
RHCSA and RHCE Certi- cation Exam Study Ebook ($35) Get This Book
5. Support us by
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
19 29 75
15 APR,
2016
13 RESPONSES
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 18/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
Comments 13
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
Pingbacks 0
Rakesh Kr Satyam
June 21, 2017 at 5:02 pm
Very useful.
Can we change/set codec value of
video le without compressing le.
Reply
Aaron Kili
June 23, 2017 at 10:59 am
@Rakesh
Yes, you can change/set the
codec of a video le without
compressing it. For
instance:
ffmpeg -i input.avi -vcodec
h264 output.avi
Reply
Rakehsh Kr Satyam
June 21, 2017 at 4:59 pm
Very useful.
Reply
Aaron Kili
December 13, 2016 at 1:30
pm
@shams
Make use of -
compression_level
especially for PNG output as
in the example command
above. The compression
Preparation forfrom
values range the LFCE
0-100 (Linux
and Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 19/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
Ravi Saive
March 29, 2016 at 11:32 am
@Adam,
Try the following ffmpeg
command to convert AVI
les to MP4 as shown.
# ffmpeg -i le.avi -vcodec libx264 -vpre lossless_slow -crf 25 -acodec libfaac -threads 0 -t 60 le.mp4
Reply
Aaron Kili K
October 31, 2015 at 1:59 pm
@Dennis Thanks for the info
about FFprobe. It can help
new FFmpeg users to learn
more.
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 22/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
Reply
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
Hangover Man
October 30, 2015 at 1:04 am
There are several errors: 1.
hide_banner is a global option, so it
should go before -i. 3. “-f image2” is
super uous. 4. You really don’t need
any of those other options, and you
should have used -ab 192k, not -ab
192. 6. This example does not make
an animated GIF at all. 8. -ps does
not limit le size; -fs does, but you
shouldn’t use it anyway because it
will just end when it reaches the
speci ed limit. 10. The input already
was MP3, so stream copy would be
better (-c:a copy).
Reply
Aaron Kili K
October 31, 2015 at 2:01 pm
@Hangover Man thanks for
catching the errors, hope
users will identify them and
use the options carefully.
Reply
K Raghunathan
October 29, 2015 at 4:36 pm
Extremely useful. Thanks.
Reply
Comment
Name * Email *
Website
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 23/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
RedHat RHCSA and RHCE Certi cation Exam Study Ebook ($35) Get This Book
Notify me of followup comments
via e-mail. You can also subscribe without
commenting.
Post Comment
QUESTIONS
Suricata 1.4.4 Released – A 4 Best Command-Line
Network Intrusion Email Clients For Linux
Detection, Prevention and 10 Advance VsFTP
Security Monitoring System Interview Questions and 20 Free Open Source
Answers – Part II Softwares I Found in Year
Linfo – Shows Linux Server 2015
Health Status in Real-Time 10 VsFTP (Very Secure File
Transfer Protocol) 10 Top Open Source
Monitorix 3.8.1 Released – Interview Questions and Arti cial Intelligence Tools
A Lightweight System and Answers for Linux
Network Monitoring Tool
for Linux Basic Linux Interview 8 Best Screen Recorders
Questions and Answers – for Desktop Screen
Install Htop 2.0 – Linux Part II Recording in Linux
Process Monitoring for
RHEL, CentOS & Fedora 11 Advance MySQL 14 Outstanding Backup
Database “Interview Utilities for Linux Systems
How to Set Linux Process Questions and Answers”
Priority Using nice and for Linux Users
renice Commands
Preparation for the LFCE (Linux Foundation Certi ed Engineer) Exam
https://www.tecmint.com/ffmpeg-commands-for-video-audio-and-image-conversion-in-linux/ 24/25
9/16/2017 15 Useful 'FFmpeg' Commands for Video, Audio and Image Conversion in Linux - Part 2
Tecmint: Linux Howtos, Tutorials & Guides ©
2017. All Rights Reserved.
This work is licensed under a (cc) BY-NC
The material in this site cannot be republished
either online or o ine, without our permission.