H.264 Tools

A few years ago, we launched DivX Plus HD, our video profile based on the H.264 standard. The profile is now supported in DivX Converter and DivX Player, DivX Certified devices, and forms the foundation of our DivX Plus Streaming technology.

The list below includes our early beta tools for video encoding, audio encoding, muxing into MKV, and more.

Create DivX Files

Listed here are the tools you need to create DivX® and DivX Plus™ files. You'll also find loads of information and forums where you can share tips and tricks on getting your files to come out just the way you like.

Welcome and happy encoding!

DivX Plus Converter

Your free download of DivX Plus Software includes DivX Plus Converter, which converts video files to DivX in one easy step, and now supports the new DivX Plus HD profile, which converts your HD video to H.264 (.mkv) with AAC audio.

DivX MKV Mux

The DivXMKVMux is a reference muxer that introduces DivX Plus MKV extensions like World Fonts and Smooth FF/RW.

DivX H.264 Encoder

This multithreaded command-line encoder produces high definition H.264 video bitstreams that are compatible with the DivX Plus HD H.264 video profile.

DivX AAC Encoder

This free command-line application that will encode uncompressed mono, stereo, or 5.1 surround audio compatible with the DivX Plus HD profile.

DivX Codec 6.8 (.divx)

DivX 6.8 introduces custom quantization matrices as an option in the encoder when using either of the HD profiles or unconstrained mode.

Other Tools on DivX Labs

Most of these tools come from collaboration between users of the DivX community, so you may find some new friends here as well.

DivX AAC Encoder (Beta)

DivX Plus adds the capability for high quality surround sound audio to the DivX ecosystem using Advanced Audio Coding (AAC) technology. When combined in an MKV container with H.264 video at up to 1080p, AAC audio completes a truly cinematic viewing experience. To support the creation of AAC tracks for DivX Plus HD content we've created a command line AAC audio encoder. Read on for more information and to access the download!

About the DivX Plus HD AAC Encoder

The DivX Plus HD AAC encoder is a command line application that will encode uncompressed mono, stereo, or 5.1 surround audio compatible with the DivX Plus HD profile. It accepts as input multichannel WAV files or raw PCM streams and supports encoding Low Complexity (LC) streams including High Efficiency v1 (HEv1) and High Efficiency (HEv2) modes. The AAC encoded stream is ADTS-encapsulated and can be easily muxed into an MKV file along with the accompanying video using MKVMerge, which we discussed previously in our H.264 encoding tutorial.

Using the DivX Plus HD AAC Encoder

After installing the encoder you can open a command console using the shortcut created in your Start menu. Type divxaacenc --help to see the list of the available command line arguments. If you aren't very familiar with using the command interpreter a short introduction is included in our H.264 encoding tutorial that will help get you started. You can also find help in the DivX Plus forum (requires sign-in).



(Click to enlarge)

The most basic form of the command line requires only two options, the name of the input and output files specified using -i and -o respectively:

DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac"

  • Input types

    The easiest input format for the encoder is a WAV audio file. This format has near universal support among audio editors for import and export and the file header includes information about the audio sampling rate, number of channels, and bits per sample so that there is no need to manually provide this information. The encoder expects the channels to be interleaved in order of Front Left (FL), Front Right (FR), Front Center (FC), Low Frequency Effects (LFE), Side Left (SR), Side Right (SR). Although internally WAV files are limited to storing only 4GB of data some applications will write larger files and the encoder will attempt to handle these automatically.

    You can also pass a raw PCM audio file to the encoder. The same channel order is expected and in addition you need to provide the correct sample rate, number of channels, and bits per sample because raw PCM files have no header that provides this information. This is done using the -s, -c, and -l arguments respectively. For example, to encode a 5.1 surround track using raw PCM input at 44.1Khz, 24-bit, you would enter:

    DivXAACEnc -i "MyInput.pcm" -o "MyOutput.aac" -s 44100 -c 6 -l 24

    The encoder expects raw PCM data to be in one of the following formats depending on bits per sample:

    Bits per sample PCM format
    8 Unsigned most significant bit first, interleaved by channel
    16 Signed little endian most significant bit first, interleaved by channel
    24 Signed little endian most significant bit first, interleaved by channel

    Warning: Using an incompatible PCM format or entering the wrong format information can result in loud noise in the output file. Minimize your volume when you first try playing a file!

  • Rate control

    The encoder has two rate control options: Constant Bitrate (CBR) and Variable Bitrate (VBR). CBR is the default mode and allows you to specify how many kilobits per second the encoder can spend when encoding. Higher bitrates will lead to better quality but larger files. The rate is passed using the -b argument and valid rates include (in kbps): 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768, 896, 1024. For example to encode an input file at 128kbps:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -b 128

    The maximum data rates depend on the input sample rate, number of channels, and which if any high efficiency mode is enabled (more on that in a moment!).

    Maximum bitrates for LC mode (kbps)

    Sample rate Mono Stereo Surround
    96000 512 1024 n/a
    88200 512 1024 n/a
    64000 384 768 n/a
    48000 256 512 1024
    44100 256 512 1024
    32000 192 384 1024
    24000 128 256 768
    22050 128 256 768
    16000 96 192 512
    12000 64 128 384
    11025 64 128 384
    8000 48 96 256

    Bitrates for HEv1 mode (kbps)

    Sample rate Mono Stereo Surround
    16000 10 - 40 16 - 56 48 - 128
    22050 10 - 48 16 - 64 48 - 160
    24000 10 - 48 16 - 64 48 - 160
    32000 16 - 56 24 - 80 80 - 192
    44100 16 - 64 32 - 96 96 - 256
    48000 16 - 64 32 - 96 96 - 256

    Bitrates for HEv2 mode (kbps)

    Sample rate Stereo
    16000 10 - 40
    22050 10 - 48
    24000 10 - 48
    32000 16 - 56
    44100 16 - 64
    48000 16 - 64

    VBR encoding takes an alternative approach to rate control and instead of specifying a constant bitrate you indicate a target quality. The encoder will spend as many bits as necessary to achieve the target quality and thus this mode is suitable only when you don't need to know in advance the output file size. VBR modes are enabled by passing -v with a value in the range 1-9, higher values giving better quality but larger files. For example:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -v 4

  • High Efficiency Modes

    The encoder includes support for two high-efficiency modes, HEv1 and HEv2. These modes are designed to improve perceptual quality at very low bitrates and are disabled by default so that the encoder provides the best possible quality for typical projects. Enabling either mode limits the sample rates, channel configurations, and range of permitted data rates the encoder will accept. When any high-efficiency mode is enabled only the CBR rate control mode can be used.

    HEv1 mode enables Spectral Band Replication (SBR), where high frequencies are not coded but instead ancillary information is used to aid decoders in later synthesizing similar sounds during playback. At low data rates the synthesized audio does not match the original input but the perceptual quality will be better than if the encoder had attempted to represent all frequencies accurately with too little bandwidth. To enable HEv1 mode use -e 1, for example:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -e 1 -b 64

    HEv2 mode additionally enables Parametric Stereo (PS), where the encoder reduces a stereo input to mono while recording ancillary data that allows a decoder to simulate a stereo environment during playback that approximates the original. This improves perceptual quality at extremely low data rates where encoding a true stereo sound with sufficient quality is not possible given the available bandwidth. To enable HEv2 mode use -e 2, for example:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -e 2 -b 40

    It's important to note that MKVMerge cannot detect whether SBR is present in an AAC audio stream. Therefore, when using either HEv1 or HEv2 always inform MKVMerge that SBR is present using --aac-is-sbr. For example:

    MKVMerge -o "MyFilm.mkv" --default-duration 0:1/24s "MyVideo.264" --aac-is-sbr 0:1 "MyAudio.aac"

    The high-efficiency modes introduce a coding delay, so when they are later decoded audio will begin slightly later than the absolute beginning of the file. The delay times will be:

    Coding delay by mode (milliseconds)

    Sample rate HEv1 HEv2
    48000 22 40
    44100 24 43
    32000 33 60
    24000 44 80
    22050 48 87
    16000 66 120

    This delay is normally corrected for during muxing. For example, when muxing a 22050hz AAC HEv1 stream with MKVMerge you might use:

    MKVMerge -o "MyFilm.mkv" --default-duration 0:1/24s "MyVideo.264" --sync 0:-48 --aac-is-sbr 0:1 "MyAudio.aac"

  • ADTS protection

    The DivX Plus HD AAC encoder can optionally write CRC values to the ADTS container that allow a decoder to detect errors later introduced in the audio bitstream. This feature can be enabled using the -p argument:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -p 1

    The CRC will use approximately 0.1 - 1.5kbps for sample rates in the range 8Khz to 96Khz respectively.

  • Low-pass filter

    The encoder automatically applies a low-pass filter to remove some of the high frequencies from the input signal depending on the encoding bitrate. By reducing the number of bits spent on high frequencies when the bitrate is lowered the overall perceptual quality of the sound is better maintained. The cut-off frequency for the low-pass filter can be manually specified using -f. For example, to cut frequencies above 16Khz:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -f 16000

    The range of frequencies represented in an input file is limited to half the sample rate, therefore if your input file has a sample rate of 48Khz the highest frequencies in the audio are 24Khz, and setting the low-pass filter higher than this will have no effect. The low-pass filter can be disabled using -f 0, but this is only recommended at high bitrates.

 

Audio processing tips

  • Audacity is a handy, free audio-editor that can perform various operations on uncompressed audio files.

  • Sources with one file per channel can be combined into a single WAV file using a tool such as Microsoft's wavavimux utility. This tool will install under \Program Files\Windows Media Components\Tools\WAVAVIMUX by default. To convert 6 individual WAV files into one multi-channel wav you would use:

    wavavimux -o "multichannel.avi" -iwav 6 "FL.wav" "FR.wav" "C.wav" "LFE.wav" "SL.wav" "SR.wav" -mask 63

 

Known issues for DivX Plus HD AAC Encoder Beta 1

The following are known issues in this version:

  • The CBR mode does not pad frames if the input audio complexity does not require using all of the available bitrate.

  • The AAC encoder outputs error messages to stdout rather than stderr.

  • The low-pass filter cut-off frequency does not automatically adjust for sample rates greater than 48Khz. Therefore, when encoding input files with sample rates in the range 64Khz-96Khz set the cut-off frequency manually using the -f argument.

  • The default bitrate for 6-channel input may be too low. Specify a rate using the -b argument.

 

Downloading DivX Plus HD AAC Encoder Beta 1

To download this beta you need to create a free DivX Labs account then join the Project Rémoulade Apps group. Downloads for Project Rémoulade are available at the top of the group homepage for signed-in members.

 

How you can help us

We want to hear your feedback! Please submit your comments and questions to the DivX Plus forum (requires sign-in).

 

If your feedback relates to performance issues or software stability, please consider attaching some of the following to your post:

  • Screenshots from CPU-Z that show your CPU, memory and mainboard configuration.

  • Screenshots of any crash dialogs, including the details view if available.

  • An export from MSInfo32, which you can launch by simply typing MSInfo32 into the Run box on your Start menu, so that we can see information about the operating system, running software and application errors.

DivX AAC Encoder Beta 1

DivX Plus adds the capability for high quality surround sound audio to the DivX ecosystem using Advanced Audio Coding (AAC) technology. When combined in an MKV container with H.264 video at up to 1080p, AAC audio completes a truly cinematic viewing experience. To support the creation of AAC tracks for DivX Plus HD content we've created a command line AAC audio encoder. Read on for more information and to access the download!



About the DivX Plus HD AAC Encoder

The DivX Plus HD AAC encoder is a command line application that will encode uncompressed mono, stereo, or 5.1 surround audio compatible with the DivX Plus HD profile. It accepts as input multichannel WAV files or raw PCM streams and supports encoding Low Complexity (LC) streams including High Efficiency v1 (HEv1) and High Efficiency (HEv2) modes. The AAC encoded stream is ADTS-encapsulated and can be easily muxed into an MKV file along with the accompanying video using MKVMerge, which we discussed previously in our H.264 encoding tutorial.


