Log in

View Full Version : Keyint + Min. GOP Size for Blu-ray compliancy


moviefan
27th March 2008, 09:58
Hi, yet another question: Can you tell me what I have to set for --keyint and --min-keyint (Min. GOP SIZE) to create a Blu-ray compliant video stream with x264? If it there are differences, I would especially like to know this for 1080p24 and 1080i30 (29,97fps) video.

Atak_Snajpera
27th March 2008, 10:47
There is no need to change them!

moviefan
27th March 2008, 10:53
So my settings are --keyint 24 --min-keyint 1. That's what is default in the SA-Blu-ray profile in meGUI. I somehow believe to recall that this --keyint 24 has to do with 23,976 fps, but not sure. Also I believe to have read that a higher value can result in better compressibility, that's why I'm asking. Do you know the specs for Blu-ray concerning these both settings?

Atak_Snajpera
27th March 2008, 10:58
--keyint 24 --min-keyint 1 is a myth :) You may use codec's default values (--keyint 250 , --min-keyint 25) . Tested with MANY movies:)

moviefan
27th March 2008, 11:05
Did you test it with Blu-ray movies played on a SA-Blu-ray player or on a PS3 or even only with e.g. PowerDVD? What exactly do these settings do? There must be a reason... Blu-ray specs tell something about "Maximum number of frames displayed in a GOP" and for 23,976 fps it says 24 for level 4.1. And there is something written about conditions for GOP length longer than 1 sec (with respect to the bitrate...). Can you maybe "decrypt" these things for me since I'm not that much experienced with video encoding.

Atak_Snajpera
27th March 2008, 11:12
I use PS3. http://www.digital-digest.com/articles/x264_options_page5.html

moviefan
27th March 2008, 11:23
And what does this mean in the specs:
"Maximum number of frames displayed in a GOP: 24" for 1920x1080p24?

XolocoTuxmaster
27th March 2008, 12:38
Moviefan, I chose --keyint 24 for all framerate/bitrate compatibility (if you didn't know it I created the SA-Blu-ray profile)

"Maximum number of frames displayed in a GOP", means how many frames can be in a Group Of Pictures...this is...the maximum number between I-frames...this is...--keyint value :D so don't know about Atak_Snajpera tests...maybe PS3 ignores this (another bug?XD)...but to complain the Blu-ray standard you must use as maximum:

--keyint 24 for 24p or 24000/1001p
--keyint 50 for 50i
--keyint 60 for 60000/1001i

As you can see, it's 1 sec (or 1.001 sec, for NTSC framerates, which is the actual allowed maximum)

That's normal conditions, but if you limit the bitrate to 15000kbps, you can double that value

About the --min-keyint 1 ...it's a "permission" setting, will allow the encoder to insert I-frames in less than 1 sec (up to 0.04) if it thinks it's needed...giving better quality in scene/angle changes and maybe compression too

Cheers

EDIT: You are opening a lot of threats about Blu-ray encoding...have you already read this????

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

I talk about b-frames (have to update), keyint, min gop...an all needed values for BD compilance..

By the way...it's said in a lot of other threats...If anyone opened a threat every time it has a little question, this forums would have billions and not be useful. So please, next time you want to know something, use search :thanks:

Sagittaire
27th March 2008, 13:15
--keyint 24 --min-keyint 1 is a myth :) You may use codec's default values (--keyint 250 , --min-keyint 25) . Tested with MANY movies:)

Certainely not a myth. MaxGOP for BluRay is 1 sec. There are no minGOP but default value for x264 is 10. Better to set minGOP at 1 for insert Iframe at scene change.

1 sec for GOP is not a really small GOP like 0.606 sec for HDDVD. 0.606 sec have a real impact for quality but 1 sec produce really small impact.

Atak_Snajpera
27th March 2008, 13:16
maybe PS3 ignores this (another bug?XD)
I would call it common sense:)

