Log in

View Full Version : Clip Properties - Display Aspect ratio


Mr_Odwin
11th December 2006, 14:55
I automate the opening and resizing of various files with Avisynth. The resize uses the values provided by clip.width and clip.height. However, this sometimes leads to bad resizes. For example I have a dvr-ms file which can be opened with DirectShowSource - the height is 480, the width is 720, but the display aspect ratio is 4/3, not 1.5. Is there a way of correctly obtaining this DAR via Avisynth?

unskinnyboy
11th December 2006, 19:56
You will need to get it from the d2v by parsing it. Only the d2v has the DAR information. MeGUI already does this (check the MeGUI dev thread).

Mr_Odwin
12th December 2006, 12:30
Unfortunately, dvr-ms files are currently not supported by DGIndex so that's not an option. And I believe that some avi files (I'm thinking at least xvid) can have this type of thing too.

unskinnyboy
14th December 2006, 16:42
DVR-MS support in DGIndex was supposed to come soon, but isn't here yet, I guess. Probably DG is waiting for clarification from MS to see if it is allowed or not (there was a thread on this). DVR-MS is nothing but MPEG-2+MP2+some DRM crap (copy protection flag CGMS-A etc) in ASF. So couple of options here: Either you wait till DGIndex supports DVR-MS or the other way (albeit circuitous) would be to convert (http://thegreenbutton.com/forums/thread/53128.aspx)the DVR-MS files to another format and then have DGIndex index it (if this is part of a program chain, you may need a CLI which will do that).

Using Xvid, the DAR can be written into the MPEG-4 stream, sure, but it's only for playback purposes using a suitable software player. When frameserved to Avisynth, this DAR info is lost. If you look at the MeGUI dev thread, they get this DAR info for MeGUI using their own extended version of the AvisynthWrapper.dll. You may be able to borrow some ideas there by looking at the MeGUI code.