Solution to VirtualDub Audio (and Video) Conversion Problems

This forum is for discussion pertaining to homebrew and indie software for the Dreamcast, such as homebrew games, emulators/interpreters, and other homebrew software/applications. Porting requests and developmental ideas are not to be made here; you can make those here. If you need any help burning discs for homebrew software, this is the place to ask as well.
Locked
kRYPT_
DCFactory Creator
DCFactory Creator
Posts: 597
Joined: Mon Nov 12, 2001 7:58 pm
Location: Ontario, Canada
Has liked: 0
Been liked: 0
Contact:

Solution to VirtualDub Audio (and Video) Conversion Problems

Post by kRYPT_ » Thu Feb 14, 2002 2:18 pm

Ok, here are the results of my testing, and research:

- If you want audio/video streams that don't desync, you cannot use the Radium codec. BUT if you are running Windows 2000, then you MUST HAVE IT INSTALLED or VirtualDub will give an audio initilization error.

- A good codec (usable from VirtualDub) is LAME. It comes in 2 parts:

LAME ACM Codec 0.9d
and
LameCom

To install, first unzip LameCom and follow the directions (basically you need to regsvr it), and then unzip LameACM, right click the install.inf and choose install.

Remember, if you're using Windows 2000, you MUST also have the Radium codec installed (you can get it above)

- At this point I will assume you have the DivX 4.12 codec installed. If not, get it here and install it.

- If you do not already have VirtualDub then now is a good time to go download it. If you're planning on working with ASFs, you will need to get a hacked version of VirtualDub known as 1.4c-asf from Doom9 (click Download, then click "full listing" beside AVI Editing tools).

- Open VirtualDub and load your file. Click Video, and make sure Full Processing mode is on. Now go to Video -> Compression and
Set the video settings to what you want (Divx 4.12, 500kbps works nicely), make sure it's set for 1-pass encoding and click OK. Now enable Audio -> Full Processing Mode.

Go to Audio -> Conversion and set the Sampling Rate and Channels to either 22050/stereo or 44100/mono. Check the High Quality box, and click OK.
Now click Audio -> Compression and select MPEG Layer-3 from the list. Note that there may be more then one, but you want the one that says (Lame) after each of the bitrates. Select either 64kbit 22050 Stereo (lame), or 64kbit 44100 Mono (lame), depending on what conversion mode you picked above. Do NOT mess this up, or the audio will be really nasty.

You can now click File -> Save As, give your composition a name, and sit back and relax. Burn onto a CDR, pop into DC, and it should play.

Hope this helps those who are having troubles.

-kRYPT_
Last edited by kRYPT_ on Tue Mar 12, 2002 12:02 pm, edited 2 times in total.
Dr Wily
Has liked: 0
Been liked: 0

Post by Dr Wily » Thu Feb 14, 2002 5:40 pm

I was gonna do this myself, but you saved me the bother, so...

TOPIC STICKIED

And as a special bonus...

Converting Other Media Types to DCDivX compatibility

DVD to DivX - Get a copy of Gordian Knot from Doom9's download section, follow the instructions to create an .avi using the recommended bitrates and resolutions but dont encode sound. Encode a seperate low rate stereo / higher rate mono as described above (or change your .ac3 file to a WAV) and then use Virtualdub to mux the audio to the video - you're best bet would be to change the video framerate to match the audio length if it says there is a difference at this pont to avoid a/v desynching

.AVI to DivX - easy - just use Virtual dub in full processing mode to convert any .AVI file (even DivX 3.11 encoded stuff) into DivX 4.1x encoded files. If you try to open an .avi file and you get an error message about MS patents, you need to go to...

.ASF / .WMV to DivX - Get a copy of VirtualDUB that supports .ASF files - 1.3c does natively, or there is an version that supports .asf available at Doom9 as well.

.MPEG to DivX - Again, just use VirtualDUB as though it was an .avi file. If there is a large amount of audio / video desync when converted, try ripping the MPEG file to both a video and an audio file, and them muxing them seperately

