Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » How do I add a seperate audio commentary track to a video file?

This thread is locked; no one can reply to it. rss feed Print
How do I add a seperate audio commentary track to a video file?
Andrei Ellman
Member #3,434
April 2003

Hi,

Me and some friends just recently made a DVD-commentary style commentary to a TV-programme we put together many years ago. What's the best way to create an AVI file with the video, original audio and the commentary track bundled together? What program/add-on is needed to play the resulting AVI file with the ability to switch between the different audio-tracks?

I am thinking of using an AVI file with XVID for the video, and using mp3 for the audio. Any suggestions to alternatives to these formats would also be welcome (I have the original video in MJPEG format and the audio in WAV format).

Any suggestions?

AE.

--
Don't let the illegitimates turn you into carbon.

Marcello
Member #1,860
January 2002
avatar

Don't use avi, use a different container, such as mkv. That can hold the xvid video then multiple audio tracks (and stuff like subtitles). As for how you actually make the files, I don't know offhand.

Marcello

Oscar Giner
Member #2,207
April 2002
avatar

ogm also suports several audio tracks, and if you use Media Player Classic, it's very easy to change the current track.

To make these files you can use VirtualDub Mod (a mod of VirtualDub that adds ogm support, among other features (I think mkv support is one of them, too)).

Thomas Harte
Member #33
April 2000
avatar

Slight divert, but I am aware that mov (the Apple Quicktime container) has been selected as the standard MPEG4 container, largely because it offers "in place" editing (i.e. it uses an extra dereference to find data so that if you cut bits out or put bits into your movie then the data doesn't have to be moved around the file and/or reencoded if no longer in sync with the keyframes).

Has support for that started to trickle down to third party apps as a result?

jhuuskon
Member #302
April 2000
avatar

I suggest there is no reason to steer away from AVI if it doesn't limit you. It's still the most and best supported container format. AVI can contain up to 3 audio tracks each encoded with what ever codec is most suitable.

You don't deserve my sig.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

I suggest there is no reason to steer away from AVI if it doesn't limit you. It's still the most and best supported container format. AVI can contain up to 3 audio tracks each encoded with what ever codec is most suitable.

Ogg/ogm can contain any number of tracks, either video or audio. It's also a lot easier to parse through than AVI, IMO.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

jhuuskon
Member #302
April 2000
avatar

Yes. But if you don't NEED more than 3 audio tracks, there's no point. Ogg/ogm is not as well supported (i have yet to see a directshow decoder that works on my box, mpeg4 has been around for ages) and who cares how easy it's to parse through? People who write codecs might care, but that was not the purpose of the original question.

If you want to distribute a movie to your friends, bigger chances are your average joe sixpack doesn't have ogg decoders, but it seems most of them actually understand why some .avi files require different codecs (well my friends do, and they're not exactly computer literate).

You don't deserve my sig.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Ogg/ogm is not as well supported (i have yet to see a directshow decoder that works on my box, mpeg4 has been around for ages)

MPEG-4 has nothing to do with this (it's a video compression format, nothing to do with the container format). Though I've never had a problem with Ogg/ogm files in WIndows or Linux myself. Crtain video formats yeah, but nothing a quick codec search didn't cure.

Quote:

If you want to distribute a movie to your friends, bigger chances are your average joe sixpack doesn't have ogg decoders

http://www.illiminable.com/ogg/ :) They aren't going to distribute themselves.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

jhuuskon
Member #302
April 2000
avatar

Quote:

MPEG-4 has nothing to do with this (it's a video compression format, nothing to do with the container format).

The average Joe most likely already has all that is required to play AVI/Xvid.

I just recently downloaded those. Simply put; they do their job like a russian-made glass-handle mallet.

You don't deserve my sig.

Marcello
Member #1,860
January 2002
avatar

Actually the average joe probably can't play XVid, since the average joe didn't install any codecs that didn't come with windows media player.

Marcello

Andrei Ellman
Member #3,434
April 2003

I agree with jhuuskon's comments about Joe Sixpack - some of the intended audience of the movie will panic if they see a MKV or OGG file. Ideally, I'd like to play the video on a Windows box with the minimum of software-installation / configuration. I'd also want to be able to play it on a Linux-box - hence any Microsoft-proprietary formats such as WMV are out.

I've chosen XVID as the video file format because it's a good all-round video-compression format that has a good compression ratio and it's open-source. As no Windows installation comes with XVID installed as standard, I'll have to make compromise on minimum software-instalation. Also, if I encode multiple audio-tracks to an AVI file, do I need to install anything else to be able to play the extra tracks and to select which track is being played? If so and this extra program isn't installed, will such an AVI file play with just the default soundtrack? To keep the software-installation to a minimum, I've decided to use MP3 for the Audio (both the original soundtrack and commentary are each in mono). Do you think I should use one of the newer formats like M4A, AAC, AC3, etc. instead, and do any of them come as standard on a Windows installation?

And finally, I've noticed that VirtualDub only lets you mix one sound-track in the AVI file. Do I need VirtualDubMod for this, or is VirtualDubMod only for things like OGSs and MKVs?

AE.

--
Don't let the illegitimates turn you into carbon.

jhuuskon
Member #302
April 2000
avatar

Quote:

Actually the average joe probably can't play XVid, since the average joe didn't install any codecs that didn't come with windows media player.

Those Joe Sixpacks i've met have understood, surprisingly so.

Quote:

Also, if I encode multiple audio-tracks to an AVI file, do I need to install anything else to be able to play the extra tracks and to select which track is being played? If so and this extra program isn't installed, will such an AVI file play with just the default soundtrack?

Playing AVI files with multiple audio tracks require the use of a switcher filter such as Morgan Stream Switcher, otherwise you'll end up hearing all the audio tracks at once.

Quote:

Do you think I should use one of the newer formats like M4A, AAC, AC3, etc. instead, and do any of them come as standard on a Windows installation?

You'll end up again needing more codecs if you do. Only decoder for some of those come with windows.

You don't deserve my sig.

Andrei Ellman
Member #3,434
April 2003

Hi,

Just tried installing Morgan Stream Switcher and used VirtualDubMod to create an AVI with two audio-streams. I can switch between the two streams just fine when using Media Player Classic (this works with either MSS or MPC's built in stream-switcher), but when I use Windows Media Player 9, the primary stream works OK, but when I switch to the secondary stream, it sounds like it's been speeded up by several orders of magnitude. The AVI contains an XviD (450kbps), and two mp3s @ 48kbps mono (encoded with the Lame mp3 codec). As both mp3s and the video are of exactly the same length and the mp3s were encoded with the same paramaters, I don't see why MPC has trouble with the second one. Any ideas?

I also notice that MSS is a Windows only program. What program would I need to switch the AVI's audio streams on other OS's?

Thomas Harte said:

Slight divert, but I am aware that mov (the Apple Quicktime container) has been selected as the standard MPEG4 container

I thought that the standard container for MPEG-4 videos was mp4. But to make things confusing, MPEG-4 video-streams are called mp4, and the MPEG-4 audio streams which should be caled m4a are sometimes also called mp4 (presumably to make them sound like the successor to mp3). These audio streams are even called aac as well. I'm not really sure howmany mpeg-4 audio-standards there are out there, but until this mess is sorted out, I'm sticking with mp3s.

AE.

--
Don't let the illegitimates turn you into carbon.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

I also notice that MSS is a Windows only program. What program would I need to switch the AVI's audio streams on other OS's?

mplayer can play different audio tracks just fine in Linux, using the -aid parameter.. although it doesn't really tell you there's multiple audio streams unless you use -v, which causes more output that may just be missed. Just make sure to mention there's two audio tracks where you provide a download link, and mplayer users should be fine.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Crazy Photon
Member #2,588
July 2002
avatar

I second Oscar's suggestion about using .ogm, even though they have to intall the codec, it is worth the effort and it's usually the common "next, next, finish" installation. Wiht Linux you usually have the codec installed as well. The ones I've seen actually use xvid for the video too...

-----
Resistance is NEVER futile...

Andrei Ellman
Member #3,434
April 2003

Just had another go at it, and still, whenever I try to play the second stream in Windows Media Player 9 (WMP), it's speeded up and stops arfer a second or two, and then plays the first stream. The first stream plays OK if that's selected. I've tried it on Media Player Classic (MPC) and BSplayer and in both cases, they work just fine for both tracks.

I have tried increasing the bitrate from 48 to 56bps, changed the audio-interleave from 1 frame to 5 frames, toggled VirtualDbMod's "Do not correct MPEG Layer III audio streams" option, and even tried using the Frauenhofer MP3 encoder instead of the Lame MP3 encoder, but none of these changes solved anything.

Is there something that I've missed out, or should I demand that anyone who wants to listen to the second audio track install MPC? Bear in mind that I want to keep the number of programs to install down to a minimum. So far, I've got XVID and Morgan Stream Switcher.

AE.

--
Don't let the illegitimates turn you into carbon.

Thomas Fjellstrom
Member #476
June 2000
avatar

Xine can switch audio tracks at play time. nice little gui drop down on the main interface for it.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Andrei Ellman
Member #3,434
April 2003

Unfortunately, installing Xine means installing another media-payer. I'd like the second audio track to play properly on WMP 9 with MSS. Is it possible to do encode my audio-tracks in such a way as they can both be played in WMP, or should I just give up on supporting WMP 9?

AE.

EDIT: Nobody seems to know about the WMP 9 problem, so I'll just dish-out the credits before this thread is closed.

EDIT2: Argh, the credits don't seem to work if all I'm doing is an edit. Could someone please bump this thread to I can hand out credits?

--
Don't let the illegitimates turn you into carbon.

Go to: