All frames in VC1 and H264 video streams are key frames
Posted: Fri Apr 29, 2011 2:34 pm
Hi,
I use MakeMKV to rip Blurays, keeping the video, English audio, and English subtitles. Since MakeMKV marks the subtitles as a default track, I remux the MKV it produces with mkvmerge to turn the default flag off. When I play the MKV that mkvmerge spits out in VLC, I get very bad tearing and blockiness when I skip around in the file. The original MKV that MakeMKV produced plays normally when skipping around.
I emailed this information off to the mkvtoolnix author, expecting that it was a bug in mkvmerge. He checked into it and reported back that MakeMKV writes wrong frame type markers, i.e. it marks all frames in VC1 and H264 video streams as key frames, even if they aren't (my experimenting shows that MPEG2 video streams seem to have no such trouble, even after remuxing with mkvmerge).
When mkvmerge is used to remux from another MKV, it relies on the original container to provide the frame types. However, when mkvmerge is used to mux elementary streams, it analyzes the bitstream for frame types and rederives them and timecodes. So, a workaround is to use MKVExtractGUI2 to extract the video elementary stream first, then remux it along with the audio and subtitle tracks from the MKV that MakeMKV made, into a second MKV file. The resulting MKV has no problems.
I did find the following thread on the same subject, but a conclusion was never posted.
http://www.makemkv.com/forum2/viewtopic ... rame#p3192
Is this a MakeMKV bug? If not, why does MakeMKV behave this way?
Thank you.
I use MakeMKV to rip Blurays, keeping the video, English audio, and English subtitles. Since MakeMKV marks the subtitles as a default track, I remux the MKV it produces with mkvmerge to turn the default flag off. When I play the MKV that mkvmerge spits out in VLC, I get very bad tearing and blockiness when I skip around in the file. The original MKV that MakeMKV produced plays normally when skipping around.
I emailed this information off to the mkvtoolnix author, expecting that it was a bug in mkvmerge. He checked into it and reported back that MakeMKV writes wrong frame type markers, i.e. it marks all frames in VC1 and H264 video streams as key frames, even if they aren't (my experimenting shows that MPEG2 video streams seem to have no such trouble, even after remuxing with mkvmerge).
When mkvmerge is used to remux from another MKV, it relies on the original container to provide the frame types. However, when mkvmerge is used to mux elementary streams, it analyzes the bitstream for frame types and rederives them and timecodes. So, a workaround is to use MKVExtractGUI2 to extract the video elementary stream first, then remux it along with the audio and subtitle tracks from the MKV that MakeMKV made, into a second MKV file. The resulting MKV has no problems.
I did find the following thread on the same subject, but a conclusion was never posted.

http://www.makemkv.com/forum2/viewtopic ... rame#p3192
Is this a MakeMKV bug? If not, why does MakeMKV behave this way?
Thank you.