REAL to DivX - get a copy of TINRA (search on http://www.google.com as I dont have a URL to hand) which will convert for you. NB - you *need* Realplayer before TINRA will work, and if it was a VBR encoded .RM file, there may be some a/v desync; again, rip to seperate audio and video files then mux them to elminate this

Quicktime .MOV to DivX - for you Apple lovers :wink: - get yourself a copy of Rad Video Tools, open the file in question, and convert it to an uncompressed .AVI, then encode, resize etc in VirtualDUB using the .AVI to DivX instructions above


I think thats every possible video file out there covered... if I missed one let me know and I'll add it :lol:
discostu55555
DCEmu Respected
DCEmu Respected
Posts: 236
Joined: Wed Oct 17, 2001 7:44 pm
Has liked: 0
Been liked: 0

Post by discostu55555 » Thu Feb 14, 2002 7:32 pm

REAL to DivX - get a copy of TINRA (search on http://www.google.com as I dont have a URL to hand) which will convert for you. NB - you *need* Realplayer before TINRA will work, and if it was a VBR encoded .RM file, there may be some a/v desync; again, rip to seperate audio and video files then mux them to elminate this

Quicktime .MOV to DivX - for you Apple lovers - get yourself a copy of Rad Video Tools , open the file in question, and convert it to an uncompressed .AVI, then encode, resize etc in VirtualDUB using the .AVI to DivX instructions above
fyi, eo video ( http://www.eo-video.com ) will work for both of those formats and unlike tinra, you can also compress the audio at the same time (lets you select both audio and video codecs), and you can probably see how a direct conversion would be much better than converting to uncompressed avi (which gets huge with very small files)
kRYPT_
DCFactory Creator
DCFactory Creator
Posts: 597
Joined: Mon Nov 12, 2001 7:58 pm
Location: Ontario, Canada
Has liked: 0
Been liked: 0
Contact:

Post by kRYPT_ » Thu Feb 14, 2002 10:18 pm

Nyarlathotep wrote: .MPEG to DivX - Again, just use VirtualDUB as though it was an .avi file. If there is a large amount of audio / video desync when converted, try ripping the MPEG file to both a video and an audio file, and them muxing them seperately
However, VirtualDub won't do MPEG-2 (to my knowledge) and FlaskMPEG must be used.. In my opinion, it's the higher quality MPEG-1 decompressor, as it's optimized for both speed and quality..
fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

Post by fatheadpi » Fri Feb 15, 2002 9:29 am

I hate flask mpeg. Use DVD2AVI.
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
Dr Wily
Has liked: 0
Been liked: 0

Post by Dr Wily » Fri Feb 15, 2002 3:16 pm

True, (especially about uncompressed AVIs...)
True, (although I doubt many people will have MPEG2 files if they havent ripped them themselves)
and True :lol:

Keeping in the spirit of trying to answer most questions people may have about encoding to DivX (and theres been a few posts about this already...)

If you have audio but only a green screen video after encoding - you have one of two problems; Check the encoding properties on your movie (I do this while previewing the finished movie in BS PLAYER to make sure there arent any screen freezes. If your movie says it is encoded in DivX 3 anything or DivX 5 anything - *IT WILL NOT PLAY ANY VIDEO*. You MUST encode your file in DivX 4.1x.

If you *HAVE* a 4.1x encoded file, but just get a blank screen and audio then you have set up 2 pass encoding, but only encoded the first pass. Either set VDub to 2 pass *and let it run* (I would suggest you do this without audio to increase speed of encoding, and add the audio afterwards) or set VDub to 1 pass encoding and live with a quicker encoded but slightly worse quality encoding end product.
ZacMc
DCEmu Super Fan
DCEmu Super Fan
Posts: 2715
Joined: Fri Nov 16, 2001 11:16 am
Location: Milwaukee, WI
Has liked: 0
Been liked: 0
Contact:

VirtualDub settings for Dummies

Post by ZacMc » Thu Feb 21, 2002 1:30 pm

Video: FULL PROCESSING MODE
Filters:
Resize: Resize to 320x???. Note-Keep your aspect ratio. IE: your original video was 510x180 then your new settings should be 320x112. Here is the equation I used to find my new hight...(320/Width=X, X*Height=New Height) or (320/512=0.625,0.625*180=~112).
2:1 reduction: Use this instead of resize if your video is 640x480

Compression:
DivX Codec 4.xx or DivX 5, Bitrate of 300-700, I reccomend you use bitrate of ~500.
Performance/quality: Slowest.
Variable bitrate mode: 1-pass is the easiest and least time consuming way to encode (I reccomend this for newbs). 2-pass takes a longer but produces a better quality video. If you use 2-pass remember that you have to select first pass then save avi then select second pass and save avi.

Audio: FULL PROCESSING MODE (Settings Stolen from a post by KRYPT_)

Conversion: Use either 22050/stereo or 44100/mono. Check the High Quality box, and click OK.

Compression: Mpeg Layer-3, Select either 24kbit 22050 Stereo (lame), or 64kbit 44100 Mono (lame), depending on what conversion mode you picked above. Do NOT mess this up, or the audio will be really nasty.
Make sure audio compression/conversion rates match or Vdub will give you an error.
Last edited by ZacMc on Sat Mar 30, 2002 4:30 pm, edited 3 times in total.
ShadeEagle
DCEmu Newbie
DCEmu Newbie
Posts: 1
Joined: Mon Mar 04, 2002 8:13 pm
Location: Winnipeg
Has liked: 0
Been liked: 0
Contact:

Dunno if anyone said this yet...

Post by ShadeEagle » Mon Mar 04, 2002 8:14 pm

I've found that only Mode 1 CDs work on my Dreamcast. :!:

Keep this in mind, boys and girls! :D
ZacMc
DCEmu Super Fan
DCEmu Super Fan
Posts: 2715
Joined: Fri Nov 16, 2001 11:16 am
Location: Milwaukee, WI
Has liked: 0
Been liked: 0
Contact:

Post by ZacMc » Wed Mar 06, 2002 12:45 am

wscg posted this info...

i was constantly getting illegal operation and searched v-dubs site and found this...

"Compressing to DivX 4 fcomip st(0),st(1) Illegal instruction DivX!encore
DivX 4.11 and 4.12 will not work on a Pentium, Pentium MMX, or AMD K6/K6-2/K6-3 due to use of a Pentium Pro instruction. "

there ya go, if you had that problem... just go dl divx 4.0/4.1
i uninstalled the 4.12, installed 4.1 and it worked.
User avatar
Nyarlathotep
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 7390
Joined: Sat Jan 05, 2002 1:37 pm
Has liked: 0
Been liked: 0

Post by Nyarlathotep » Mon Mar 11, 2002 4:57 pm

ok, well I've been asked about this a couple of times...

Self-Booting CD with DivX Player and Movies on one CD with DSSBS

You will need the following programs:

DSSBSFinal (If you are using WIndows XP / 2K you will need the "choice" zip as well)
VirtualDUB
DCDivX"plain files" - if you cant find these, then use CDMageon a disk image version of the player to get the prescrambled 1st_read.bin, ip.bin and background.jpg

You will also require one of the folowing CD writing applications;

NERO / Disc Juggler/ Fireburner / CDRWIN

When you have all of the above, open up VirtuaDUB and follow these steps;

VirtualDUB:

file :arrow: open file (pick your movie, if its, say, something you've downloaded but haven't got all of, or something you were previously encoding that crashed at 99% check the pop up extended options box, and in the pop up menu select re-key keyframes - this will take awhile...)

(If VirtuaDUB crashes while opening a movie file under extended options, then your movie has errors - usually 'screen freezes'; you will need to repair the movie using a tool like AVIDefreeze - I warn you now, this is not fun :evil: )

video :arrow: make sure full processing mode is selected

video :arrow: compression :arrow: select Div Codec 4.1x (*NOT* DivX ; ) MPEG-4 x-Motion) :arrow: configure :arrow: variable bitrate mode 1 pass first pass, performance / quality slowest, output videobitstream at 500kbps and leave the rest on default

video :arrow: filters :arrow: add new filter :arrow: resize: if you want your movie in widescreen, turn your resolution into 320 x whatever height would be correct (ie if you had a film that was 640x240 the new size would be 320 x 120 and make sure expand frame and letterbox option is ticked, and put 320x240 as its resolution (use the preview to make sure it all looks correct) select Bicubic 1.00 as well

audio :arrow: make sure full processing mode is selected

audio :arrow: compression :arrow: MPEG Layer 3 (Note: by default VirtuaDUB will only display compatible bitrates - you're best sticking with the ones offered 'by default' even if there arent as many options) at 32kbit/s 24KHz, mono (4kB/s)

Now sit back and let VirtuaDUB do its thing - *this will take awhile*. To get the best encoding speed, make sure your PC isn't doing anything else, and you have VirtualDUB running as your 'top' window. If you really must be doing stuff while you wait for it to encode I suggest you have as few as possible and nothing particularly memory intensive, and change VirtualDUBs processing thread priority to "highest"

You should now have a properly converted movie;

Take your DSSBS.zip file and extract it with folders intact to a temporary folder - C:\DSSBS for example.
In your DSSBS directory there will be a folder called "NEW". Cut and Paste your movie file(s) and the ip.bin, 1st_read.bin and background.jpg from the DCDivX zip file into that "NEW" folder.

Now run the DSSBS.BAT file that is in your DSSBS folder, and follow the onscreen prompts. When it has finished doing its thing, you will have a ready to burn disk image that is self booting with your film on the same CD. I have found you can get about 6 hours worth of film at very nice quality using the above settings on one 700MB CD :o
Image
IceBreaker
Insane DCEmu
Insane DCEmu
Posts: 270
Joined: Sat Mar 09, 2002 10:19 pm
Has liked: 0
Been liked: 0

Post by IceBreaker » Tue Apr 16, 2002 3:22 pm

Does virtualdub allow you to join video files? If it does, then I must be blind :lol:
Seriously though, I want to know. :?
Image

Is it me, or am I the man? 8)
User avatar
Nyarlathotep
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 7390
Joined: Sat Jan 05, 2002 1:37 pm
Has liked: 0
Been liked: 0

Post by Nyarlathotep » Tue Apr 16, 2002 6:21 pm

in the file menu, go to append Avi segment - if the framerate and resoltuions match, you can append as many clips to make a full length movie as you want...

wb Mr Spoon :wink:
Image
ZacMc
DCEmu Super Fan
DCEmu Super Fan
Posts: 2715
Joined: Fri Nov 16, 2001 11:16 am
Location: Milwaukee, WI
Has liked: 0
Been liked: 0
Contact:

Post by ZacMc » Wed Apr 24, 2002 12:49 pm

I've got clips to play with these settings..

Audio: MPEG Layer-3,39 kBit/s, 22,050 Hz, Stereo
Video: 320 x 240, 24 Bits, 39275 Frames, 29.970 Frames/Sec, 80 KB/Sec, DivX codec

So your video should play fine with Dc-DivX Beta3.
ZacMc
DCEmu Super Fan
DCEmu Super Fan
Posts: 2715
Joined: Fri Nov 16, 2001 11:16 am
Location: Milwaukee, WI
Has liked: 0
Been liked: 0
Contact:

Post by ZacMc » Wed May 01, 2002 2:18 pm

fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

Post by fatheadpi » Wed May 15, 2002 10:19 am

Hey I was gonna stick this in here real quick, i've been seeing a few people with audio problems lately, here's a few solutions that work all the time for me.

Problem: VDUB won't process a stream, gives me (insert audio error message here)

Solutions:

First, you need to see if the video stream will process out. Try this. First, open the file. Set audio to NO AUDIO, and DIRECT STREAM COPY.

Method 1: Set the video to direct stream copy. Go file --> Save AVI. It should just demux the video file.

Method two: If method one fails, process the video as normal, this will sometimes work.

Method three: Try saving the video to a decompressed format, either uncompressed avi for SMALL FILES, or try using a lossless codec, like the Huffman / Huffyuv 2.11 codec, or the Lossless codec library, both from http://www.divx-digest.com . Use segmenting for larger files.

Method four: When you open the file in vdub, check the popup extended open options box. In the box that pops up, check re derive keyframe flag. Continue as before.

Method five and six: Repeat step four, but try checking the avi compatibility mode box with and without rekeying the file.

Method seven: Get tmpgenc, http://www.tmpgenc.net . Set the avi file as the video source, file --> output to file --> avi file. I think tmpgenc only outputs to uncompressed avi, so beware.

Alright, theres every method I know for trying to get the video stream out of the file, maybe try a separate demuxer program, although if all these fail you've got a screwed up avi.

To extract the audio stream, two methods:

Method one: In vdub, set the audio to full processing mode, set compression to uncompressed pcm.

Oops, class is over, i'll finish posting on these later tonight.
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
CyberMick
Mental DCEmu
Mental DCEmu
Posts: 369
Joined: Sat Apr 20, 2002 10:54 am
Location: London, England, (UK)
Has liked: 0
Been liked: 0

Post by CyberMick » Sat Jun 08, 2002 3:34 pm

Shadow Eagle u must have the later DC as i have heard that has trouble reading CD-R's with certain modes.

I burn my DivX movies with Mode 2 and have never had a problem playing them in my DC.
Regards.

CyberMick.
ZacMc
DCEmu Super Fan
DCEmu Super Fan
Posts: 2715
Joined: Fri Nov 16, 2001 11:16 am
Location: Milwaukee, WI
Has liked: 0
Been liked: 0
Contact:

Post by ZacMc » Fri Aug 02, 2002 2:14 pm

Anyone that can't see the Mpeg Layer 3 audio codec in VirtualDUB should Install this.
Locked