Using the DivX Plus HD AAC Encoder

After installing the encoder you can open a command console using the shortcut created in your Start menu. Type divxaacenc --help to see the list of the available command line arguments. If you aren't very familiar with using the command interpreter a short introduction is included in our H.264 encoding tutorial that will help get you started. You can also find help in the DivX Plus forum (requires sign-in).



(Click to enlarge)

The most basic form of the command line requires only two options, the name of the input and output files specified using -i and -o respectively:

DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac"

  • Input types

    The easiest input format for the encoder is a WAV audio file. This format has near universal support among audio editors for import and export and the file header includes information about the audio sampling rate, number of channels, and bits per sample so that there is no need to manually provide this information. The encoder expects the channels to be interleaved in order of Front Left (FL), Front Right (FR), Front Center (FC), Low Frequency Effects (LFE), Side Left (SR), Side Right (SR). Although internally WAV files are limited to storing only 4GB of data some applications will write larger files and the encoder will attempt to handle these automatically.

    You can also pass a raw PCM audio file to the encoder. The same channel order is expected and in addition you need to provide the correct sample rate, number of channels, and bits per sample because raw PCM files have no header that provides this information. This is done using the -s, -c, and -l arguments respectively. For example, to encode a 5.1 surround track using raw PCM input at 44.1Khz, 24-bit, you would enter:

    DivXAACEnc -i "MyInput.pcm" -o "MyOutput.aac" -s 44100 -c 6 -l 24

    The encoder expects raw PCM data to be in one of the following formats depending on bits per sample:

    Bits per sample PCM format
    8 Unsigned most significant bit first, interleaved by channel
    16 Signed little endian most significant bit first, interleaved by channel
    24 Signed little endian most significant bit first, interleaved by channel

    Warning: Using an incompatible PCM format or entering the wrong format information can result in loud noise in the output file. Minimize your volume when you first try playing a file!

  • Rate control

    The encoder has two rate control options: Constant Bitrate (CBR) and Variable Bitrate (VBR). CBR is the default mode and allows you to specify how many kilobits per second the encoder can spend when encoding. Higher bitrates will lead to better quality but larger files. The rate is passed using the -b argument and valid rates include (in kbps): 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768, 896, 1024. For example to encode an input file at 128kbps:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -b 128

    The maximum data rates depend on the input sample rate, number of channels, and which if any high efficiency mode is enabled (more on that in a moment!).

    Maximum bitrates for LC mode (kbps)

    Sample rate Mono Stereo Surround
    48000 256 512 1024
    44100 256 512 1024
    32000 192 384 1024
    24000 128 256 768
    22050 128 256 768
    16000 96 192 512
    12000 64 128 384
    11025 64 128 384
    8000 48 96 256

    Bitrates for HEv1 mode (kbps)

    Sample rate Mono Stereo Surround
    16000 10 - 40 16 - 56 48 - 128
    22050 10 - 48 16 - 64 48 - 160
    24000 10 - 48 16 - 64 48 - 160
    32000 16 - 56 24 - 80 80 - 192
    44100 16 - 64 32 - 96 96 - 256
    48000 16 - 64 32 - 96 96 - 256

    Bitrates for HEv2 mode (kbps)

    Sample rate Stereo
    16000 10 - 40
    22050 10 - 48
    24000 10 - 48
    32000 16 - 56
    44100 16 - 64
    48000 16 - 64

    VBR encoding takes an alternative approach to rate control and instead of specifying a constant bitrate you indicate a target quality. The encoder will spend as many bits as necessary to achieve the target quality and thus this mode is suitable only when you don't need to know in advance the output file size. VBR modes are enabled by passing -v with a value in the range 1-9, higher values giving better quality but larger files. For example:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -v 4

  • High Efficiency Modes

    The encoder includes support for two high-efficiency modes, HEv1 and HEv2. These modes are designed to improve perceptual quality at very low bitrates and are disabled by default so that the encoder provides the best possible quality for typical projects. Enabling either mode limits the sample rates, channel configurations, and range of permitted data rates the encoder will accept. When any high-efficiency mode is enabled only the CBR rate control mode can be used.

    HEv1 mode enables Spectral Band Replication (SBR), where high frequencies are not coded but instead ancillary information is used to aid decoders in later synthesizing similar sounds during playback. At low data rates the synthesized audio does not match the original input but the perceptual quality will be better than if the encoder had attempted to represent all frequencies accurately with too little bandwidth. To enable HEv1 mode use -e 1, for example:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -e 1 -b 64

    HEv2 mode additionally enables Parametric Stereo (PS), where the encoder reduces a stereo input to mono while recording ancillary data that allows a decoder to simulate a stereo environment during playback that approximates the original. This improves perceptual quality at extremely low data rates where encoding a true stereo sound with sufficient quality is not possible given the available bandwidth. To enable HEv2 mode use -e 2, for example:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -e 2 -b 40

    It's important to note that MKVMerge cannot detect whether SBR is present in an AAC audio stream. Therefore, when using either HEv1 or HEv2 always inform MKVMerge that SBR is present using --aac-is-sbr. For example:

    MKVMerge -o "MyFilm.mkv" --default-duration 0:1/24s "MyVideo.264" --aac-is-sbr 0:1 "MyAudio.aac"

    The high-efficiency modes introduce a coding delay, so when they are later decoded audio will begin slightly later than the absolute beginning of the file. The delay times will be:

    Coding delay by mode (milliseconds)

    Sample rate HEv1 HEv2
    48000 22 40
    44100 24 43
    32000 33 60
    24000 44 80
    22050 48 87
    16000 66 120

    This delay is normally corrected for during muxing. For example, when muxing a 22050hz AAC HEv1 stream with MKVMerge you might use:

    MKVMerge -o "MyFilm.mkv" --default-duration 0:1/24s "MyVideo.264" --sync 0:-48 --aac-is-sbr 0:1 "MyAudio.aac"

  • ADTS protection

    The DivX Plus HD AAC encoder can optionally write CRC values to the ADTS container that allow a decoder to detect errors later introduced in the audio bitstream. This feature can be enabled using the -p argument:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -p 1

    The CRC will use approximately 0.125 - 0.750kbps for sample rates in the range 8Khz to 48Khz respectively.

  • Low-pass filter

    The encoder automatically applies a low-pass filter to remove some of the high frequencies from the input signal depending on the encoding bitrate. By reducing the number of bits spent on high frequencies when the bitrate is lowered the overall perceptual quality of the sound is better maintained. The cut-off frequency for the low-pass filter can be manually specified using -f. For example, to cut frequencies above 16Khz:

    DivXAACEnc -i "MyInput.wav" -o "MyOutput.aac" -f 16000

    The range of frequencies represented in an input file is limited to half the sample rate, therefore if your input file has a sample rate of 48Khz the highest frequencies in the audio are 24Khz, and setting the low-pass filter higher than this will have no effect. The low-pass filter can be disabled using -f 0, but this is only recommended at high bitrates.

