xaviour wrote:Isn't there a minimum number of I frames per seconds for H.264 tracks in a bluray?
mike admin wrote:Generally, no
This statement is inconsistent with this
post and the output of the following command:
Code: Select all
mkvinfo -v Videos/The_Phantom_Menace/title01.mkv | grep key | grep "track number 1" > keyframes.txt
The result clearly shows a keyframe at least every second. I attached the result to this post. However, I guess you have analyzed more blurays than I have so you are probably right in the general case.
mike admin wrote:on some files clusters put only on I-frame boundaries will be too large and produced file will have seek issues.
I do not understand this argument. If clusters start with an IDR frame and the position of start of the cluster is stored in the cue table, then to jump to a random frame, the player needs first to look up the clusters in which the frame is located. Then it needs to decode all the frames preceding the desired frame. In 24p with 1 IDR per second, that's up to 23 frames. This takes between 1/3 second (for modern chips decoding at 60 fps) and 1 second. If clusters last for 1/2 second then either the desired frame is in the cluster and after an IDR frame, in which case it can be decoded fast or it is not (no IDR in cluster or IDR follows the desired frame) in which case the frame cannot be decoded.
So I really think that the warning from mkvalidator makes sense. To help with seeking, clusters should start with a keyframe. Having 0.5 sec clusters is not going to fix the seeking latency created by a video encoded with 1 keyframe per second.
mike admin wrote:Can you remux this file with mkvmerge in any way that clusters start only on I-frames with default 0.5sec cues?
Sure. Tried with mkvmerge v5.0.1, mkclean v0.8.6 and ffmpeg 0.7.2-4:0.7.2-1ubuntu1. Only ffmpeg generates clusters starting with video keyframes.
Also all 3 tools generate files that contain errors as far as mkvalidator is concerned.
mike admin wrote:Not for PGS subtitles. PGS subtitles come as pair of frames, first "show subtitles" frame followed by "hide subtitles" frame. The first one is a key frame, the second is not. As far as I know, there is no hard requirement for simple block to be always a key frame. The current logic in mkvalidator (all non-video simple blocks must be keyframes) is apparently wrong.
I do not know the specifics of PGS subtitles. But if the "hide subtitles" frame can be decoded independently of the "show subtitles" frame then it is a keyframe. If the PGS decoder is reset and fed a "hide subtitles", nothing wrong is going to happen. It will just clear its already cleared frame buffer. That would explain mkvalidator policy.
Either way, I just care about MakeMKV and mkvalidator to agree with each other. If mkvalidator is wrong then either I need arguments to report the bug or you can report it yourself.