Dual language AVI files
As many of my readers come from non-English speaking countries many of them are looking for ways to better understand movies. One way is to have subtitles, which I've covered pretty well I think (correct me if I'm wrong). Another way is to simply encode the dubbed language track and that's no big issue either. But there has been a 3rd way around for a bit now: It's possible to have an AVI file containing two audio tracks. Initially introduced as alternative method to Micro DVD Player's dual audio feature which uses an external WAV file as secondary audio track by default, it's now a pretty common thing and there are players supporting this format natively and furthermore there's a filter for Windows Media Player which allows you to comfortably switch between multiple languages. I'm going to show you a variety of different ways to get multiple audio tracks.
You will need the following software for this guide:
Step 1: Preparations
You will need an AVI file without an audio track, two audio tracks in MP3, VBR MP3 or AC3 format and install the filters that come in the audiofilters pack. For installation instructions please refer to the readme. Also note that in order to have 4.0 or 5.1 / SPDIF output from your soundcard you will have to get a multichannel copy of WinDVD (2.x/3.0). If you don't know how to create an AVI check the DivX guides, if you have problems with the audio tracks take a look at the audio guides page.
Step 2: Add the two audio tracks
If you have CBR tracks (MP3 or AC3) you can alternatively use Avimux but Nandub allows much more flexibility. So start up Nandub, press Control-O to load your soundless AVI, set video to Direct Stream Copy (Video - Direct Stream Copy), then access the audio menu.
Should
be pretty clear what to do here. First load your primary soundtrack in the regular
menu, then set the Interleaving options for it (every frame as the default for
MP3 tracks, 96 or 64 ms for AC3, and lower if you get choppy playback). Then
click on Secondary Stream and set up the secondary soundtrack.
Once you're done press F7 and save the AVI under another name.
Step 3: Playback
There are two players known to me that support dual audiotrack AVIs out of the box: Power DivX NextGen 3.0 and BSPlayer. If you use one of them you do not have to worry about the upcoming steps.
If you use Windows Media Player you might like Morgan Stream Switcher. In fact you've already installed it if you have installed the audiofilter pack. If you don't like it you have to open the .bat/.cmd file for your operating system, edit the line that contains mmswitch.ax in it and replace "/s" by "/u", then copy it and paste it in Start - Run, then press OK. Here's a sample line for W2K: regsvr32 /u mmswitch.ax.
But now let's get in with the program. Open Notepad and create file that looks like this:
[MSS]
Audio_1=English (VO)
Audio_2=Français
It must start with the [MSS] line and then Audio_X= . Enter the name of the primary and secondary language in the file. WMP will show you these selections during playback if you right click in the video area and click on languages. But first you will have to save this file under the same name as your AVI. So let's assume that your movie is called matrix.avi, then this file must be called matrix.mss. Don't forget that Windows by default has the known extensions turned off so when you save make sure you select *.* in the filetype field so that you won't get a hidden .txt extension. Now all you have to do is double click on the AVI and when you want to switch the language during the movie right click, go to the language menu and select the track you want.
Note: You don't necessarily need the mss file, but without it you have to switch language as follows using Morgan Stream Switcher: During playback right click in the video are, select properties, go to advanced, select the morgan stream switcher, click on properties and press the Switch! button.
And we have yet another option. If you don't want to use the stream switcher, or if your favorite player doesn't support that filter and has no native dual audio support this is for you:
After creating the AVI start Graphedit and select Render Media File. You'll get something like this:
Now delete one of the MPEG Layer-3 Decoder rectangles and the Standard DirectSound Device that is connected to it as well. Then save the graph as .AVI. For instance here I delete the MPEG Layer-3 Decoder 00001 and the corresponding DS Device, then select File - Save as English.avi (once again make sure you have selected All *.* in the filetype field). Then render the AVI that contains the two audio tracks again, and this time delete the first MPEG Layer-3 Decoder and the corresponding DS device. Then save this as commentary.avi (I have put the commentary in this AVI). Now you will have two very small additional AVIs. When you click on English.avi now you'll get the movie with the English track, when you click on commentary.avi you'll get the movie with the commentary track.
There's just one catch: Graphedit writes absolute paths to the graph. But when you use removepath.exe that is in the audiofilters package you can remove these paths so you can copy the AVI wherever you want and it will still work. removepath is a command line application and works like this: removepath filename.extension. So for instance: removepath english.avi. Don't forget that you must not change the filename of the AVI when you use these graph files!
That's pretty much it. Enjoy your dual language AVIs.