Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder with a MP3 audio file and an video file. Both named the same.

  • Example.mp3
  • Example.mp4

I want to play the video and add the sound.
Both files should stay the same and I do not want any new file with both in it.

Is there a way to get it done with the command line?

share|improve this question
Just a start for others who want to help: Theoretically VLC can do this via its GUI. Next step would be to find the correct command line syntax – nixda Dec 8 '13 at 11:52
OK i did manage to find the Command line Syntax its: % vlc audiofile --input-slave videofile – Atlus Dec 13 '13 at 0:21
Please post your solution as an answer. You could and should also accept your own answer – nixda Dec 14 '13 at 16:56

How to play a soundless video and add a audio file at the same time?
I want to play the video and add the sound.

With the (experimental) --input-slave swtich.

Is there a way to get it done with the command line?

If your video has no audio tracks, then you can simply use something like the following:

vlc example.mp4 --input-slave=example.mp3

If your video does have an audio track, then VLC will use that by default, so you have to specify the alternate track as so:

vlc exmaple.mp4 --input-slave=example.mp3 --audio-track=1

If your video has two audio tracks, then you would use --audio-track=2 and so on (the first track is 0, so the number you use for the external audio is equal to the number audio tracks in the video).

Also, you can (currently) only specify a single external audio track, so this will not work:

vlc example.mp4 --input-slave=example.mp3 --input-slave=example2.mp3

In this case, VLC only uses the last one specified.

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.