View Full Version : MKV aspect ratio
vlada
1st January 2006, 18:50
Hello,
I have problem with playback of MKV files with non-square pixels. I did a simple test - I put a 4:3 AVI into MKV and set the AR to 16:9 (in MKVToolnix 1.5). If I try to play the file, it always plays as 4:3.
I tried MPC with internal a Haali's splitter and ViPlay with Haali's splitter. I used FFDShow and DivX for decoding the video stream.
Why doesen't this work? Is it because of a splitter or decoder mistake? Or did I make a mistake in creating the file?
Thank you,
Vlada
fps
1st January 2006, 19:59
Did you enable the Overlay Mixer in ffdshow? (can be found at ffdshow configuration -> output)
vlada
1st January 2006, 20:46
I tried to enable it, but it didn't help (FFDShow 21/12/05). It works in VLC.
In fact how should it work in DirectShow? I think the splitter should read the information about aspect ratio and should forward it to video decoder, right? Can I somehow check if FFDShow got this information or not? Or does FFDShow prefer information stored in MPEG-4 video stream? It shouldn't IMHO.
foxyshadis
1st January 2006, 21:36
I do know that the latest versions of mmg removes aspect signalling from the mpeg-4 stream specifically to get around this. If yours isn't up-to-date it could be that.
FFdshow doesn't actually decode with aspect ratio, it just forwards it to the player (unless there's a switch to do just that that I don't know of).
Haali
1st January 2006, 21:56
You need to set overlay mixer in ffdshow to third state for this to work.
vlada
2nd January 2006, 00:06
You need to set overlay mixer in ffdshow to third state for this to work.
What do you mean by "third state" of overlay?
Anyway I found out I have checked in MPC "Keep Aspect Ratio" and this was causing the problem. Now it finally works in MPC, but it still doesen't work in ViPlay. I believe it will be the same case with most other DS players. If FFDShow is only signalling the AR to a player, the player has to support it. So this will be probably the reason why it will only work in a few players. Wouldn't it be better if FFDShow would resize the movie to the correct AR?
Thak you guys,
Vlada
vlada
3rd January 2006, 18:38
I did some more tests with AR. I found out, that if I disable "Keep Aspect Ratio" then I don't have right AR for DVDs. So I either have correct AR for MKV or DVD, but not both.
I also wanted to do some tests with AR in m4v stream. I modified a test file with MPEG4 Modifier, but it seems to me the program is not working correctly. GSpot still says that PAR is 1:1 and if I try to load the file in MPEG4 Modifier, the AR is different to what I have set.
So my conclusion from these experiences is not to use non-square pixels if possible. It is still not working flawlesly.
Moitah
3rd January 2006, 19:12
I also wanted to do some tests with AR in m4v stream. I modified a test file with MPEG4 Modifier, but it seems to me the program is not working correctly. GSpot still says that PAR is 1:1 and if I try to load the file in MPEG4 Modifier, the AR is different to what I have set.
MPEG4 Modifier only supports MPEG-4 ASP in an AVI container. Was your file like this? Also, DAR cannot be directly written to the file, it is converted to PAR first based on the resolution of the video, so this may be why you see a different value after re-loading the file.
vlada
3rd January 2006, 20:44
Thank you Moitah,
I did a mistake in reading the information in your porgram. One file was an AVI compressed using DivX 5, I thought the displayed value is DAR, but it was PAR. So the file was modified correctly. The other file was an AVI/DivX 3. So it probably won't work because it is MPEG-4 SP.
Unfortunately the problem with playback remains. FFDShow and DivX ignore the PAR, only XviD decoder works. But again only in MPC with checked "Keep Aspect Ratio". It also works in VLC.
This is strange, because I thought FFDShow supports reading PAR. But it probably doesen't :-(
P.S. I use FFDShow 05/12/21
Skaarj
3rd January 2006, 21:37
I test one file with incorrect AR.
Matroska File, Mpeg4 AVC (native).
Mkvtoolnix 1.6.5, HaaliSplitter 02.01.06.
MPC "Keep Aspect Ratio" on&Off
VLC - (ok)
CoreAVC - WMP, MPC - (ok), graphedt - (incorrect)
FFdshow (overlay off) - WMP, MPC - (ok), graphedt - (ok)
FFdshow (overlay on ) - WMP, MPC - (ok), graphedt - (ok)
Nero Decoder - WMP, MPC - (ok), graphedt - (ok)
Moitah
3rd January 2006, 21:44
The other file was an AVI/DivX 3. So it probably won't work because it is MPEG-4 SP.
Well I guess it does work on SP too, I'm not sure to be honest :). I just meant that I don't think it works on MPEG-4 AVC. DivX3 should be fine if you use the conversion tool (http://forum.doom9.org/showthread.php?threadid=85229).
Skaarj
4th January 2006, 11:29
Matroska File, Mpeg4 ASP (xvid)
I set AR in Mkvtoolnix 1.6.5,
HaaliSplitter 02.01.06
MPC "Keep Aspect Ratio" on&Off
-VFW-
VLC - (ok)
FFdshow (overlay off) - WMP, MPC, graphedt - (ok)
FFdshow (overlay on ) - WMP, MPC, graphedt - (ok)
Xvid Decoder - WMP, MPC, graphedt - (ok)
Divx Decoder - WMP, MPC, graphedt - (incorrect)
-native-
VLC - (ok)
FFdshow (overlay off) - WMP, MPC, graphedt - (ok)
FFdshow (overlay on ) - WMP, MPC, graphedt - (ok)
Nero Decoder - WMP, MPC, graphedt - (ok)
For me all works fine. (Divx is evil)
Seb.26
7th February 2006, 17:19
I have same problem :
> x264
> AC3 or DTS
in a MKV file ( mux by MKVToolnix 1.6.5 )
video stream is a DVD anamorphic with just "top&bottom" crop ... no resize
> example : on a PAL DVD my AR is for example 1024*416 ( for an 720*416 video ) ... so I entry 1024*416 in AR when muxing ...
But since I have re-install my computer ( XP SP2 ), AR don't work anymore ... And this movies works in soon past ...
I use MPC + FFdShow and my aspect ratio is not used ...
... I thing I have last release of this tools ...
So what is needed t for AR works fine ???
I've read about "third state" in ffdshow ??? ... what about this ?!!
:confused:
SeeMoreDigital
7th February 2006, 18:15
If it help... In the past I've used VirtualDubMod and AVI-Mux GUI to generate MKV muxes with MPEG-4 video streams containing AR signalling.
Both muxes play back at the correct aspect ratio using FFdshow's filters (without Haali).... so it is possible to do ;)
EDIT: However, when both the above mentioned MKV muxes are played in VLC player, the AVI-Mux GUI mux is correctly displayed but the VirtualDubMod mux is incorrectly displayed :eek:
Cheers
kurt
7th February 2006, 19:12
@Seb26:
in mpc try right click: Video Frame: "Touch video from inside" and "keep aspect ratio". Under Pan&Scan don't tick anything..
ffdshow, output: tick "overlay mixer" and "allow output format changes during playback"
if the AR is set properly in mmg then vlc and mplayer should display it fine...
Seb.26
8th February 2006, 10:07
in mpc try right click: Video Frame: "Touch video from inside" and "keep aspect ratio". Under Pan&Scan don't tick anything..
This is already done done :D ... I will inspect "Touch video from inside", maybe I've put "from outside" ... I don't remember ...
ffdshow, output: tick "overlay mixer" and "allow output format changes during playback"
if the AR is set properly in mmg then vlc and mplayer should display it fine...
who is "mmg" ??? ... :helpful:
Thanks !!!:)
kurt
8th February 2006, 10:14
with "mmg" I meant the GUI from mkvtoolnix. (where you mux your files)
Seb.26
8th February 2006, 12:12
thanks ! :)
Seb.26
9th February 2006, 12:11
OK ... MKV work fine wih AR ! :D ... Thanks
BUT ... now, my DVD are displayed like inverse anamorphic resize is done twice !
( I use the internal MPC DVD decoder + FFDShow ) ... once in MPC, and once in FFDshow ... Picture is very flat ...
The way to correct this is to set "Pan&Scan>AspectRatio>16/9" manually, "default" don't work for DVD ... but with 16/9, my mkv don't work good ...
( for all DVD, not only 1 or 2 with bad flags ... ;) )
:eek: Life is hard ... :scared:
Any idea ? :D
robU*4
9th February 2006, 22:32
To make sure your file is OK, try playing your file with VLC (non DirectShow), the AR should be correct if the file is correct.
SeeMoreDigital
9th February 2006, 22:56
To make sure your file is OK, try playing your file with VLC (non DirectShow), the AR should be correct if the file is correct.As I mentioned earlier, I muxed the same MPEG-4 stream into the MKV container using VirtualDubMod and AVI-Mux GUI.
When both are played in VLC player the AVI-Mux GUI mux is correctly displayed but the VirtualDubMod mux is incorrectly displayed :scared:
I don't know for sure but doesnt VLC player access and detect AR signalling at stream level?
Can you confirm whether the aspect ratio signallng information of MKV files is stored at the container level or at the stream level. And what level should software media players be looking for?
Cheers
foxyshadis
10th February 2006, 01:00
MKV stores aspect ratio in the container, and it should stay there. However, the bitstream can contain ARS; mmg will detect and remove it in that case (will push it to the container level). Could be that VDub doesn't do that, while VLC never checks the bitstream for AR.
So it's quite possible for double decoding to happen, or container-level when only bitstream-level AR is present, which is why I always use mmg. =p
Seb.26
10th February 2006, 10:03
I have re-install all my PCHC ... And all work fine now ?! :)
I don't know how but it's working ... I must make a ghost of this install !!! ;)
Thanks a lot :D
That's all folks !!!
Seb.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.