Bookmark and Share

Convert mp4 to avi

$ ffmpeg -i infile.mp4 outfile.avi

Convert to a specificed bitrate

$ ffmpeg -i input.avi -b 64k output.avi

Convert WAV audio file to MP3 format at a specified audio bitrate

$ ffmpeg -i input.wav -acodec mp3 -ab 128k output.mp3

Convert avi file to specified audio sampling rate (22050 Hz), audio bitrate (32 kbps), and frame size (640x480)

$ ffmpeg -i input.avi -ar 22050 -ab 32 -s 640×480 video.mp4

One can use named frame sizes such as

-s vga

Combine multiple files into one file

$ ffmpeg -safe 0 -f concat -i ./my_file_list.txt -c copy output_file.mp3

my_file_list.txt is

# some comment
file './part_file_1.mp3'
file './part_file_2.mp3'
file './part_file_3.mp3'

Options

See formats and codecs available on your computer

$ ffmpeg -formats

References

External links

blog comments powered by Disqus