Audio processing tips

  • Audacity is a handy, free audio-editor that can perform various operations on uncompressed audio files.

  • Sources with one file per channel can be combined into a single WAV file using a tool such as Microsoft's wavavimux utility. This tool will install under \Program Files\Windows Media Components\Tools\WAVAVIMUX by default. To convert 6 individual WAV files into one multi-channel wav you would use:

    wavavimux -o "multichannel.avi" -iwav 6 "FL.wav" "FR.wav" "C.wav" "LFE.wav" "SL.wav" "SR.wav" -mask 63

Known issues for DivX Plus HD AAC Encoder Beta 1

The following are known issues in this version:

  • The CBR mode does not pad frames if the input audio complexity does not require using all of the available bitrate.

  • The AAC encoder outputs error messages to stdout rather than stderr.

  • The low-pass filter cut-off frequency does not automatically adjust for sample rates greater than 48Khz.

  • The default bitrate for 6-channel input may be too low. Specify a rate using the -b argument.

Downloading DivX Plus HD AAC Encoder Beta 1

To download this beta you need to create a free DivX Labs account then join the Project Rémoulade Apps group. Downloads for Project Rémoulade are available at the top of the group homepage for signed-in members.


How you can help us

We want to hear your feedback! Please submit your comments and questions to the DivX Plus forum (requires sign-in).


