Skip to content

Instantly share code, notes, and snippets.

@andreagalle
Last active March 13, 2020 20:49
Show Gist options
  • Save andreagalle/0262defae9e8e28b61944baff72eabb2 to your computer and use it in GitHub Desktop.
Save andreagalle/0262defae9e8e28b61944baff72eabb2 to your computer and use it in GitHub Desktop.
Given an MP4 video, merges two audio tracks into one, without re-encoding the video
#!/bin/bash
#ffmpeg -i $1 -strict -2 -filter_complex "amerge,pan=stereo:c0<c0+c2:c1<c1+c3" mono_$1
ffmpeg -i $1 -filter_complex "amerge,pan=stereo|c0<c0+c2|c1<c1+c3" -vcodec copy mono_$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment