Log in

View Full Version : Appending a 16:9 video track to a 4:3 one, MKV "magically" plays fine?


Sakura-chan
10th November 2012, 04:26
Hi

I was doing DVD to MKV muxings today (I like to keep my discs safe) when I got to some extras on a disc. Each one had an opening still screen with text and then interviews begin. Two of those had the text and the interview on separate "titles", so when ripped I had an MKV of a few seconds and the filming on another file.

Stupid I thought, so I went to mkvtoolnix to append the two parts. There I got a warning, the same for the two cases:

Warning: The track number 0 from the file 'H:\6\02.mkv' can probably not be appended correctly to the track number 0 from the file 'H:\6\01.mkv': The codec's private data does not match (lengths: 88 and 252). Please make sure that the resulting file plays correctly the whole time. The author of this program will probably not give support for playback issues with the resulting file.


I checked both and they played fine. But then I noticed that those two were filmed in widescreen (16:9) but the introduction text screen was in fullscreen (4:3). That's why they were separate titles on the original DVD.

As the 2nd part inherits the properties from the 1st when appended, the resulting MKV has the "display aspect ratio" set to 4:3. But when I open it, the player (I'm using PotPlayer) opens in widescreen, shows the 4:3 part properly with black bars to the sides and then the filming starts in 16:9.

Text in 4:3, bars at the sides (it doesn't show well as it's quite dark, but the image is square):

http://sadpanda.us/images/1238788-JGFAW1W.jpg


Filming in 16:9, with the file info still showing 1.5:1/1.33:1 (original AR/display AR):

http://sadpanda.us/images/1238795-QODII7Y.jpg


I'm not complaining of course, the result couldn't be better, just curious. How does all this works? I only see one MPEG2 track. Can a video track have variable aspect ratios? I've never seen that before.

Keiyakusha
10th November 2012, 19:18
Yes, many streams can have variable aspect ratios, or even variable resolution. mpeg2 and h264 is among them. In case of h264 technically I can append 2 streams of ANY kind and result will be a valid stream. But this is also depends on the container they are in. I'm not sure if mkv officially supports streams like this, so if it worked for you, you may be just lucky. Your splitting/decoder filters managed to play it correctly, but there is no guarantee that if will work always and everywhere. Edit: btw information about aspect ratio is (should be) present not only in container but in stream. So maybe your playback chain just didn't make use of mkv's signaling. Which is right in my opinion. IMO such information should be on stream-only level and only read from stream-level.