Skip to content

Instantly share code, notes, and snippets.

@KoStard
Created December 29, 2020 22:12
Show Gist options
  • Save KoStard/b9afbc7b5aa4887ffc2f2ecfaf3bef59 to your computer and use it in GitHub Desktop.
Save KoStard/b9afbc7b5aa4887ffc2f2ecfaf3bef59 to your computer and use it in GitHub Desktop.
How to specify and use external audio track for videos with VLC CLI
# --audio-track= using 1 here, as my video files have audio, but in different language, so after adding the second audio, it's index will become 1 (it's 0 based)
vlc --audio-track=1 \
video_file_path_1 \
:input-slave=external_audio_path_1 \
video_file_path_2 \
:input-slave=external_audio_path_2
#... You can continue this command for as many files you want
# This way you can start VLC with all your files already linked and easily move to next/previous episodes, instead of manually doing "Advanced Open File", specifying the external audio file and changing the track to the new one.
@KoStard
Copy link
Author

KoStard commented Dec 29, 2020

To run in non-terminal mode, use this open -a "/Applications/VLC.app/Contents/MacOS/VLC" --args ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment