Skip to content

Instantly share code, notes, and snippets.

@nathanchere
Last active September 11, 2017 13:57
Show Gist options
  • Select an option

  • Save nathanchere/f000b8e29fa174da21869d79084f78f0 to your computer and use it in GitHub Desktop.

Select an option

Save nathanchere/f000b8e29fa174da21869d79084f78f0 to your computer and use it in GitHub Desktop.
Batch file for converting between video containers with ffmpeg
Usage: combine.bat mp4 m4a mkv
will combine all mp4 and m4a files into mkv containers
Assumes same file names other than extensions
for %%f in (*.%1) do call ffmpeg -i "%%~nf.%1" -i "%%~nf.%2" -vcodec copy -acodec copy "%%~nf.muxed.%3"
for %%f in (*.ts) do call ffmpeg -i "%%~f" -vcodec copy -acodec copy "%%~nf.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment