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)
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.