XolocoTuxmaster
27th March 2008, 13:22
Certainely not a myth. MaxGOP for BluRay is 1 sec. There are no minGOP but default value for x264 is 10. Better to set minGOP at 1 for insert Iframe at scene change.

Didn't I just said that? :D

Except for the minGOP default value stuff...I think you are confused with minQP

Atak_Snajpera
27th March 2008, 13:29
I wonder if somebody could check if my theory works with players other than PS3?

XolocoTuxmaster
27th March 2008, 13:36
Forget that theory, if PS3 really accept non-standard keyint values it's a bug, Sony could solve it in a newer firmware, and in case other players has that bug too, its creators could do the same

Not standard BD authoring are never good ideas...

Atak_Snajpera
27th March 2008, 14:06
Forget that theory, if PS3 really accept non-standard keyint values it's a bug, Sony could solve it in a newer firmware, and in case other players has that bug too, its creators could do the same

Not standard BD authoring are never good ideas...

How do you watch your Blu-Ray movies?

mpucoder
27th March 2008, 18:20
I would not call it a bug. Just as in SD-DVD you can have a GOP longer than spec and I never heard of a player that would not play it. The reason is the decoder chips don't need to enforce specifications. However other features such as fast forward and time seeking can malfunction if the spec is not met.

Atak_Snajpera
27th March 2008, 19:51
I would not call it a bug. Just as in SD-DVD you can have a GOP longer than spec and I never heard of a player that would not play it. The reason is the decoder chips don't need to enforce specifications. However other features such as fast forward and time seeking can malfunction if the spec is not met.

Finally somebody who understand my point of view. Like I said PS3 plays those movies without any problems. Everything is working perfectly. FF and so on. As long as you encode movies with --aud switch seeking is working. Without that magic option seeking is very slow on PS3. However I've noticed that TSMuxer creates necessary index so I will have to check if --aud switch is still required.

Creation of Blu-ray stream info and seek index

bigotti5
27th March 2008, 20:07
Blu ray max GOP length depends on the bitrate.
GOPs up to two seconds are allowed if the max bitrate doesn't exceed 15Mbps. If bitrate is higher you have to keep to 1 second GOPs or less.

XolocoTuxmaster
27th March 2008, 21:12
Finally somebody who understand my point of view.

This is not about points of views: moviefan asked for the needed values for BD COMPLIANCE NOT BD Players compatibility and that's what I told him. This compliance is necessary for example to import to Professional BD authoring tools. How would you feel is moviefan follows your advice, spends a day (even more if he has a slow PC or uses a high quality line) encoding, and when he tries to import his video the program refuses it???

Trahald
27th March 2008, 21:23
I dont think mpucoder was siding with you per se , Atak_Snajpera, but more correcting others who said the fact that PS3 accepts the files represents a bug. as Xoloco said in his last post.. if the question is compliancy then its 1 sec length or if its <= 15Mbps max then its 2 seconds gop length period. anything else is an x-bluray even if it works in many players

Visor
8th June 2009, 17:17
if you didn't know it I created the SA-Blu-ray profile

Hi Xoloco,

I ran my first MeGUI conversion using your profile on the weekend (took a whopping 32 hours to run on my poor Pentium D 3.2 GHz system!) but when I played it back on my Sony BDP-S350, I noticed that the movie had a lot of dropped frames. The original .mkv file does not have this issue. Ive seen this before with other movies I've downloaded, and I've read somewhere that there's supposedly a flag/switch you can add in either x264 or avisynth that disables dropping frames when it thinks scenes are getting too 'busy'. Are you familiar with this? I'd prefer to see slight pixelation while watching a movie rather than seeing something as jarring as dropped frames. ;)

Thanks,
Visor

SquallMX
8th June 2009, 20:50
I wonder if somebody could check if my theory works with players other than PS3?

WinDVD9 decoder will play "--keyint 250" videos, but will not apply deblocking after frame 24 (using 23.976 fps streams), so you need to use "--keyint 24" if you want high quality playback. Then again, WinDVD is a really crappy software.

:helpful:.