MP4Box is a powerful command-line tool that allows you to manipulate MP4 files. One of its useful features is the ability to set the default audio track and subtitle track in your MP4 files. In this article, we will guide you through the process of using MP4Box to set the default audio and subtitle tracks.
Step 1: Download and Install MP4Box
The first step is to download and install MP4Box on your computer. MP4Box is available for Windows, Mac, and Linux operating systems. You can download the latest version of MP4Box from the official GPAC website (https://gpac.wp.imt.fr/downloads/).
Step 2: Open the Command Prompt
Once you have installed MP4Box, open the command prompt on your computer. On Windows, you can do this by pressing the Windows key + R, typing "cmd", and pressing Enter. On Mac, you can open the Terminal application.
Step 3: Navigate to the MP4Box Directory
In the command prompt or Terminal, navigate to the directory where you have installed MP4Box. For example, if you have installed MP4Box in the "C:\Program Files\GPAC" directory on Windows, you can use the following command to navigate to that directory:
cd C:\Program Files\GPAC
Replace "C:\Program Files\GPAC" with the actual path where MP4Box is installed on your computer.
Step 4: Set the Default Audio Track
To set the default audio track in your MP4 file, you need to know the track ID of the desired audio track. You can use the following command to list the tracks in your MP4 file:
MP4Box -info input.mp4
Replace "input.mp4" with the filename of your MP4 file.
Once you have identified the track ID of the desired audio track, you can use the following command to set it as the default audio track:
MP4Box -setDefaultTrackID input.mp4#audio:trackID
Replace "input.mp4" with the filename of your MP4 file, and "trackID" with the actual track ID of the desired audio track.
Step 5: Set the Default Subtitle Track
Similar to setting the default audio track, you need to know the track ID of the desired subtitle track. You can use the following command to list the tracks in your MP4 file:
MP4Box -info input.mp4
Replace "input.mp4" with the filename of your MP4 file.
Once you have identified the track ID of the desired subtitle track, you can use the following command to set it as the default subtitle track:
MP4Box -setDefaultTrackID input.mp4#subtitle:trackID
Replace "input.mp4" with the filename of your MP4 file, and "trackID" with the actual track ID of the desired subtitle track.
Step 6: Save the Changes
After setting the default audio and subtitle tracks, you need to save the changes to your MP4 file. You can use the following command to save the changes:
MP4Box -inter 500 input.mp4
Replace "input.mp4" with the filename of your MP4 file.
Once the command is executed, MP4Box will save the changes to your MP4 file.
Conclusion
Setting the default audio and subtitle tracks in your MP4 files can enhance your viewing experience. With MP4Box, you can easily set the default audio and subtitle tracks using simple command-line commands. Follow the steps outlined in this article, and you will be able to set the default audio and subtitle tracks in your MP4 files in no time.
References
| Reference | Link |
|---|---|
| GPAC Official Website | https://gpac.wp.imt.fr/downloads/ |