Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a MP4 and MKV video file which also has its own Audio track. I want to add an additional track to it to cover another language for it, what Terminal or GUI way is there available to insert and sync a MP3 file to the already existing video so that:

  • The video shows 2 audio tracks (The existing one and the new one am inserting)
  • Optionally the video shows the name of the tracks
  • I can sync the new audio with the video
  • I do not replace the existing audio with the new one
  • Maintain the same video quality as before
    (It is a 1080p video with very high details. Do not want to mess with this since it takes way too long to get it right)

This would help in, for example, adding additional language sound tracks to an existing video.

share|improve this question

3 Answers 3

up vote 3 down vote accepted


mkvmerge GUI from mkvtoolnix-gui package.

enter image description here

  • Click add to select the video and audio files you want to merge.
  • In the Tracks, chapters and tags: box, select the new audio track (from the audio file you added), then you will be able to set its language (under General track options tab) and delay (under Format specific options tab).
  • Set the Output filename, then click Start muxing to save the video file.

You can also remove tracks and set the default audio track.

share|improve this answer
You know I had the tool but did not use it to this point. Thanks Eric. –  Luis Alvarado Jul 9 '13 at 3:32
@LuisAlvarado Sometimes I use avidemux, but I couldn't manage to save files with more than one audio track. It isn't as powerful as VirtualDub but it's very handy. –  Eric Carvalho Jul 9 '13 at 17:00
Works like a charm with MKV files! –  Yanick Rochon Jul 21 '14 at 0:07

For now this is what I have found (Still looking for the MKV way of doing it):


You would need to first install gpac package:

sudo apt-get install gpac

Now proceed with the following command:

MP4Box -new -add OriginalMovie.mp4 -add Track2.mp3#audio:delay=300 Output.mp4


  • MP4Box is the command to do this and yes it is capitalized
  • The first -new will tell MP4Box a new file will be created. You could put this at the end like "-new Output.mp4" but I wanted to put it in the beginning.
  • The first -add is to add the Original video file.
  • The second -add is to add the new track which I called Track2.mp3. It can have any other name.
  • The part that has the #audio:delay=300 is to tell MP4Box that this specific new track I am adding is an audio track and I need to add a Delay of 300 ms.

This way I can add the original video, insert a new track and even control the sync. The best part is, since MP4Box does not touch the video quality, it only takes a couple of seconds to add the Track, so I can test very quickly if the Audio delay is perfect or not.

Just in case, I extracted the sound from the other language like this:

avconv -i "AnotherSoundFile.mp4" Language.mp3

This would give me the mp3 sound track of that file and then I insert it to another file like I mentioned above.

share|improve this answer

you can use Yamb for editing mp4, which is like mkvmerge GUI but then for mp4box

or you can use MACHETE to edit MP4 files using a GUI to add / replace audio can also edit the video with it and edit other formats like MKV with it but its not free it costs $19.00

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.