(1) PREFACE
This guide was created to provide the alternative, the fastest way known to decode most
current DVD's. In comparison, mpeg2avi/ac3dec is 5-10 times faster than Flaskmpeg.
(2) WHAT IS THIS GUIDE ABOUT
WHAT YOU NEED:
1) Hardware:
A. pentium mmx 300+, 32mb/10ns RAM, 4mb video, 5+ Gigs hard drive
2) Software:
A. Radium mp3 codec
B. DivX MPEG-4 codec
C. DeCSS (or any other ripper)
D. MPEG2AVI (mpeg2avi.exe)
E. AC3-Decode 0.8.10
F. VirtualDub
3) Alternatives:
A. AVI Framerate Changer (avifrate)
B. GUI v0.18 or better
C. Vob tool v0.06 or better
D. VOBrator v0.2b or better
E. -Take a deep breath, ok...
(3) TESTING STAGE
1. Rip the DVD(s) using DeCss; select your "folder" to rip to, click the "transfer"
button. There are alternative ways of ripping which I don't mention, because
DeCss has worked for me every time.
2. Place the files: mpeg2avi.exe, ac3dec.exe, GUI v0.18 in the same folder, then
open gui.exe, next...
Or
(Skip to 5. for
advanced testing
)
3. In the top of GUI you have these 3 buttons: "mpeg2avi ac3dec vstrip", click the
first two and set the file locations of mpeg2avi and ac3dec, next...
4. You don't need to set the output, as you're only testing but choose your input
VOB source by clicking "input" and selecting your file.
5. Click "preview my AVI" for mpeg2avi or "Play source" for ac3dec. Next...
Or
Advanced testing :
from a command prompt or batch file (see Step 2 in (5)
"Advanced Usage" on how to make a *.bat file) create a simple command line like
this one:
Mpeg2avi.exe -b vts_1_1.vob -r0 -q0 -f -o6
(Assuming your *.vob is in the same dir as mpeg2avi)
6. There are instructions in mpeg2avi preview dos box, the main 2 things we want
now are: Size, press the down or left arrow to get correct perspective. (You
cannot increase the vob's original size) once you get that, write down the 3x or 3y
size that you chose.
7. Fill in the Options you chose from the "preview dos box" and preview the avi again
to test it:
"Postfilter Quality" -q0 (for quality) -q1 (for speed)
"Reference Quality" -r1 (for quality) -r2 (for speed)
"IVTC Frame-offset" -s only if you suspect interlacing use numbers 0-4 and D for
auto, e.g. "-s4D". You will have to test each one, there is no set standard, plus
interlaced film usually will have a 1-10 second variant from the original length,
hence causing poor audio video sync.
"Downsizer X & Y" choose preference from the preview
e.g. "-3x 640" or "-3y 400"
"Output Cropping" crop to desired height and width, if there are black bars on the
bottom and top you'll want to get rid of those by trying -1 720 400 or -1 720 320
(widescreen)
"DivX Auto" (top of screen) check the box, click the button, and set normal
options to start with:
"Codec" fast-motion (default)
"Options" 10 seconds (default)
"Compression control" 100% (default)
"Data rate" 910 (default), save...
Now click "create my avi" and you're finished testing, you don't need to decode
audio until you're ready to make you movie. Why? Because there aren't really any
options worth testing!
(4) SIMPLE USAGE
1. Go to "step 1" in "(5) Advanced Usage" and make a list file, then enter it in the
file location of the vob in the Gui. You will have to type in "*.lst" where the
"*.vob" is in order to see your list files.
Or
For a single VOB files just select your vob.
2. Create your audio by clicking the "ac3dec" portion of the GUI and set you file
locations, then Check the box "Span over multiple VOBS automatically", then click
"Create my wav".
When it asks for a codec, there are two ways to do it:
i.
Choose PCM (no compression) to later compress it, this is useful if you
have a lot of hard drive space and you want to automate all your movies.
Or
ii.
Choose the mp3 codec immediately, DO NOT downsample using ac3dec, it
is horrid. Instead, if you want a lower sample rate, for older sound cards,
mp3 encode it half the sample rate (24000) or do a PCM wave at a full
sample rate (48000) and downsample/mp3 it later.
3. This is only for SINGLE movies or vob files. To make your video portion, go to the
"mpeg2avi" portion of the GUI and set these options:
"FPS" -f0 or -f5 for 23.976fps (see "Misc Options" in "(5) Advanced Usage" for
other frame rates).
"Postfilter Quality" -q0 when resizing or -q1 when cropping or full screen.
"Reference Quality" -r1 (for quality) -r2 (1/5th faster and there are slight
compression artifacts, but it is unnoticed after compressed with mp4).
"IVTC Frame-offset" -s (0-4) for interlaced video.
"Output" -o7 or -o8 (small color difference)
"Downsizer X & Y" choose preference from the preview e.g. "-3x 640" or "-3y
400"
"Output Cropping" crop to desired height and width, if there are black bars on the
bottom and top you'll want to get rid of those by trying "-1 720 400" or for
widescreen "-1 720 320", most likely you will have to use "-3y 400" for correct
prospective FIRST, example:
mpeg2avi -b *.vob -3y 400 -1 720 320
(Proper perspective with no black boarders)
"DivX Auto" (top of screen) check the box, click the button, and set the options of
your choice:
"Codec" fast-motion or low-motion, Low-Motion will produce large size
video clips.
"Options" key frame anywhere from 10-30 seconds
"Compression control" 100% (default always)
"Data rate" 900-1100 for 2 hours, 1100-1500 for 90 min. and try 1500-
6000 for 60 min. or less.
Now click "create my avi"
4. "Virtual Dub", open the mp4'ed *.avi file, and make sure it's set to "Direct Stream
Copy", open your mp3'ed wave file, and make sure it's set to "Direct Stream
Copy" also.
Video/Audio synchronization testing, Go to "video" "select range" and next to
"length", under "time" set it to 300000ms (5 min.) or twice that for 10 min., and
save your avi with a test name. Find where you saved it and play it back to see if
your video is in-sync. If all is well, go ahead and do the whole clip. Simply enter a
0 in the "End offset" section, "frames" or "Time", doesn't matter, and save your
avi. If it is out of sync go to "V/A Sync", if it is good, you're done!
V/A Sync, use this only if video/audio sync is off in the beginning of the avi. Do
the same as above but change the settings each time you do a test until sync
occurs. Go to "audio" "interleaving", go to "source displacement", and if your
audio was ahead of video, start with a value of 200. In some cases your audio will
be behind or after the video, use -200 to queue it, making catch up with video.
5. Avifrate, use this only if your avi is too fast or too slow, audio MUST be in-sync in
the beginning, and later it goes out of sync. First check the length of video against
the audio, if video is shorter, lessen the frame rate, and of course if it's longer
increase the frame rate, most DVD's or Vob's are 23.976fps. If it's interlaced,
good luck. I get most of the audio synced but it looses sync at times throughout
the film.
(5) ADVANCED USAGE
1. Once all is ripped from dvd(s) and placed in desired folders, make a list file. This
will allow mpeg2avi to join them seamlessly, now do this procedure with all of
your Vob's on your hard drive in new *.lst files, example vob.lst vob2.lst...
How to make a list file:
place a new *.txt file in the same folder as mpeg2avi rename the *txt file to
vob.lst, double click it, associate it to notepad and put your file locations in it,
example:
C:\vobs\xfiles\VTS_06_1.VOB
C:\vobs\xfiles\VTS_06_2.VOB
C:\vobs\xfiles\VTS_06_3.VOB
C:\vobs\xfiles\VTS_06_4.VOB
C:\vobs\xfiles\VTS_06_5.VOB
C:\vobs\xfiles\VTS_06_6.VOB
2. Now create a *.bat file containing the command lines, Example:
divxauto L 30 100 2000
mpeg2avi.exe -b vob.LST -1 624 272 -r1 -q0 -f0 -o8 D:\xfiles.avi
divxauto F 30 100 1000
mpeg2avi.exe -b vob2.LST -1 720 400 -r1 -f0 -o8 D:\fireflies.avi
Creating a batch file is the same as the list file. Doing this will automate two
movies, it is unlimited in how many you can do, but audio can only be done one at
a time unless you extract raw audio and encode it with an external encoder that
allows batch processing.
3. How to use DivXauto, it will autoload when entered in the *.bat and unload when
used, so you can set different perimeters for each vob list, here are its options:
1st command,
"L" will select the Low-Motion codec or "F" Fast-Motion codec
2nd command,
"10" will set keyframes every 10 seconds, works only up to 30 seconds
3rd command,
"100" will set compression control to 100, compression is 1 to 100
4th command,
"850" will set bit-rate to 850, Bit-rate is only up to 6000
If you leave out any parameters, defaults will be used instead. By default,
DivXauto waits for a dialog titled "ICCompressorChoose". This is for
compatibility with MPEG2AVI. If you want it to enter values in another
dialog, just put the beginning of the title on the end of the command line,
Example:
divxauto F 2 75 4000 "Video Compression"
If you use DivXauto in a batch file under NT/2000 you may have to use:
start divxauto ...
mpeg2avi ...
NOTE 1: The desired bitrate depends on the movie size and length,
910 is good for most, key framing is up to you, anywhere from 10-
30 is good.
NOTE 2: Sometimes removing the extra "Vob's" inside Vob's will
give you good audio sync to start, and help cut down on the file
size. Use Vob tool or any other one that you may be familiar with.
Sometimes it is needed, most of the time it's not needed.
4. To get an understanding of these options you MUST read mpeg2avi's
accompanying documentation, this is only the shortcuts. Most of these clips are
cropped to get the best picture quality at best compression, only removing the
black boarders in the film.
Here are the most common mpeg2avi options:
1. Widescreen 720x320,
mpeg2avi.exe -b vob2.LST -3y 400 -1 720 320 -r1 -q0 -f0 -o7 D:\*.avi
. NTSC 720x400,
mpeg2avi.exe -b vob2.LST -1 720 400 -r2 -q1 -f0 -o7 D:\*.avi
3. Formatted 720x480,
mpeg2avi.exe -b vob2.LST -1 720 480 -r2 -q1 -f0 -o8 D:\*.avi
And on occasion you'll have uncommon options:
1. Widescreen 624x272
(original was squished instead of stretched)
mpeg2avi.exe -b vob2.LST -3x 624 -1 624 272 -r1 -q0 -f0 -o7 D:\*.avi
2. Widescreen 688x320
(wide didn't reach the right and left sides)
mpeg2avi.exe -b vob2.LST -3y 400 -1 688 320 -r2 -q0 -f0 -o7 D:\*.avi
3. Widescreen 720x360 (cropping only)
mpeg2avi.exe -b vob.lst -1 720 360 -r2 -q1 -f4 -o8 D:\*.avi
4. NTSC 0r Formatted 720x480 remove interlacing,
mpeg2avi.exe -b vob2.LST -s4d -f -1 720 480 -r2 -q0 -f4 -o8 D:\*.avi
When resizing using '-2' (halfsize) or '-3x' or '-3y' be sure to use '-q0' instead of '-
q1', it is slower but you don't want pixilated artifacts in the film. Read the filter.txt
that comes with mpeg2avi. Otherwise it is not noticeable on cropped or full size
videos.
5. If you haven't made your audio yet here is the only option I ever use:
e.g. ac3dec.exe C:\Vts_06_1.vob D:\movie.wav -allvobs (select first vob only, the
"-allvobs" option will do the rest) and check out the "Tips". I noticed that GUI
v0.18 uses "-wav" option in addition to allvobs.
6. Go to "step 4" in "(4) Simple usage" and your done!
Misc Options:
-1
Cropping (requires 2 input numbers)
e.g. mpeg2avi -b vob.lst -1 640 400
-3x
is your right/left scale
e.g. mpeg2avi -b vob.lst -3x 640
-3y
is your top/bottom scale
e.g. mpeg2avi -b vob.lst -3y 400
-s<#>
enable manual inverse-telecine with offset <#>, #=0..4 (examples, -s0, -s1, -
s2, -s3, -s4) requires that '-f' is simultaneously specified and that it's first in the
command line (after the movie location). IVTC is OFF by default, please refer to ivtc.txt.
e.g. MPEG2AVI.EXE -b darkcity.vob -s4 -f ...
(enables inverse-telecine, set starting-offset to #4)
-s<#>D
activate IVTC with "auto-disable"
e.g. MPEG2AVI.EXE -b starship.vob -s4D -f ...
(enables inverse-telecine, set starting-offset to #4)
IVTC explanation:
When motion picture films are formatted for NTSC video, they must go through a
process called telecine. NTSC runs at 29.97 frames per second, while film runs at
24 fps, so the video must undergo a frame rate conversion. This is accomplished
by first slowing down the film by 0.1%, reducing it to 23.976 fps, and then
inserting one extra frame every fourth source frame. As a result of the telecine
process, the second and third frames out of every five are interlaced. Deinterlace
filters can reduce or eliminate the interlacing, but may lower the image quality
and still doesn't remove the inserted fields. (this info taken from VirtualDub help
file)
-r1
32-bit MMX IDCT, IEEE-1180 compliant
MPEG2AVI uses '-r1' by default. This algorithm is both accurate and fast.
-r2
16-bit MMX high-speed IDCT, not IEEE-1180 compliant
-q
MPEG2AVI's "fast-filter" will produce output faster,
while maintaining comparable video quality
e.g. MPEG2AVI.EXE -b input.vob -q1 ...
-q0
Hi-Quality filter (Use this when resizing)
-q1
Fast-filter (for cropping or when not resizing)
-f[n]
same as "-f", except also specifies a frame-rate from the table. The choice of
frame-rate does not affect the decoder's output. It merely sets the appropriate data-field
in the AVI's header.
-f0
(23.976 = 24,000/1001)
-f1
(29.970 = 30,000/1001)
-f2
(25.000 = 25/1)
-f3
(24.000 = 24/1)
-f4
(30.000 = 30/1)
-f5
(23.976 = 23,976/1000)
-f6
(29.970 = 29,970/1000)
-f7
(Custom = dwRate/dwScale)
E.g. MPEG2AVI.EXE -b ntsc_film_vcd.dat -f0
(Sets AVI-file's framerate field to "23.976fps")
(6) TIPS
• Installing similar codecs afterward could cause problems.
• Wide Screen is 720x320 or 624x272 shrunk & cropped.
• Pan & scan is 720x360 or x400 shrunk & cropped.
• NTSC or PAL is 720x480 no resizing.
• Wide screen or sometimes even pan & scan without size changes causes the video to
be out of perspective.
• it is important that you read the original documentation that comes with these
programs you're using.
• Don't run two windows of mpeg2avi & don't run two windows of ac3dec, but you can
run mpg2avi & ac3dec at the same time. It works best if mpg2avi runs on top.
• make sure DMA is enabled for your Hard Drives, dvd, etc..
• keep your hard drives defragged.
• resizing (not just cropping) will make your avi smaller, so you can increase your bitrate
for better quality.
• keyframing is the way your clip keeps track of a/v sync and fast forwards, not enough
of them and you might get discoloration or strange playback, 10-30 sec/keyframe is
good.
• this one's not included in the "how to's" of my FAQ because there is a FAQ out on this
subject: download the program, "VOB tool v0.06" or higher, and use it to delete
unnecessary segments or to extract them, thus fixing scene jumping, etc..
• When using ac3dec mute all channels except wave and main.
• to get file locations quickly into a bat file or command line, simply drag a shortcut from
that file into your working folder click its properties and select/copy the location.
• Advanced users, if you own or have ;) "Media studio pro 4" and you don't care about
getting this on one CD, try this: Decode your vob in full size (and cropping it would even
do better) so it's stretched and huge, using highest quality k/f 1, smooth/sharp 100, bit
rate 6000. Now take it over to Media Studio and enlarge the horizon to 848 or 852 (what
most software decoders do) so you get utmost quality, instead of shrinking video. Now
save it in the same format, same data and bring it to VirtualDub and join it with it's
audio, make sure it is in sync (pun) and save the first and second half using the "video/
select range" options.
• For cartoons, not Disney's. Cartoons are usually 15fps then speed up for DVD format,
to get better quality all around, use the frame decimation option in mpeg2avi's
documentation
• -! 1 is what I use for 29.97fps DVD's and -! 2 for 23.976fps DVD's. Then you can us -f7
and input your 15fps video!
(7) TROUBLESHOOTING
Can't join all the vobs?
win9x has a 4 gig limit
DeCss doesn't decrypt?
Files probably aren't encrypted, copy them directly to your hard drive.
Mpeg2avi has an error "g_poStreamlist doesn't exist!"
it's not an error, check your avi file, it's fine.
Mpeg2avi crashes or has encoding errors during encoding?
Could be the stability of your CPU (overclocked or not an authentic Pentium MMX)
mpg2avi uses mmx core.
Gui 18 crashes when opening files?
if you deleted the folder you were using last, it for some reason can't handle that. replace
the folder that was deleted.
Ac3dec doesn't decode or make a wav file from multiple vobs?
you MUST use v0.8.10, newer versions currently don't support any command lines.
I get a buzzing sound in the wave file I decoded using ac3dec?
DMA channels can cause this, but first mute all audio channels except wave and main.
ATI all-in-wonder, since all my dvd playback is on my ATI card I added this.
DVD's or vobs won't playback?
There are many solutions to this, first: there is a file called edlog.dat in your
windows\system folder, if you remove it then open your ATI DVD player, then it will play,
but be sure to keep this file. When you eventually reboot, you'll need to put edlog.dat
back into your windows\system folder, then all should be well.
Multible clips of video and audio are in the movie and, and it's confusing to
watch or crashes during decoding?
Use VobTool and Vobrator, decode all the vobs into a folder and begin testing, then you
may "Save" the audio so it will be a vob file then ac3dec can connect the audio into a
continuos stream.
(8) SPECS
Created on a celeron 333 oem, 128mb 10ns ram, tyan trinity 400 Motherboard, 40gb
ata/66 HD, ati all-in-wonder 8mb agp video. Tested on a pentium 166mmx 64MB ram/
4mb video/ very choppy Created & tested on a celeron 333 128MB ram/ 2mb video
Created & tested on a celeron 333 128MB ram/ 8mb video tested on a AMD k6-2 450
128MB ram/ 8mb video