Log in

View Full Version : Is is possible to detect anamorphic sources using DSS?


quake74
7th December 2006, 15:34
I would like to translate anamorphic to non-anamorphic sources using an avisynth script, but the width and height of the clip imported via DSS are the pre-ana ones. Suggestions?

check
7th December 2006, 22:34
err, unless I'm missing something:
o determine the correct AR
o dss().resize()

foxyshadis
8th December 2006, 01:11
I think he's hoping for an answer to "determine the correct AR", which MeGUI can do, but directshowsource has no native method to access it. Maybe IanB can find a way, since it should be just another field in the extended avi info header.

G_M_C
8th December 2006, 10:14
Well, i do it the old fashion way;
I open the file and look at it, look at it's resolution and look at its framerate.

For instance;
When things seem squashed AND the resolution is 720x576 then probably the source is PAL anamorphic. I then use a resizer to change the resolution accordingly, maybe cropping off some black borders in the process. Some simple calculation to get the final size is easy.

Same goes for NTSC ana., but i havent seen many of those.

What I want to say with this; What's wrong with using common sence (and knowlegde like BBC HD being in anamorphic all the time when on 1080i). Or just plainly using your eyes ? You can clearly tell (and sometimes read the back cover of the DVD that will tell you that it is anamorphic or not). Not everything needs to be "one click".

quake74
8th December 2006, 17:49
Thanks for all the help. I was interested in this because I was trying to do a batch transcoding utility for psp (see http://forum.doom9.org/showthread.php?t=119083 and don't laugh at my poor avisynth skills). The goal would be to just drop a file onto the bat and get a mp4 suited for psp play with no human intervention.

By now I just let avisynth decide which is the closest ar btw 1.33 1.77 and 2.33 and change the encoding resolution accordingly. Obviously this totally fails with anamorphic sources, whose ar is not the "real" one.

Funny enough, the psp can stretch in hardware a 320x240 to make it a widescreen image, so 4:3 ana encoded at 4:3 just need to be stretched by the psp, but the 2.33 movies encoded ana in 16:9 are just going to be taller. I don't really have that many ana encodes (I just started recently encoding ana), so my question was more out of curiosity, rather than real need.

squid_80
8th December 2006, 18:37
Maybe IanB can find a way, since it should be just another field in the extended avi info header.
If it was implemented, what would be the desired behaviour? A resize (which method?) or dump the AR into variables so it can be used as the script writer sees fit?

foxyshadis
8th December 2006, 19:22
I'd prefer a global variable (or two). That's how MeGUI uses it, and it's quite effective. I think it uses dar_x and dar_y, a single float dar would probably be as effective.