DivX265

From wiki.selur.net
Jump to navigation Jump to search

DivX265 is the free command line H.265/HEVC encoder from DivX. It is closed source and no longer developed; the last version is 1.5.0.8 from 2015. It has few options and is built around the DivX HEVC device profiles, which limit resolution, frame rate and bit rate. Hybrid drives the command line encoder DivX265.

Base → Video: DivX265, then the DivX265 tab

DivX265 tab in Hybrid
DivX265 tab in Hybrid

What it does

DivX265 encodes to HEVC in the Main or Main 10 profile. There are two rate control modes:

  • average bitrate: one pass towards a bit rate. This is the mode the encoder is made for; its streams stay inside the DivX HEVC profiles.
  • constant quantizer: the same quantizer for the whole video. The encoder itself warns that such streams may not comply with the DivX HEVC profiles.

Apart from that only a speed/quality level, the key frame interval and a few flags can be set. For general HEVC encoding x265 is the better choice; DivX265 is of interest when a stream for a DivX HEVC certified device is wanted.

Requirements

  • The DivX265 binary; the encoder is only offered when Hybrid finds it.
  • Frame rate: 23.976, 24, 25, 29.97, 30, 50, 59.94 or 60 fps. Other rates are refused.
  • Frame size: width and height a multiple of 8, at least 320×240.
  • In average bitrate mode a Resolution Profile has to be selected and the output size has to fall into it: up to 1280×720, above that up to 1920×1080, or above that up to 3840×2160.

Hybrid checks these conditions when a job is created and reports what does not fit.

Settings

Control DivX265 option Range / values Hybrid default Meaning
Encoding mode --bitrate, -qp average bitrate (1-pass), constant quantizer (1-pass) average bitrate (1-pass) Rate control mode, see above. The field next to it changes with the mode.
Bit rate (kBit/s) --bitrate 16 up to the limit of the resolution profile 1500 Target bit rate in kbit/s. The upper limit follows Resolution Profile: 6000 for 1280×720, 12000 for 1920×1080, 40000 for 3840×2160. Locked while the profile is set resolution.
Quantization strength -qp 1 – 51 24 Quantizer of the constant quantizer mode; lower values keep more detail and give bigger files. Only shown in constant quantizer mode.
Resolution Profile – set resolution, <= 1280x720, <= 1920x1080, <= 3840x2160 <= 1280x720 The DivX HEVC profile the stream is meant for. It is not passed to the encoder; Hybrid uses it to limit the bit rate and to check frame size and frame rate before the job starts (720p profile: at most 30 fps). set resolution means no profile is chosen, which is not allowed in average bitrate mode.
Quality/speed level -aqo fastest (1), fast (2), balanced (3), higher quality (4), highest quality (5) balanced The speed/quality level of the encoder: how much effort its algorithms spend. Higher levels compress better and are slower. Used in both encoding modes.
Calculation precision --format 8-bit; with HEVC Profile Main 10 also 10-bit 8-bit Bit depth of the video Hybrid delivers to the encoder. 10 bit needs the Main 10 profile.
Wavefront coding --no-wpp (when off) on/off on Wavefront parallel processing: the rows of a frame are encoded in parallel, which uses more cores at a small cost in compression.
HEVC Profile -10 / --main10 Main, Main 10 Main Profile of the stream. Main is 8 bit; Main 10 allows up to 10 bit and unlocks the 10-bit entry of Calculation precision.
Max GOP (s) --interval 1 – 6 5 Longest distance between key frames in seconds. Shorter intervals make seeking faster and cost bit rate. DivX265's own default is 6.
Fixed GOP size --fixed-gop-length on/off off Switches the scene change detection off, so key frames come exactly at the set interval.
Color space --format i420 i420 Chroma format Hybrid delivers to the encoder. Together with Calculation precision it gives the raw format (yuv420p, yuv420p10le). DivX265 only encodes 4:2:0.

VUI Flags

These flags tell the player how to interpret the colors. They do not convert anything. Each value list is only available while its check box is set.

Control DivX265 option Range / values Hybrid default Meaning
Color primaries --colour-primaries 709, unspec, 470m, 470bg, smpte170m, smpte240m, film, 2020 off, unspec Color primaries of the video (709 for HD, 470bg or smpte170m for SD, 2020 for UHD).
Transfer Characteristics --transfer-characteristics 709, unspec, 470m, 470bg, smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, 1361e, iec61966-2-1, 2020-10b off, unspec Transfer function (gamma) of the video.
Color Matrix --matrix-coefficients GBR, 709, unspec, fcc47, smpte170bg, smpte170m, smpte240m, YCgCo, 2020nc off, unspec Matrix for the YUV ↔ RGB conversion (709 for HD, the 170 entries for SD).

The Configuration row at the bottom saves, loads and deletes named sets of these settings.

Example

Average bitrate with 1500 kbit/s, level balanced, key frames at most every 5 seconds, resolution profile <= 1280x720, on a 10-bit YUV 4:2:0 source (640x352, 25 fps); Hybrid converts the video to 8 bit in the script, because that is what is set:

vspipe "encodingTempSynthSkript.vpy" - --outputindex 0 -c y4m --progress | DivX265 --input - --size 640x352 --format yuv420p --bitrate 1500 -aqo 3 --interval 5 --framerate 25 -o "video.265"

How Hybrid calls it

  • The filter script (Vapoursynth or AviSynth) is piped into DivX265; without a script ffmpeg decodes the source and pipes the video. The encoder reads from standard input (--input -).
  • Frame size, raw format and frame rate are always passed (--size, --format, --framerate). The frame rate is written as one of the rates DivX265 knows, e.g. 24000/1001 for 23.976.
  • --interval is always written; -aqo in both modes; --no-wpp, --fixed-gop-length and --main10 only when set.
  • The VUI options are only written when their check boxes are set.
  • DivX265 writes a raw HEVC stream (.265); Hybrid muxes it into the chosen container (mkv, mp4/mov, m2ts/ts) in a separate job.

Sources

  • The built-in help of DivX265 (DivX265 -h)
  • Wikipedia: DivX
  • Hybrid's tooltips