How do I add another audio stream to an MP4 file?

1

3

I've got an MP4 video file and I want to add another AAC audio track to it. I've tried YAMB and MeGUI (frontends for MP4Box) and it plays correctly in Zoom Player, but it picks the wrong track in WMP and plays both at once in Quicktime. I think this might have to do with designating the default audio track somehow.

Does anyone know how to specify the default audio track with YAMB/MeGUI or know of another way of adding a track to an MP4 file?

RandomEngy

Posted 2009-10-10T23:20:55.647

Reputation: 432

Answers

4

After a lot of scavenging around, I've found the best answer I believe. You need to use the Mp4Box command line interface to mux your MP4 file:

mp4box -new -add original_video.mp4 -add extra_track.m4a:disable output_file.mp4

This disable option will cause Quicktime to ignore that track and only play the main one. Quicktime doesn't have the ability to pick audio tracks because it's an awful piece of software, so that's the best you can do.

For WMP, you can switch audio tracks, by going to full screen mode, and then right clicking on the video. It's just that it picks the wrong track by default and you have to live with that. It's a bug in WMP.

RandomEngy

Posted 2009-10-10T23:20:55.647

Reputation: 432

0

Avidemux2 supports MP4 editing and adding audio streams.

Audacity should also let you do this, you will need the 1.3 Beta and FFMpeg. Instructions for installing both can be found here.

John T

Posted 2009-10-10T23:20:55.647

Reputation: 149 037

John T - I have installed Audacity as you describe but cannot see how to combine mp3 audio with mp4 video using it. Do you have documentation on how to do this? – None – 2010-03-11T02:30:47.080

Audacity does video muxing now? I thought it was a sound editing app. – RandomEngy – 2009-10-11T00:19:00.837

Yea, added more options. If you have trouble adding multiple streams, try mixing both together in audacity then adding them in avidemux. – John T – 2009-10-11T00:31:55.633

Avidemux doesn't let me add in an AAC track, which is standard to have with MP4 files. Also when I added in a secondary WAV track it didn't even add it on. I had the most success with YAMB and MeGUI, which are frontends for MP4Box. I got the output and it played correctly in ZoomPlayer, but WMP picked the wrong audio track and Quicktime played both at once. – RandomEngy – 2009-10-11T19:21:25.290

Avidemux2 supports AAC through the FAAC library. – quack quixote – 2009-10-18T22:46:16.030