azid and SSRC
Avisynth + DVD2AVI/MPEG2Dec3 + Decomb
Windows Media Encoder 9 Series
- Rip the DVD using
Rip the whole DVD using DVD Decrypter in File mode
- Demuxing audio and video
Open DVD2AVI, be sure start with the right vob (usually it’s VTS_01_0.VOB). Now a new window will popup telling you what segments DVD2AVI have found, press ok to confirm.
To demux just press F4 and choose an approperiate name for your d2v project file.
- Converting audio (skip the azid part if you have a wav-file)
I actually tried to stick to GUI applications but it didn’t work out so we’re going to use two cmdline based ones instead.
azid, an AC3 Decompressor and SSRC, normalizer and a great resampler.
There’s the first line for decompressing
azid “E:\PRINCESS_MONONOKE\VIDEO_TS\DVD1 AC3 T01 3_2ch 384Kbps DELAY 0ms.ac3” “E:\PRINCESS_MONONOKE\VIDEO_TS\DVD1 AC3 T01 3_2ch 384Kbps DELAY 0ms.ac3.wav”
…and the second for normalizing and resampling.
ssrc --rate 22050 --twopass --normalize “E:\PRINCESS_MONONOKE\VIDEO_TS\DVD1 AC3 T01 3_2ch 384Kbps DELAY 0ms.ac3.wav” “E:\PRINCESS_MONONOKE\VIDEO_TS\Audio.wav”
- Postprocessing your video
Open notepad and paste these lines and alter them.
Now save this file as <something>.avs, be sure to have .avs at the end.
4.1 Interlaced or not…
Open up your avs script in VirtualDubMod, it should open fin unless you’ve specified an incorrect path.
You’re now going to check if whether your source is or not. Drag the slider to the middle and use the arrow keys on your keyboard to scroll frame by frame. Check about 50 frames or so, if some has “bad” lines (see below) then you have to deinterlace if not then you have a progressive source.
Interlaced source (no, it’s not Princess Mononoke)
4.2 Deinterlacing (and IVTC)
Donald Graft has already written excellent documentation about this topic so I suggest you read DecombTutorial.html (included in decomb package).
You can decide if it’s PAL or NTSC by looking at the framerate and resolution (File --> File Information in VirtualDubMod).
720 x 576 pixels - 25 fps
720 x 480 pixels - 29,97 fps or 23,976 fps with 3:2 pulldown = 29,97 playback fps
btw, AviSource(“your_clip.avi”) is the same as the MPEG2Source line in your case so the first step should look like this (including loading the decompplugin and excluding your own paths).
- Putting it all together
Since you want to serve this on demand you’ll have to lower the resolution in order to maintain decent quality on little bandwidth.
Add one of these lines at the end of your avs script depending on if it’s NTSC or PAL.
Reload your script in VirtualDubMod, go to Streams menu --> Stream list --> Add --> Audio.wav --> Ok
Pretty straight forward, mark what you want to save in each file using the last two buttons to the right. Press F7 to save, change video mode to Full Processing Mode and use Huffyuv v2.1.1.
Select “Convert a file” as the Wizard you wanna use, choose a source file (the file(s) you saved using VirtualDubMod). (Next)
You wanted these files to be streamable and therefore they have to support progressive download (Web server). (Next)
Ignore what the encoder suggests, you’re going to change it anyways (Next)
Add appropriate information to your clip. (Next)
Uncheck "Begin converting when I click Finish. (Finish)
Click on Properties (Toolbar) --> Compression tab --> Edit button.
Set correct video format, NTSC or PAL and then click on the other tab.
Video size: Same as video input
Audio format: 32kbps, 22kHz, stereo CBR
Video bit rate: 342K
–> Ok button --> Apply
Start Encoding (Toolbar)
There you have it, playable files that hogs about 384kbps each. Users on 0.5 mbit will play them fine.