Changes between Version 5 and Version 6 of Encode/MPEG-4


Ignore:
Timestamp:
Nov 7, 2014, 1:54:16 AM (2 years ago)
Author:
llogan
Comment:

some insignificant nits

Legend:

Unmodified
Added
Removed
Modified
  • Encode/MPEG-4

    v5 v6  
    11= MPEG-4 Encoding Guide = 
    22 
    3 '''[[wikipedia:MPEG-4 Part 2]]''', aka '''MPEG-4''', '''Xvid''', and '''DivX''', is a video codec that was most widely used before the wide adoption of [[Encode/H.264|H.264]]. FFmpeg has two encoders to output MPEG-4 video. The external libxvid encoding library: 
     3'''[[wikipedia:MPEG-4 Part 2]]''', aka '''MPEG-4''', '''Xvid''', and '''DivX''', is a video codec that was most widely used before the wide adoption of [[H.264]]. FFmpeg has two encoders to output MPEG-4 video. The external encoding library `libxvid`: 
    44{{{ 
    55ffmpeg -i input.avi -c:v libxvid output.avi 
    66}}} 
    77 
    8 ...and the native `mpeg4` encoder: 
     8...and the native encoder `mpeg4`: 
    99{{{ 
    1010ffmpeg -i input.avi -c:v mpeg4 -vtag xvid output.avi 
    1111}}} 
    1212 
    13 The native encoder has the advantage of not requiring an external library. Both encoders should provide a similar output, but for lower bitrates/quality (e.g. 1000 kBit/s for 720p content), xvid will deliver better quality than mpeg4. 
     13The native encoder has the advantage of not requiring an external library. Both encoders should provide a similar output, but for lower bitrates/quality (e.g. 1000 kBit/s for 720p content), `libxvid` will deliver better quality than `mpeg4`. 
    1414 
    1515The default FourCC stored in an MPEG-4-coded file will be `FMP4`. If you want a different FourCC, use the `-vtag` option. E.g., `-vtag xvid` will force the FourCC `xvid` to be stored as the video FourCC rather than the default. 
    1616 
    17 '''Note:''' this guide uses AVI container files for the examples, as the most common usage of Xvid video is currently for older hardware devices that don't support H.264 or the MP4 container. If you are using MPEG4 for some other reason, you should probably use the more modern MP4 or MKV (Matroska) containers. For audio the MP3 codec is used; again, this is because certain old hardware devices support MP3 audio only, and you can consider using another codec like AAC. Also, consider using H.264 video as described in the [[https://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide|x264 Encoding Guide]], as it will give you better quality video for a given file size, and is very well supported in recent hardware and software. 
     17{{{ 
     18#!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;" 
     19'''Note:''' This guide uses AVI container files for the examples as the most common usage of Xvid video is currently for older hardware devices. See the [[H.264]] and [[AAC]] encoding guides if you are using modern devices. 
     20}}} 
    1821 
    1922== Variable Bit Rate with `qscale` == 
     
    2124You can select a video quality level with `-qscale:v n` (or the alias `-q:v n`), where ''n'' is a number from 1-31, with 1 being highest quality/largest filesize and 31 being the lowest quality/smallest filesize. This is a variable bit rate mode, roughly analogous to using `-qp` (constant QP [quantization parameter]) with x264. Most of the time this should be the preferred method. 
    2225 
    23 You can select an audio quality level with `-qscale:a` (or the alias `-q:a`). The value changes depending on the audio encoder. Since this guide uses libmp3lame see the [[Encoding VBR (Variable Bit Rate) mp3 audio|MP3 Encoding Guide]] for examples and more information. 
     26You can select an audio quality level with `-qscale:a` (or the alias `-q:a`). The value changes depending on the audio encoder. Since this guide uses libmp3lame see the [[MP3|MP3 Encoding Guide]] for examples and more information. 
    2427 
    2528Example: