Log in

View Full Version : x264 equivalent settings for DivX HD?


valnar
29th August 2009, 13:42
This news story (http://www.necel.com/news/en/archive/0908/1801.html?src=rss_news) has me interested in making sure my x264 encodes fit the standards that DivX HD uses. I want my MKV files to work, but I don't want to use DivX.

Does anyone know the equivalent x264 (and AAC) command line parameters and container format required to be DivX HD compatible?

Atak_Snajpera
29th August 2009, 13:58
--level 4.0 --aud --nal-hrd --vbv-bufsize 25000 --vbv-maxrate 25000 --filter 0,0 --ref 3 --bframes 3
--b-adapt 1 --direct auto --subme 7 --aq-mode 1 --trellis 1 --partitions all --me umh

This should work for sure. You can change green values without risk.

creamyhorror
29th August 2009, 14:02
I googled and found this:

http://labs.divx.com/files/DivX_Converter7_User_Manual.pdf

The specifications for the various profiles (including DivX Plus HD) are on page 6. DivX Plus HD seems to have max peak and average bitrates of 20Mbps.

There's probably more info on the spec elsewhere in this forum.


edit: Did DivX pay MPEG LA for the right to create and profit from this certification? Or is no license fee required? I was idly thinking that it would be nice if a non-commercial organisation created a specification that allowed for higher compression settings (e.g. more b/ref frames).

Dark Shikari
29th August 2009, 14:57
--level 4.0 --aud --nal-hrd --vbv-bufsize 25000 --vbv-maxrate 25000 --filter 0,0 --ref 3 --bframes 3
--b-adapt 1 --direct auto --subme 7 --aq-mode 1 --trellis 1 --partitions all --me umh

This should work for sure. You can change green values without risk.Use the presets, not arbitrary combinations of analysis settings.

shon3i
29th August 2009, 15:36
According scaned stream tought Elecard Buffer Analyzer --vbv-bufsize is 25000 but --vbv-maxrate 20000 and max of bframes is 3 and max of reframes is 4. Other settings in x264 can only affect on quality.

Required in cmd is

--level 4.0 --aud --nal-hrd --vbv-bufsize 25000 --vbv-maxrate 20000 --ref 3 --bframes 3 Also you can skip b-pyramid in x264 because not good for compatibility.

Dark Shikari
29th August 2009, 15:38
According scaned stream tought Elecard Buffer Analyzer --vbv-bufsize is 25000 but --vbv-maxrate 20000 and max of bframes is 3 and max of reframes is 4. Other settings in x264 can only affect on quality.

Required in cmd is

--level 4.0 --aud --nal-hrd --vbv-bufsize 25000 --vbv-maxrate 20000 --ref 3 --bframes 3

Also you can skip b-pyramid in x264 because not good for compatibility.It's ref 4, not ref 3, iirc.

valnar
29th August 2009, 15:48
Use the presets, not arbitrary combinations of analysis settings.

Presets? I must be behind on my x264 build. Where's the latest info on the presets?

Dark Shikari
29th August 2009, 16:06
Presets? I must be behind on my x264 build. Where's the latest info on the presets?x264 --help

LoRd_MuldeR
29th August 2009, 16:13
Presets? I must be behind on my x264 build. Where's the latest info on the presets?

http://forum.doom9.org/showthread.php?t=148149

:search:

valnar
29th August 2009, 16:39
It doesn't appear there are any presets that are quite right. I haven't been using anything close to that. Although the new defaults are pretty good.

Here is what I've been using for awhile. I just need to tweak a couple things.

--pass 1 --level 4.1 --crf22 --keyint 250 --bframes 3 --mixed-refs --trellis 1 --ref 3 --deblock -1,-1 --subme 9 --direct auto --vbv-bufsize 24000 --vbv-maxrate 25000
--me umh --no-ssim --weightb --b-adapt 2 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --aq-mode 1 --aq-strength 1.0

LoRd_MuldeR
29th August 2009, 16:49
Most of your settings are superfluous, as they simply set the default ;)

This applies to:
--mixed-refs --weightb --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --aq-mode 1 --aq-strength 1.0

The VBV stuff isn't included in any preset, because that's nothing that belongs to presets (that would be for a future "--device" system).
And the "--deblock -1,-1" option is included in "--tune film" already.

valnar
29th August 2009, 17:00
Most of your settings are superfluous, as they simply set the default ;)

This applies to:
--mixed-refs --weightb --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --aq-mode 1 --aq-strength 1.0

The VBV stuff isn't included in any preset, because that's nothing that belongs to presets.
And the "--deblock -1,-1" option is included in "--tune film".

Got it... thanks. I've been using some other gui's for awhile and like to put in everything explicitly so I know what's going on, but it's nice to know the defaults too. I do this not only for PC compatibility but my Sage HD200 extender (hardware device) compatibility. I figure if I need to tweak it a bit further to handle Divx HD standards, then so be it. It looks like only the VBV things need to change slightly.

I'll admit though, I don't know what --nal-hrd and --aud do. Would it hurt to keep it in as a "default" for my case, or does it only apply to certain situations?

I'm going for compatibility first and quality second. Speed is not a concern.

LoRd_MuldeR
29th August 2009, 17:06
I'll admit though, I don't know what --nal-hrd and --aud do. Would it hurt to keep it in as a "default" for my case, or does it only apply to certain situations?

AFAIK they are only needed for BD compatibility. However be aware that x264 cannot create 100% BD compliant streams right now, at least not at Level 4.1.

Also note that the "--nal-hrd" options only exists in builds that include Trahald's HRD patch, not in "vanilla" builds...

Guest
29th August 2009, 17:15
AUDs (--aud) are required by spec in all transport streams.

valnar
29th August 2009, 17:16
AUDs (--aud) are required by spec in all transport streams.

So not MKV?

Guest
29th August 2009, 17:27
An MKV is not a transport stream, so the spec I refer to is not applicable. I'm not aware of any equivalent spec for MKV, and in practice AUDs are not required in MKVs. They may be included, of course, to allow for possible future remuxing to transport.

Firebird
29th August 2009, 17:55
It doesn't appear there are any presets that are quite right. I haven't been using anything close to that. Although the new defaults are pretty good.

Here is what I've been using for awhile. I just need to tweak a couple things.

--pass 1 --level 4.1 --crf22 --keyint 250 --bframes 3 --mixed-refs --trellis 1 --ref 3 --deblock -1,-1 --subme 9 --direct auto --vbv-bufsize 24000 --vbv-maxrate 25000
--me umh --no-ssim --weightb --b-adapt 2 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --aq-mode 1 --aq-strength 1.0

With tune your commandline would be like

--tune film --level 4.1 --crf 22 --subme 9 --me umh --b-adapt 2 --direct auto --psy-rd 1:0 --vbv-bufsize 24000 --vbv-maxrate 25000

SeeMoreDigital
29th August 2009, 18:11
Personally I find this new "DivX Plus HD certification" rather amusing...

Given that MPEG-4 AVC video and AAC audio are now their preferred formats, why bother with the .MKV container, why not use the ISO approved .MP4 container?

And in the past when I suggested DivX support the multi-channel AAC audio format, I was told there was no point because surround sound amplifiers don't have on-board decoders... Which they still don't ;)

Atak_Snajpera
29th August 2009, 18:16
Given that MPEG-4 AVC video and AAC audio are now their preferred formats, why bother with the .MKV container, why not use the ISO approved .MP4 container?

Officially mp4 cannot be larger than 4gb. BTW Preffered does not mean required. I think that ac3 and dts and maybe even flac will be still supported.

valnar
29th August 2009, 18:23
I'm probably not building DivX HD compliant files anyway, because I have no interest in using AAC. My MKV files have AC3 or DTS, but those new-gen BR players will probably handle them fine since they support those formats. If not, transcoding the audio is easy. Re-doing all my video is not.

Ritsuka
29th August 2009, 18:53
Officially mp4 cannot be larger than 4gb. BTW Preffered does not mean required. I think that ac3 and dts and maybe even flac will be still supported.

They can. Even mov could 15 years ago.

Atak_Snajpera
29th August 2009, 19:06
They can. Even mov could 15 years ago.
So explain me why hardware players (PS3 and so on) do not like mp4 larger than 4gb?

kemuri-_9
29th August 2009, 19:25
So explain me why hardware players (PS3 and so on) do not like mp4 larger than 4gb?

probably something like a limitation of the filesystem,
i.e. filesystems that use a uint32_t to denote the size would only allow up to 4GB -1 byte sized file.

LoRd_MuldeR
29th August 2009, 19:34
Or simply a limitation (bug) in their MP4 parser code!

CruNcher
29th August 2009, 19:36
PS3 is going to get EXFAT support that will fix this isn't it ?


"NEC Electronics is a valuable IC partner for DivX as we expand our ecosystem to include the next generation of electronics devices," said Kevin Hell, Chief Executive Officer of DivX, Inc. "Thanks to IC agreements such as this one, we continue to fuel the introduction of DivX Plus HD Certified devices to the market, enabling consumers to watch their favorite DivX HD videos and premium content anytime, anywhere."

Yeah Hells Vision :P, i don't see why Necs Chip shouldn't playback over DivX Plus HD certification in MKV if it's Blu-Ray Certified the DivX Certification makes only sense for their VOD and Hollywood deal and Hells pushing CE Manufactures into this with his "be able to see million of content or not" the other way this time "be able to deliver this content to the user via your device or not" to be part of this what they think will become a massive DivX VOD Hollywood content user base :P

reschip
31st August 2009, 09:59
PS3 is going to get EXFAT support that will fix this isn't it ?


I know it is a little OT, but PS3 is going to get EXFAT? That would be great, but where did you get this information from?

RonaldoSan
1st September 2009, 00:16
Would these settings be 100% compatible with DivX HD?

--profile high --preset veryslow --tune film --bframes 3 --ref 4 --crf 18 --vbv-maxrate 20000 --vbv-bufsize 25000 --level 4.0 --aud

I'm really unsure of what settings to stick by for good compatibility with future devices. 4 reference frames seems to break with lots of devices already.

Atak_Snajpera
1st September 2009, 00:29
--crf 18 will probably give you higher bitrate than 20mbps (1080p)

Dark Shikari
1st September 2009, 00:32
--crf 18 will probably give you higher bitrate than 20mbps (1080p)And? That's what VBV is for.

Atak_Snajpera
1st September 2009, 00:38
nice. I didn't know that crf was adjusted for vbv.

Gokumon
1st September 2009, 14:35
Officially mp4 cannot be larger than 4gb.

Where in the spec does it say that?

microchip8
1st September 2009, 15:18
mp4s can be bigger than 4 gigs if it uses 64bit but I'm not sure if MP4Box supports creating such files (I think mp4creator has a 64bit option)