Log in

View Full Version : How can I edit the attributes of an .avi file?


fatvince
24th March 2009, 15:37
Hi,

I have an .AVI that doesn't have the 'widescreen' flag enabled. It plays OK on some players that recognize which part of the screen to display, but on others, it will be played in a rectangle in the middle of the screen surrounded by a black border on all sides.

My question is, is it possible to change the .AVI file to tell the player that the clip is in widescreen? If not, what would be a good workaround, other than a full re-rip?

thanks,
Fat

Inspector.Gadget
24th March 2009, 15:55
Are you asking how to make it anamorphic? mpeg4modifier by moitah can set the pixel aspect ratio of an ASP stream in an AVI file to be the same as it is in a 16:9 dvd, thus making the picture render with the correct dimensions. Whether or not your player supports this, I don't know.

fatvince
29th March 2009, 15:25
Thanks Gadget, it works pretty well! What is the difference between pixel ratio and display ratio?

In any case it works when I choose display ratio 16:9, but for some strange reason the picture is all squashed horizontally. Ie the video is in a widescreen rectangle that's a bit too thin. Any idea why this might be so? Playing the original .avi shows a correct AR (but black borders all around).

Also, can I do this with .VOB files? I have a few DVDs with exactly the same problem!

Thanks!
Vince

Inspector.Gadget
29th March 2009, 16:05
Pixel aspect ratio (PAR) can be altered so that each pixel is no longer the same width as height. Display aspect ratio (DAR) governs the overall display of the picture.

In any case it works when I choose display ratio 16:9, but for some strange reason the picture is all squashed horizontally. Ie the video is in a widescreen rectangle that's a bit too thin. Any idea why this might be so? Playing the original .avi shows a correct AR (but black borders all around).

If the AR is already correct then don't mess with it. You can't get rid of the borders except by cropping upon re-encoding or doing it in real time on playback with Avisynth and crop().

Also, can I do this with .VOB files? I have a few DVDs with exactly the same problem!

You can probably do this with ReStream, but bear in mind that to get a working DVD after altering the VOBs you'll have to reauthor, as far as I know.

yetanotherid
10th April 2009, 07:47
Thanks Gadget, it works pretty well! What is the difference between pixel ratio and display ratio?

There's 2 different ratios which determine the end DAR (display aspect ratio). PAL is obviously one of them while SAR (storage aspect ratio) is the other. SAR x PAR = DAR

With AVIs SAR and DAR as usually the same as the PAR is 1:1.
With a 4:3 DVD (for example) SAR is something like 720x480 or 1.5, pixel aspect ratio 0.889. So 1.5x0.899=1.333 (4:3)

My guess is that your original AVI completely messed up the original aspect ratio during the conversion. Given that you say it's still squashed horizontally it's probably not 16:9. It's probably an even wider screen format such as 1.85 or 2.35.
Did you convert the AVI yourself and if so what program did you use?

If you converted it yourself and given that even 16:9 doesn't sound like the correct aspect ratio then I'd convert it from the original source again.
If you didn't or that's not an option then I'd probably re-encode the AVI. I use AutoGK for that. It won't correct aspect ratio itself, but I have ffdshow installed and use it for decoding Xvid/DviX. I use ffdshow to correct the aspect ratio and size and then when it's right I convert it with AutoGK. The only hard part is to remember to disable ffdshow's aspect ratio changes when I'm checking the new AVI.

There's probably 100 different ways to re-encode it with different software. I sometimes use Super (http://www.erightsoft.net/SUPER.html) for jobs like that as it's pretty flexible. Sometimes I decode a problem AVI to lossless video (inside an AVI) with Super, fixing the aspect ration along the way, then I use AutoGK to convert the lossless AVI back to XviD.