
- #Ffmpeg command line how to
- #Ffmpeg command line install
- #Ffmpeg command line code
- #Ffmpeg command line tv
Converting a video file to VCD is very easy. Video CDs are a quick and cheap way to watch a video from your computer on your TV. If your player is in PAL format, you should use the following instead: ffmpeg -i original_video.avi -target pal-svcd final_video.mpg Compress. In the US, NTSC is the standard: ffmpeg -i original_video.avi -target ntsc-svcd final_video.mpg
#Ffmpeg command line tv
Mpeg-2 is the standard format for SVCD and CVD (which you can burn on CDR media and playback on a TV with a SVCD-CVD compatible DVD player) and DVD.ĭepending of your player format, you have to use a different command. Note the use of -vcodec and -acodec to specify the video and ausio codecs to be used: ffmpeg -i input.ogm -s 720x576 -vcodec mpeg2video -acodec mp3 output.mpg Compress. More unusual formats, as such as Ogg Theora, can also be converted. Note the use of the -s parameter to resize the output file: ffmpeg -i original_video.avi -s 320x240 -vcodec msmpeg4v2 final_video.avi Compress Ogg Theora to mpeg DVD You can compress videos in order to save space on your hard drive.
#Ffmpeg command line how to
If you have a video you’d like to watch on a DVD player, here is how to properly encode it: ffmpeg -i source_video.avi -target pal-dvd -ps 2000000000 -aspect 16:9 final_video.mpeg This can be used as well: ffmpeg -i original_video.avi -target pal-dv final_video.dv Convert. dv: ffmpeg -i original_video.avi -s pal -r pal -aspect 4:3 -ar 48000 -ac 2 final_video.dv ffmpeg -i original_video.avi -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv final_video.flv Convert. flv, while specifying various parameters as such as the display size. flv is a very popular format for web videos. This command convert videos to a specified file format: ffmpeg -i original_video.mpg final_video.avi Convert. mpg: ffmpeg -i original_video.avi final_video.mpg Convert. mpgĬoverting video files from a format to another is extremely simple. ffmpeg -i input_sound.avi -vn -ar 44100 -ac 2 -ab 192k -f mp3 output_sound.mp3 Convert. ffmpeg -i source_video.avi -b 300 -s 320x240 -vcodec xvid -ab 32 -ar 24000 -acodec aac final_video.mp4Įxtract Sound From a Video, And Save It in Mp3 FormatĬreating an audio file from a video is an easy task: ffmpeg -i source_video.avi -vn -ar 44100 -ac 2 -ab 192k -f mp3 sound.mp3įFmpeg isn’t only for videos, there’s a lot you can do with audio files as well. Same goes with Sony PSP: The command line below takes a source video file and creates an output file compatible with Sony PSP. You can easily convert a video for iPhones and older iPods using this command: ffmpeg -i source_video.avi input -acodec aac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X final_video.mp4 Encode a Video Sequence for the iPod/iPhone ss indicates the starting time, and -t indicates the duration. In the example above, we are cutting out a part starting at 00:00:30 into the original file with a 5 seconds length. This can be done super easily: ffmpeg -ss 00:00:30 -i orginalfile.mpg -t 00:00:05 -vcodec copy -acodec copy newfile.mpg The same works with images as well: ffmpeg -i input.jpg -vf scale=320:240 output_320x240.png Extract a Portion of a VideoĪnother very common operation on video files is to extract a specific portion of a given video. Using the -vf scale filter, it is possible to resize videos to a desired size: ffmpeg -i input.avi -vf scale=320:240 output.avi

#Ffmpeg command line install
Please refer to the official documentation if you need any help to install FFmpeg.
#Ffmpeg command line code
The program and its source code can be downloaded here.


