PDA

View Full Version : DVD to WMV, aspect ratios, avisynth filters, ...


ScottSen
15th August 2005, 23:00
Hurray, my 5 days are up! :)

Let's skip the whole WMV suxor conversation. :) It meets my needs because I use MCE and want to stream dvd's to an extender. 'nuff said.

My goal is to have a dvd library on my mce machine, I don't care (that) much about the size of the wmv (though it better be smaller than the src vob). I am looking for equal'ish quality, and better compression than native vob.

First question:
* does anybody really understand aspect ratio's? lol.

dvd rez: 720x480 (right? I have read 704x480 as well). Okay, but happy bits in the mpg stream will tell the dvd player to display at 16:9.

720:480 / 16:9 = 1.1852

So, by my (apparently bad) calcs, pixels need to be stretched horizontally by 1.1852, yet... what I actually read is its 40:33 which is 1.212. <sigh>

Can anyone explain this?

Second question:
My source into WMV encoder is an avisynth script. Originally, I was doing an autocrop, then resizing vertically to shrink down to the correct aspect ratio (not that I know what that really is, heh). Seemed unsavory cuz I was throwing out bits. I tried instead widening the video, but things got a bit too big and slow for me. It finally hit me that WMV has a pixel aspect ratio parameter! So, now I just always send an autocrop'd clip to WMV, and set the PAR to 40:33.
* does that seem like the best way to do it?

Third question:
* Is there a default set of avisynth filters you suggest?

I realize this is a loaded question, cuz every film has different properties, but I really just want a generic set that is safe to run on all films. Hollywoody films, not anime or tv shows, etc. Currently I just use undot() and LimitedSharpen().

I would be pretty interested in a... "smoother". I am pretty scared of losing detail, but on some dvd's, when I look at a solid surface (say a wall), I can see a fairly random mottling of colors where it should be much smoother. An averaging/smoothing/bluring filter would be great there, but I really don't people/faces to look plastic/over-smooth either. :) So far, I am staying all YUY12 in my script, not sure if that is good/bad/indifferent, but if it matters or limits my smoothing options.

Last question:
I already wrote code to parse the vob, and just do a printf on the aspect ratio, so that I could tell WMV 40:33 vs 10:11 PAR. That kinda suxored, maybe there was an easier way? Anyway -- now I would like info on Audio Tracks. Specifically, I would like to know which track is 5.1 AC3 English (or 2 if that is not available). I don't want directories commentary, I dont want... well, something else. I want this so I can tell Dvd Decrypter which stream to pull down, and so I can tell dvd2avi which track to pull out.
* Suggestions on how to find the right audio stream?
I'm not too afraid of writing code -- is it some IFO I need to parse?

Thanks a ton for reading, and more for answering :)

CWR03
16th August 2005, 23:12
I found a tool that converts many formats directly to wmv, Real video and most other popular formats called AimONE Video Converter. Unfortunately it won't convert directly from .vob, but I can use Gordian Knot single pass at a really high bitrate to convert to an .avi which it can handle. After using Gordian Knot to get the frame rate and cropping the way I need it, I can manually enter an aspect ratio in AimONE for my output file.

SimonSez07
5th September 2005, 08:58
@ScottSen

you seem to be very well informed before posting questions! i think the discrepency between 1.1852 and 40:33 (1.212) exactly coincides with the discrepency you mentioned between 720 and 704.

for instance:

720:480 / 16:9 = 1.1852 (32:27 , incorrect)
- but -
704:480 / 16:9 = 1.212 (40:33 , dvd spec)

and again for 4:3 sources

704:480 / 4:3 = 0.909 (10:11 , dvd spec)

but we both know that dvds are really encoded in exactly 720 pixels by 480 pixels. so why would the par flag be set as if the video was 704 wide?

is the video stream expected to be resized / cropped to 704x480 before par is applied?

in your case ScottSen, i would either resize video to 1:1 in avisynth before encode or set par in wmv to 32:27 or 8:9 (despite the original dvd par flag) so that your wmv is displayed at the correct proportions upon playback.