View Full Version : Getting the right aspect ratio with AVISynth, from an M2V file
BloodyBaron
3rd November 2004, 12:17
Hi to all,
I am totally new to AVISynth, and I am struggling to find the right filter with the right parameters to do this: I would like to frame-serve video to VirtualDub thanks to AVISynth, but I haven't yet found out how to get the right aspect ratio from my DVD.
With DVDDecrypter, I produced a 3.7GB .M2V file which contains the video stream. Its AR is 16:9.
Here is my AVISynth script :
LoadPlugin("N:\AviSynth2.55\Plugins\MPEGDecoder.dll")
MPEGSource("L:\VTS_05_1 - 0xE0 - Video.M2V")
LoadPlugin("N:\AviSynth2.55\Plugins\AutoCrop.dll")
AutoCrop(1, 4, 2, 0, 0, 0, 0, 40, 10, 1)
Does anybody knows which filter I should rather use instead of AutoCrop, or which parameter set to the last one (I tried -1, 1, 4/3, 16/9, but none worked : with these values, the result is always the same, the image is still stretched vertically...
As I am newbie, I used the Search function, but I couldn't find what I wanted... Sorry I missed something! and sorry for my English, I'm French
:)
Regards,
BloodyBaron
clickit
3rd November 2004, 12:40
taken from autocrop.txt, comes with autocrop.dll
parameter : aspect - Float - default 0 - Aspect is ignored
-1 - Maintain aspect ratio of the source clip
0 - Aspect is ignored
>0 - Aspect ratio will be set to this. For example for a 4:3 aspect ratio you would pass
4.0/3.0 or 1.33333333333. Note 4/3 won't work the .0 is need to tell AVISynth the value is
a float.
for instance use :
AutoCrop(1, 4, 2, 0, 0, 0, 0, 40, 10, 1, aspect=16.0/9.0)
or you can use
AutoCrop(1, 4, 2, 0, 0, 0, 0, 40, 10, 1, aspect=-1) -> keep source's aspect ratio
BloodyBaron
3rd November 2004, 13:45
Thanks for your fast reply, but it doesn't change anything: the aspect still is the same, the image is still stretched vertically.
I would like to obtain the result you can see in the second picture at http://www.doom9.org/aspectratios.htm
I tried too this "-1" parameter, which "keeps source's aspect ratio", but it doesn't solve my problem.
When I read my .M2V file with Gabest's MediaPlayerClassic, the aspect ratio is OK, the image looks exactly like it does when the DVD is read through PowerDVD (the image is not stretched vertically). (this is what I would like)
But when I read it through WindowsMediaPlayer, the result is bad, the image is stretched vertically. That is exactly what I want to avoid..
:confused:
clickit
3rd November 2004, 13:58
can you use another dvd player, like windvd, to play the .m2v file ?
what is the result ?
BloodyBaron
3rd November 2004, 14:42
Well, I tried to read it with WinDVD, it's OK ; in fact, it is OK in every program espescially designed to read DVDs (like are Gabest's MediaPlayerClassic, WinDVD, PowerDVD)...
manono
3rd November 2004, 23:51
Hi-
What are you trying to do? Back up a DVD to AVI? If so, your method's a little screwy. If I were you, I'd start by letting Auto Gordian Knot (http://www.doom9.org/autogk.htm) do it for you a couple of times, and then study its methods, if you then wish to do the whole thing manually.
Either that, or read a few Guides (http://www.doom9.org/divx-encoding.htm).
You probably shouldn't let DVD Decrypter demux the streams for you, but do that in DGIndex. And if all you want is to crop and resize properly, by opening the .d2v Project File that DGIndex creates in Gordian Knot (http://www.doom9.org/gknot-main5.htm), you can get that information quite easily.
BloodyBaron
4th November 2004, 09:27
Yes you're probably right !
I will try first with AutoGK, and if possible try to understand what it does; it uses AVISynth I think, and it may surely be a good way to learn how to script! :)
Thanks for your advice;
BloodyBaron
killingspree
4th November 2004, 12:21
Originally posted by BloodyBaron
it uses AVISynth I think, and it may surely be a good way to learn how to script! :)
it sure does use avisynth... just take a look at the scripts it creates - it will help you understand quite a bit of the process... also you might want to try the "original" GordianKnot - as it creates simpler avs scripts iirc...
kr
steVe
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.