How to mix AC3 and Divx?

G

Guest

Guest
I used FairUse to encode the video but after encoding the tool said

"You should now mix audio"

I checked the directory, there is a Divx file + an AC3 file. I hoped Virtual Dub can do the job, but it can only mix WAV and avi.

Is there a tool that can mix AC3 and Divx avi?

Regards,

BTW: FairUse is really foolproof :) :) :) Highly recommended!!!

<font color=blue>Get a T-Bird...
Impressive CPU + House heater in one package. What do you need more?</font color=blue>
 

lakedude

Distinguished
Dec 31, 2007
271
0
18,930
0
Glad to see that you are enjoying FU. It is what I use too. I have never tried to mix an ac3 stream and I'm betting that if you check the file size that it is too big to use as is. I use mp3 because it is very efficient. VD with the VBR modification or nandub CAN take an mp3 and mix it with divx in about 2 minutes flat.

From doom9:

Step 2: Decode AC3 to MP3

Azid is one of the few good quality AC3 decoders and thanks to a nice GUI you won't even have to learn command lines and there's no better MP3 encoder than LAME. Using a nice GUI we are going to batch encode our AC3 directly to an MP3



AC3 to MP3 using azid & lame

Azid is the only high quality AC3 decoder besides DVD2AVIs built-in routines that is available for free. It's a command line utility and has loads of options. We're only going to talk about a few of them. Please refer to the readme file for a full rundown of all the options.

Lame is rapidly becoming the most popular MP3 encoder, and the fact that it's open source and in very active development certainly helps to that. As many open source programs lame is a command line utility, so again we're going to use the GUI by DanniDin. And as so many times there are so many options that I will only talk about very few of them, basically all the interesting ones for the task at hand, that is converting a WAV file to an MP3.

I'm going to illustrate the whole process using Danni Din's Azid/Lame GUI.

First of all you have to unzip both Azid, Lame and the GUI to the same directory, then launch the GUI.



Configuring the 3 marked location fields should be pretty straightforward. Click on each button and select azid.exe, your AC3 file and name and path of the desired output WAV file. The Target(WAV) field is optional if you chose to encode in batch mode as we're going to do but if you don't specify a path then the file will be written to your c:\ drive and in my case I happend to have the system partition on c:\ and not enough space left for large WAV files so I always specify a path.

The Command Line part will show you the command line that the GUI will launch when you press the Create WAV button.

This set of options allows you to set the volume level for the various channels. If you have a 5.1 channel AC3 (this is the default for most DVDs) you'll want to put the LFE (subwoofer) channel into the main stereo channels and reduce it's volume level to prevent distortion during explosions and such. Hence set it to -3dB.

How to find out what kind of AC3 you have? Press the Preview WAV button.

You'll get something like this:


Bitrate: 384 kbit (48 kHz)Mode: Complete Main (CM)Audio mode: 3/2 L,C,R,SL,SR+LFE

As you can see this is a 3/2 = 5 channel source. Furthermore it has an LFE channel so you should check the LFE To LR Channel option and put -3db there. In case of a 2.0 channel source you get something like this:

Bitrate: 192 kbit (48 kHz)Mode: Complete Main (CM)Audio mode: 2/0 L,R
In this case disable the box checked in the screenshot as this AC3 has no LFE channel.

The other interesting part is range compression and gain:

Dynamic Compression does the same your player does during playback, it reduces the dynamic range so that you can hear weak signals (like voice for instance) better. Using normal is the most sensible solution.

Also check Auto Find Maximum Gain to that azid will do a first pass to find the optimal gain and then amplify the whole track by that amount so you won't have to turn up the volume when watching the movie.

Now press the Lame1 button on the right.



In batch mode you can leave the Source (WAV) field emtpy as the program knows where to find the WAV file. Of course you have to fill in the path of lame.exe and the target mp3 file.

In the first screen select Joint Stereo mode, ATH Type 3 and Experimental PSY Tunings. If you get some strange effects disable the PSY Tunings again. Both ATH and PSY are especially handy for lower bitrate settings (1 CD).

Then press the Lame2 button on the right side of the GUI.

These options are the most interesting. If you simply want a regular MP3 file so you can check Use CBR and set a bitrate as you've done probably many times before.

ABR works exactly like CBR, but without the constraints of a constant bitrate. You specify an "average" bitrate at which it should normally give a better quality than the same size CBR.

Use VBR activates the true VBR mode. The old routine results in the highest quality but longest encoding time. If you need more speed you can try the New&Old Merger wich still gives reasonable audio quality, but don't use the new routine. Quality indicates the quality of the VBR mode, 0 is highest, 9 lowest. A minimum bitrate of 64kbit/s and max of 256kbit/s will give you a pretty decent quality, around an average of 160kbit/s. If you want a smaller file conside lowering these values, but I'd rather you go ABR or CBR in that case. When using CBR don't go lower than 128kbit/s. In fact even 128kbit/s CBR is sometimes not enough for decent quality. Those who have seen the Platoon rip know what I'm talking about. When there's rain in the background you need more than 128kbit/s for it to sound halfway decent.

The other Quality parameter is another quality measure for the overall quality and applies to all encoding modes. You can find more info about it in the readme but you don't have to set it as the default is just fine.

On the left side you'll find some interesting filtering options. You may consider using a lowpass filter at 19.5KHz but that's about it. Don't play around with these settings unless you fully understand them.

The 3rd option screen is all about ID3 tags and does not concern us either. All you have to do now is press the Create MP3 button and wait for completion of the process.

For a detailed overview of all the options please refer to the USAGE file that comes with lame.

The last step you have to do is to press the Batch Mode button.



Now drag&drop your AC3 file onto this window, then press the ac3 -> wav -> mp3 button (the middle button at the bottom of this window).

Site back and let it work.

>> BACK





Step 3: Join AVI and MP3

Now it's time to join AVI and MP3 in Nandub.

Multiplexing AVI and MP3

Nandub makes this process much easier and can handle any kind of MP3 file, not only CBR so it's the suggested program for this, not Virtualdub.

Start up Nandub and load your video (Control-O). Then set video to direct stream copy (Video - Direct Stream Copy).



Now you have to load the MP3 file. To so so simply select (VBR) MP3 audio from the audio menu which brings up a selection window where you can select the MP3 file.



If you have written down an audio delay in the process select the Interleaving option from the above menu:

Enter the delay value from your AC3 file in the Delay audio track by XY ms field. Negative values get a minus in front of course. Then press OK. There's no need to change the other values.

Make sure audio is also set to Direct Stream Copy, then press F7 and save the AVI under another name then the file you loaded at the beginning. If the audio is asynch after joining read how to make it synch.




Remember if you ain't Muslim you ain't Shiite.
 
G

Guest

Guest
Amazing lakedude.

I was not expecting to get such a HUGE reply.

Thanks mate :)

Gonna try it now, hurraaayyy!!!

<font color=blue>Get a T-Bird...
Impressive CPU + House heater in one package. What do you need more?</font color=blue>
 

ASK THE COMMUNITY

TRENDING THREADS