If your feedback relates to performance issues or software stability, please consider attaching some of the following to your post:

  • Screenshots from CPU-Z that show your CPU, memory and mainboard configuration.

  • Screenshots of any crash dialogs, including the details view if available.

  • An export from MSInfo32, which you can launch by simply typing MSInfo32 into the Run box on your Start menu, so that we can see information about the operating system, running software and application errors.

DivX H.264 Encoder (Beta)

The DivX H.264 Encoder is a sample tool for DivX Plus HD video encoding. It creates DivX Plus HD-compliant H.264 bitstreams that can be used in DivX Plus MKV files or as a compatibility reference.

In response to your feedback after our Beta 1 release we've been working on the DivX Plus HD H.264 command line encoder, and in the first of several updates we are introducing several popularly requested features. These include a target quality mode, support for flagging sample aspect ratio, and support for input via stdin. Read on for more information!

What's new in Beta 2

  • Target Quality Mode

    One of the problems faced in video compression is determining at which data rate we need to encode a given piece of content to achieve a particular output quality. Certain sources are likely to require higher bitrates than others, e.g. a fast-action film versus a CGI animation, and experimental encoding can be time consuming, exacerbated by the fact that the rate-control can be misguided with less than 2 passes. A target quality mode can help solve this problem.

    As an alternative to the 1-pass (-br) and n-pass (-br -npass) bitrate-based modes that we described in our last tutorial you can now enable a preliminary implementation of quality-based rate-control whose goal is to provide a consistent perceived output quality across a wide variety of input material without exceeding data rate constraints for playback devices. By using the new -qf <int> argument you can specify a target quality in the range 0-51, with lower numbers implying a higher target quality, e.g.:

    DivX264 -i "Input.avs" -o "Output.264" -qf 18

    This target quality mode is useful when you want to target a certain output quality from a single encoding pass and you are willing to let the encoder determine the necessary data rate instead of targeting a particular output file size. All other variables held constant, higher quality settings (lower -qf <int> values) will produce larger files and you will need to experiment a little to find the setting that best balances your personal preferences. The target quality mode can be leveraged for compression checks by GUI applications and should produce similar quality to a 2-pass encoding at the same effective rate but in much less time.


  • Sample Aspect Ratio

    Sample aspect ratio (also known as "pixel aspect ratio" in the DivX 6 encoder) is a method of informing the renderer that the pixels in each decoded picture buffer actually represent a sample of the original video whose shape was not necessarily square - i.e. that the renderer may need to rescale the decoded picture to be taller or wider before displaying it. The technique allows devices with constrained buffer shapes to handle pictures that are wider or taller than they would otherwise support. Examples include certain HD cameras as well as common formats such as DVD, where SAR is often used in conjunction with letterboxing or pillarboxing to ensure that videos with a variety of frame shape can be stored in high quality in a fixed-shape frame buffer.

    You can now specify the sample aspect ratio (SAR) of the input video using the -sar argument. In its alpha release the encoder always assumed that pixels were square (1:1 SAR) and thus it was necessary to resize certain source material to ensure this was actually true. Because these adjustments are no longer necessary it's possible to achieve better picture resolution and less pre-processing time in the input pipeline. These pictures demonstrate just one common use case for SAR:



    Widescreen picture formatted for PAL 720x576 16:9 DAR DVD, as encoded.
    (Click to enlarge and read more)



    The same picture after the renderer applies 16:11 SAR during playback.
    (Click to enlarge)


    If your input video does not have 1:1 SAR you need to specify the ratio of width to height of each sample that the renderer should display during playback. Note that the display aspect and sample aspect are two related but different properties. Some frequently encountered sample aspects are shown below:

    SD Format SAR
    PAL 4:3 12:11
    PAL 16:9 16:11
    NTSC 4:3 10:11
    NTSC 16:9 40:33

    The DivX Plus HD profile implements stricter rules for interlaced content to ensure robust playback on a wide variety of devices. When encoding interlaced material using the -tff or -bff arguments only the following combinations of resolution and SAR are permitted:
    Interlaced resolution Support SARs
    1920x1080i60 1:1 (16:9 frame)
    1920x1080i50 1:1 (16:9 frame)
    1440x1080i60 1:1 (4:3 frame), 4:3 (16:9 frame)
    1440x1080i50 1:1 (4:3 frame), 4:3 (16:9 frame)
    720x480i60 1:1, 40:33 (16:9 frame), 10:11 (4:3 frame)
    720x576i50 1:1, 16:11 (16:9 frame), 12:11 (4:3 frame)
    704x480i60 1:1, 40:33 (16:9 frame), 10:11 (4:3 frame)
    704x576i50 1:1, 16:11 (16:9 frame), 12:11 (4:3 frame)
    640x480i60 1:1 (4:3 frame)
    480x480i60 1:1, 20:11 (16:9 frame), 15:11 (4:3 frame)
    480x576i50 1:1, 24:11 (16:9 frame), 18:11 (4:3 frame)
    352x480i60 1:1, 80:33 (16:9 frame), 20:11 (4:3 frame)
    352x576i50 1:1, 32:11 (16:9 frame), 24:11 (4:3 frame)


  • Stdin support

    The encoder now accepts raw video input via stdin, which makes it both easier to develop around the encoder and to use a wider variety of tools in the input pipeline for encoding DivX Plus HD content. In our tutorial for the alpha version of the encoder we showed how to use AVISynth to read a source file in an arbitrary format, decode it, and perform some basic manipulations like resizing to a supported resolution and frame rate. These same operations can now be performed using other common video processing toolkits. Let's look at a typical example using FFmpeg.

    FFmpeg's documentation can appear a little daunting at first due to it's extensive functionality, but really it's not much more complex than the command line tools we've already encountered. The command line documentation tells us that the basic syntax looks like this:

    ffmpeg [[infile options][`-i' infile]]... {[outfile options] outfile}...

    We'll use a handful of the available options to input an AVI file, crop and resize it to a supported resolution, and output raw video at a valid frame rate ready to pipe into the DivX Plus HD encoder. Let's assume our input video is 1920x1088 @ 30fps progressive and we want to encode at 720p @ 23.976fps. We can tell FFmpeg to decode our AVI file using -i, crop 8 pixels from the height using -cropbottom, resize to 1280x720 using -s, and convert the frame rate using -r. The first part of the command line might look as follows:

    ffmpeg.exe -i "C:\SomeFolder\MyInput.avi" -cropbottom 8 -s 1280x720 -r 24000/1001

    We also need to use -f and -pix_fmt to tell FFmpeg that we want to output YV12 planar video (the raw format that the DivX Plus HD encoder expects via stdin), and to write those raw frames to stdout, which we will later pipe to the encoder's stdin. To do that we just put a "-" character where we'd normally write the output filename. This makes our complete command-line for FFmpeg look like this:

    ffmpeg.exe -i "C:\SomeFolder\MyInput.avi" -cropbottom 8 -s 1280x720 -r 24000/1001 -f rawvideo -pix_fmt yuv420p -

    Next we ask the DivX Plus HD encoder to read input via the stdin, again using the "-" character where we'd normally write a file name. Because the only data the encoder will see is raw video frames we also have to tell it the resolution and frame rate of the input video on the command line when using the stdin feature. Let's use the new target quality mode (-qf) in conjunction with the stdin feature to create a high quality file in just one pass:

    divx264.exe -i - -y 1280x720 -fps 24000/1001 -qf 18 -o "C:\SomeFolder\MyOutput.264"

    Neither of these commands will work on their own. We must combine them using the pipe character, "|" to pipe FFmpeg's stdout handle to the DivX Plus HD encoder's stdin handle:

    ffmpeg.exe -i "C:\SomeFolder\MyInput.avi" -cropbottom 8 -s 1280x720 -r 24000/1001 -f rawvideo -pix_fmt yuv420p - | divx264.exe -i - -y 1280x720 -fps 24000/1001 -qf 18 -o "C:\SomeFolder\MyOutput.264"

    When we execute this command FFmpeg will decode and transform the input video, and the DivX Plus HD encoder will output an H.264 video stream, all without creating any intermediary files. All that remains is to mux the video stream into an MKV container:

    MKVMerge.exe -o "C:\SomeFolder\MyMKVVideo.mkv" --default-duration 0:1001/24000s "C:\SomeFolder\MyOutput.264"



    Encoding using stdin then creating an MKV file.
    (Click to enlarge)


    Keep in mind that the encoder requires valid input resolution and frame rates as input. We covered these in our last tutorial, but for convenience here's the table once again:

    Rate
    (Numerator)
    Scale
    (Denominator)
    Approximate FPS
    = Rate / Scale
    Max Dimensions Min Dimensions
    60 1 60 1280x720 320x240
    60000 1001 59.940 1280x720 320x240
    50 1 50 1280x720 320x240
    30 1 30 1920x1080 320x240
    30000 1001 29.970 1920x1080 320x240
    25 1 25 1920x1080 320x240
    24 1 24 1920x1080 320x240
    24000 1001 23.976 1920x1080 320x240

    Width and height must each be multiples of 8.
    Width and height are tested independently for minimums and maximums.
    Any alternative rate/scale representations must evaluate to exact equivalents.


  • Input trimming

    A minor new feature is the ability to trim frames from the beginning of the input video using -start. In conjunction with the existing -frames argument it is possible to specify a range of frames to be encoded, which can be useful for conducting short tests as well as removing unwanted sequences from captured material. An example of using both features to encode only frames 1000 through 2999 is as follows:

    divx264.exe -i "MyInput.avs" -o "C:\SomeFolder\MyOutput.264" -qf 18 -start 1000 -frames 2000

    The -start argument currently works only with input from file because seeking is not possible when reading from stdin. When using stdin you should use options in the decoding application in place of -start and -frames, for example FFmpeg's -ss and -t arguments.

  • Ctrl+C, Ctrl+Break supported

    It's now possible to stop the encoder by pressing Ctrl+C or Ctrl+Break while it is running.

 

Known issues for DivX Plus HD H.264 Encoder Beta 2

The following are known issues in this version:

  • The encoder may run slowly with input that is in RGB colorspace. If you are using an AVISynth script for input add ConvertToYV12() to your script to convert video to YV12 colorspace.

  • The encoder doesn't support input from compressed AVI files. Create an AVISynth script using the AVISource filter to process such files.

  • The encoder will only accept 1:1 SAR for 704x576i and 704x480i input.

 

Downloading DivX Plus HD H.264 Encoder Beta 2

To download this beta you need to create a free DivX Labs account then join the Project Rémoulade Apps group. Downloads for Project Rémoulade are available at the top of the group homepage for signed-in members.

 

How you can help us

We want to hear your feedback! Please submit your comments and questions to the DivX Plus forum (requires sign-in).

 

If your feedback relates to performance issues or software stability, please consider attaching some of the following to your post:

  • Screenshots from CPU-Z that show your CPU, memory and mainboard configuration.

  • Screenshots of any crash dialogs, including the details view if available.

  • An export from MSInfo32, which you can launch by simply typing MSInfo32 into the Run box on your Start menu, so that we can see information about the operating system, running software and application errors.

DivX MKV Mux Beta 1

DivX MKV Mux is a sample application designed to allow developers to experiment with DivX Plus .mkv advanced features like Smooth FF/RW and World Fonts. This software is provided as-is and is not intended as a substitute for other .mkv writers.

Download the DivX MKV Mux Beta 1 installation package and check out the documentation.

DivX Plus HD H.264 Encoder (Beta 2)

In response to your feedback after our Beta 1 release we've been working on the DivX Plus HD H.264 command line encoder, and in the first of several updates we are introducing several popularly requested features. These include a target quality mode, support for flagging sample aspect ratio, and support for input via stdin. Read on for more information!

Download the DivXH264Encoder Beta 2 installation package: