Log in

View Full Version : x264 1 mistake about buffer can kill compliance?


lutinor
3rd May 2011, 22:48
Hi all,

I opened a topic on : http://forum.doom9.org/showthread.php?t=160983

Nonetheless my issue is a x264 encoding question and not an author question. On the pinned blueray recommandation you can read :

vbv-bufsize should never been greater than vbv-maxrate, that is whole point.


Sadly, multiavchd use the following line to make menu : x264 xxxxx
-vbv_maxrate=14000 / vbv_bufsize=14500

Will this totaly screw the compliance or hardware player will live with it ? :confused:

mp3dom
3rd May 2011, 23:06
The only risk is to have buffer underrun, not to break BD compliance at all. You can easily spot a buffer underrun at muxing stage (if the muxer is certified for BD) because the muxing process simply would stop. Considering that you're speaking of menus, even if you have a buffer underrun, you can quickly redo the compression with different settings. Even if bufsize>maxrate, it's not mathematically sure that a buffer underrun will occour. It depends by a lot of factors. More attention should be put on movie encoding because a buffer underrun after a 20+ hrs of encoding time is a mess.

lutinor
4th May 2011, 07:01
The only risk is to have buffer underrun, not to break BD compliance at all. You can easily spot a buffer underrun at muxing stage (if the muxer is certified for BD) because the muxing process simply would stop. Considering that you're speaking of menus, even if you have a buffer underrun, you can quickly redo the compression with different settings. Even if bufsize>maxrate, it's not mathematically sure that a buffer underrun will occour. It depends by a lot of factors. More attention should be put on movie encoding because a buffer underrun after a 20+ hrs of encoding time is a mess.
Ok but in my case, it's the soft himself which make the file. Basically, i receive a file in the m2ts format.

If i demux the menu.m2ts created by Multiavchd with Tsmuxer and remux with something like Scenarist, will it be a good test if i don't get any error ?

You are talking about a re compression but i don't have control on the menu coding in Multiavchd, unless you know how to put custom x264 line in the setting tabs, i try to put standart line but it seems ignored by Multiavchd. The only things which impact the encoding seems the threads parameter :

http://img24.imageshack.us/i/58657496.jpg

kieranrk
4th May 2011, 15:48
Why can't you just encode your menu properly in the first place?

Don't use toys if you need strict compatibility.

lutinor
4th May 2011, 16:30
Why can't you just encode your menu properly in the first place?

Don't use toys if you need strict compatibility.

What do you mean by 'Why can't you just encode your menu properly in the first place?' ?

mp3dom
4th May 2011, 16:38
Encode using x264 CLI, and use Scenarist as authoring application.

lutinor
4th May 2011, 17:31
Encode using x264 CLI, and use Scenarist as authoring application.

Yea, i guess i will do that, for info, i just tested Multiavchd with menu mpg2 output cause i thought it was beter (mpg2 format is 'easy' and not complex as avc).

I demux the menu and tryed to put in scenarist and the result was perfectly clear -> this file is not bd format compatible.

Unless someone can tell me how using setting tab with custom x264cli (it seems possible but i don't know the syntax), i will give up Multiavchd :mad:

LoRd_MuldeR
4th May 2011, 19:56
Unless someone can tell me how using setting tab with custom x264cli (it seems possible but i don't know the syntax), i will give up Multiavchd :mad:

"x264.exe --longhelp" has all the info you need :)

This site also has some useful info for BluRay authoring:
http://sites.google.com/site/x264bluray/

mp3dom
4th May 2011, 20:40
In any case I would use eac3to to demux. I don't know if tsMuxer is reliable on demultiplexing m2ts, it's quite easy to screw something that invalidate the file. eac3to is known to be ok.

lutinor
4th May 2011, 21:57
No wait wait both ^^ I have a decent pratice with x264cli , i'm far away from master level but i can encode my blueray without a prob.

My issue is about Multiavchd : look at my picture plz :

http://img24.imageshack.us/i/58657496.jpg

Have you try custome line ? Cause if you put things like :

x264.exe --code or --code without x264.exe it doesn't work cause menu files are NOT affected. That's why i ask about the syntax IN multiavchd not away from this tool ^^

ps: what is the best demultiplexer so ?

mp3dom
4th May 2011, 22:27
The problem is another: are you searching for a freeware application (multiavchd) that lets you create bluray with menu in easy steps that probably works in the majority of the bd players (25p is not bd standard but a lot of standalone players will play it anyway. Or you can simply use 24p) or are you trying to do a professional bd that can match the standards of pressed commercial discs?
You cannot pretend from multiavchd that the multiplexing engine match the quality of Scenarist multiplexer yet not pretend that the output from multiavchd can be 100% compliant and BD verified. There are 20K$ difference betweens the 2 softwares and one is for consumer/prosumer level, the other for professionals who need to press the discs.

I've not yet identified your purposes. You seems to be quite novice (no offence! I'm NOT a 'master' too) or at the beginning but seems that you can have access to CineVision or Scenarist (which both costs more than 30K$). If you work in an authoring house, you should not have problems creating BD from scratch with professional tools (export graphics with Designer, compile and mux in Scenarist, encode with x264 CLI or CineVision or whatever other BD verified encoder you own). I think this is what kieranrk intend with his previous statement.

As regarding demultiplexer, eac3to is OK as long as your source is in m2ts stream. MKV and MP4 are not good containers. If you demultiplex from MKV or MP4, the resulting AVC file will be not BD compliant.

lutinor
5th May 2011, 10:23
The problem is another: are you searching for a freeware application (multiavchd) that lets you create bluray with menu in easy steps that probably works in the majority of the bd players (25p is not bd standard but a lot of standalone players will play it anyway. Or you can simply use 24p) or are you trying to do a professional bd that can match the standards of pressed commercial discs?
You cannot pretend from multiavchd that the multiplexing engine match the quality of Scenarist multiplexer yet not pretend that the output from multiavchd can be 100% compliant and BD verified. There are 20K$ difference betweens the 2 softwares and one is for consumer/prosumer level, the other for professionals who need to press the discs.

I've not yet identified your purposes. You seems to be quite novice (no offence! I'm NOT a 'master' too) or at the beginning but seems that you can have access to CineVision or Scenarist (which both costs more than 30K$). If you work in an authoring house, you should not have problems creating BD from scratch with professional tools (export graphics with Designer, compile and mux in Scenarist, encode with x264 CLI or CineVision or whatever other BD verified encoder you own). I think this is what kieranrk intend with his previous statement.

As regarding demultiplexer, eac3to is OK as long as your source is in m2ts stream. MKV and MP4 are not good containers. If you demultiplex from MKV or MP4, the resulting AVC file will be not BD compliant.
Ok first of all, thanks you so much for the eac3to information. With this demuxer i was able to make my final test :

- making menu in Multiavchd in h264 format = fail. File are not blueray compliant. If you use it, it's a chance factor about playing it in hardware player.
It was previsible cause the command line use by Multiavchd is a total mess. Unless someone know how to use the setting tab custom command, it's an auto lose
choose to use the defaut option.

- making menu in mpeg2 in Multiavchd is compliant ! Good new. My test was simple, i demuxed the menu cause i wanted video and audio elementary files.
after that i put them in professional tool and they are accepted (video and audio). I make a little test project, remux everything and it's fine and compliant.

Sure, if you want a 'ready to press in factory' disc you will use scenarist or stuff like blueprint but you can now make a home video blueray disc in any
hardware player, which is nice. I work in a compagny which have proffesional tools but authoring is not my job and i can't spend time on learning cause i'm
not sure that my boss will pay me for personnal learning during my work shift lol

Since picture are better than words, here's the one which explain the thing : http://imageshack.us/f/715/rhis.jpg

:thanks:

LoRd_MuldeR
5th May 2011, 10:49
The one and only correct CLI syntax for x264 is "-x" for short options (single character) and "--foo" for long options (more than one character).

Also, in GUI's you usually do NOT need to perpend the name of the executable to "custom" command-line parameters...

lutinor
5th May 2011, 12:09
The one and only correct CLI syntax for x264 is "-x" for short options (single character) and "--foo" for long options (more than one character).

Also, in GUI's you usually do NOT need to perpend the name of the executable to "custom" command-line parameters...
Yes that's what i susposed but it doesn't work. If someone want to make another test it will be cool but from here :

[ --command ]
[ -command ]
[x264 --command ]
[x264.exe --command ]

=

Fail. The menu m2ts created by multiavchd ignore the settings...Sadly Dean focus on multiman ps3 and don't reply anymore about multiavchd...

LoRd_MuldeR
5th May 2011, 18:53
If you enter custom x264 parameters with correct syntax into the designated edit box and "multiavchd" doesn't forward these parameters to x264, only the developer of "multiavchd" can fix the issue. And if that person isn't interested into the project anymore, then this is a lost case. Well, unless the sources of "multiavchd" are public and some other person takes over the project...

lutinor
5th May 2011, 19:38
If you enter custom x264 parameters with correct syntax into the designated edit box and "multiavchd" doesn't forward these parameters to x264, only the developer of "multiavchd" can fix the issue. And if that person isn't interested into the project anymore, then this is a lost case. Well, unless the sources of "multiavchd" are public and some other person takes over the project...

Yea or unless the syntax is strange like :

[custom : --blabla -bla]

It will be strange but who know ? I haven't seen any topic about that and you are right if the dev isn't interested anymore which is the case...It's sad cause it's maybe a 10 minutes patch for him...

Sad but well, we can still use mpeg2 menu which is perfect unless we are talking about how bigger is these files vs an avc menu...

Video Dude
5th May 2011, 21:20
- making menu in Multiavchd in h264 format = fail. File are not blueray compliant. If you use it, it's a chance factor about playing it in hardware player.
It was previsible cause the command line use by Multiavchd is a total mess. Unless someone know how to use the setting tab custom command, it's an auto lose
choose to use the defaut option.


There is another option if you want to use multiAVCHD with x264.

x264 is open source. You can create your own custom build with the compliant command line options hard coded. Have it ignore the options that multiAVCHD pass to it except for input/output, etc.

shon3i
5th May 2011, 21:47
No problem here since default x264 vbv-init is set to 0.9 which give little offset in calculating STD, and will be less than 1 around 0.93, will not break BD compliance

kieranrk
5th May 2011, 22:37
No problem here since default x264 vbv-init is set to 0.9 which give little offset in calculating STD, and will be less than 1 around 0.93, will not break BD compliance

That's not true because that's only the initial VBV state. The VBV state can be used up entirely by x264 later on in the video.

lutinor
5th May 2011, 23:21
There is another option if you want to use multiAVCHD with x264.

x264 is open source. You can create your own custom build with the compliant command line options hard coded. Have it ignore the options that multiAVCHD pass to it except for input/output, etc.

I see your idea and it's great but...how can i do that ? Do you have a tutorial or something ? It's more than i can do alone :(

lutinor
8th May 2011, 11:24
Hey all,

No one here are able to make his own 264 build ? :(

J_Darnley
8th May 2011, 11:29
Of course we can. We can also know how to search.

lutinor
9th May 2011, 07:20
Of course we can. We can also know how to search.

Ok, lets say i want to make a x264.exe which force :

x264 --bitrate 5000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 -o out.264 input.file

How can i do that ? :confused:

RunningSkittle
9th May 2011, 07:35
start here:
http://doom10.org/index.php?topic=26.0

If this is too difficult then just make a batch file that has these parameters :)

lutinor
9th May 2011, 11:00
start here:
http://doom10.org/index.php?topic=26.0

If this is too difficult then just make a batch file that has these parameters :)
Thx for your link i will tryt it.

I have a tool (multiavchd) which 'call' x264.exe , i can't use a file.bat mmmm hey wait a second...Is it possible to fastly make a x264.exe which is in fact a .bat ? :confused:

EDIT: bat -> exe is possible but it's not possible cause it will require how Multiavcd work about menu temp file name (if we want to include in the fake bat...)