Log in

View Full Version : Resize Display in Mkvmerge x2


rookandpawn
23rd March 2009, 01:37
I have a 640x360 .264 stream and want to set its display resolution as 1280x720 (x2) using the format specific options in mkvmerge, but when I play it back in MPC/mplayer2/core/VLC/etc it still looks like 640x360 display output.

FFDShow on-screen-display reports its output size is 640x360, but both mkvinfo and core Media player show that its display size is 1280x720. I am using gabest's MatroskaSplitter.exe for the container reading.

Inspector.Gadget
23rd March 2009, 03:09
I can confirm with MPC-HC H.264 DXVA decoder and Haali's splitter.

Steps to reproduce:

1) Create requisite Avisynth script:
Colorbars()
LanczosResize(640,360)
Trim(0,500)
ConvertToYV12()


2. Encode to H.264 with MeGUI using the DXVA-SD-Fast Preset and an mp4 container.

3. Mux to Matroska using mkvmergeGUI and setting "display size" to 1280w and 720h.

Brother John
23rd March 2009, 20:56
Afaik the display size onlny controls the aspect ratio, it’s not a scaling option. And since 1280×720 and 640×360 have exactly the same AR it’s only natural that both videos look and act identical.

burfadel
23rd March 2009, 21:06
I think you're right, you will need to use say, the ffdshow inbuilt resizer and use the 'Mutliple of 2' function (or add the desired resolution yourself)

Mosu
24th March 2009, 17:46
No, the original poster got it right. The "display width" and "display height" elements tell the player/filter the size the video should be played back at. Unfortunately most players/filters only interprete these values (display width / display height) as the aspect ratio at which to play it back (I've seen quite a few files with "display width" = 16 and "display height" = 9 or similar small values).

Inspector.Gadget
24th March 2009, 18:36
Is this worth reporting as a bug to MPC-HC/MPC developers? Is that part of the Matroska specification?

Mosu
24th March 2009, 18:42
You can try, but my guess is that they have good reasons for implementing it that way. The specs ( http://www.matroska.org/technical/specs/index.html ) are clear on that though: "Width of the video frames to display." and "Height of the video frames to display."

Brother John
24th March 2009, 18:57
Thx for the clarification. So this is another one of those specs vs. implementation things. I’m not surprised that you’ve seen files with »crazy« numbers, though, because both x264 and XvidEncraw use the »wrong« interpretation.

I think the main reason for implementing it like that is simple. DisplayWidth and DisplayHeight seem to be the only way to specify non-square pixels in Matroska (at least I couldn’t find anything else in the specs). That’s a very common use case though, I’d say a lot more common than specifying an exact display resolution (fullscreen scaling would kill that anyway).

I don’t know about the status of Matroska 2.0, but maybe changing the specs to conform with the implementations wouldn’t be such a bad idea in this case.