FFmpeg

From ArchWiki

Revision as of 16:17, 27 November 2013 by F-putter(talk | contribs)(→‎VOB to any container: simplify concatenation command; correct streaming command and integrate w/previous; use mpeg-2 as example container)

Single-pass MPEG-2 (near lossless)

Allow FFmpeg to automatically set DVD standardized parameters. Encode to DVD MPEG-2 at a frame rate of 30 frames/second:

$ ffmpeg -i video.VOB -target ntsc-dvd -q:a 0 -q:v 0 output.mpg

Encode to DVD MPEG-2 at a frame rate of 24 frames/second:

$ ffmpeg -i video.VOB -target film-dvd -q:a 0 -q:v 0 output.mpg

x264: constant rate factor

Used when you want a specific quality output. General usage is to use the highest -crf value that still provides an acceptable quality. Lower values are higher quality; 0 is lossless, 18 is visually lossless, and 23 is the default value. A sane range is between 18 and 28. Use the slowest -preset you have patience for. See the x264 Encoding Guide for more information.

For more information see the forums. You can also create a custom alias ytconvert which takes the name of the input file as first argument and the name of the .mkv container as second argument. To do so add the following to your ~/.bashrc:

Tip: If you receive Unknown encoder 'libvo-aacenc' error (given the fact that your ffmpeg is compiled with libvo-aacenc enabled), you may want to try -acodec libvo_aacenc, an underscore instead of hyphen.

Two-pass MPEG-4 (very high-quality)

Audio deactivated as only video statistics are logged during the first of multiple pass runs: