For more information see the [https://bbs.archlinux.org/viewtopic.php?pid=1200667#p1200667 forums]. You can also create a custom alias {{ic|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 {{ic|~/.bashrc}}:

For more information see the [https://bbs.archlinux.org/viewtopic.php?pid=1200667#p1200667 forums]. You can also create a custom alias {{ic|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 {{ic|~/.bashrc}}:

Package installation

Note: The version in the official repositories does not include all codecs due to license constraints. Notably, the Fraunhofer AAC codec and the AAC+ codec are not included. ffmpeg-fullAUR from AUR supplies all codecs.

A drop-in replacement fork called libavAUR is available in AUR. The binary it provides is called avconv instead of ffmpeg.

Encoding examples

Screen cast to .webm

Using x11grab to video grab your display and using ALSA for sound. First we create lossless raw file test.mkv.

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 -sameq output.mpg

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

$ ffmpeg -i video.VOB -target film-dvd -sameq 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. A sane range is 18-28 and 23 is default. 18 is considered to be visually lossless. 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:

Softsubs to hardsubs

If have a softsubbed video (eg. ASS/SSA subs in a mkv container like most anime) you can 'burn' these subs into a new file to be played on a device which does not support subs or is to weak to display complex subs.