December 23, 2024

How to Mux and Demux Video Using MP4Box for Mac

Posted August 25, 2010 at 12:36am by iClarified · 113373 views
These are instructions on how to mux and demux mp4 video using MP4Box for Mac. You may want to do this if you wish to replace the audio track of a video or movie without re-encoding.

Step One
Download MP4Box from here to your Desktop. It will be called "Pre-Compiled MP4Box (Mar 30, 2010)" and is in the downloads list on the right. Thanks to Penguin Software for compiling this.

Step Two
Double click the downloaded zip (MP4Box.zip) file to extract it.


Step Three
Open a new Terminal window from the Applications:Utilities folder


Step Four
Type cd ~/Desktop to navigate to your Desktop folder


Step Five
Make sure the video file you would like to demux is on your desktop then execute the following terminal command to extract track1 (ie the video track).

./MP4Box -single 1 'Original Video.mp4'

Note:* Replace the words "Original Video" with the name of your video file.

This will create a new video only file with "_track1" added to the end of its name.


Step Six
Make sure the audio file you would like to mux with your video is on the desktop then execute the following terminal command to combine the tracks.

./MP4Box -add 'Original Video_track1.mp4' -add 'New Audio.mp3' 'New Video.mp4'

Note* Replace the words "Original Video with the name of your video file. Replace the words "New Audio" with the name of your replacement audio file. Replace the words "New Video" with the desired output name for your newly muxed video.

This will create the new video file with the replaced audio track.


Step Seven
MP4Box has many powerful capabilities. Execute ./MP4Box in the terminal window to get help on the program's many options.