Skip to content

Instantly share code, notes, and snippets.

@mperlet
Created June 10, 2017 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mperlet/563055c0b7df5f2af8968568d685ab21 to your computer and use it in GitHub Desktop.
Save mperlet/563055c0b7df5f2af8968568d685ab21 to your computer and use it in GitHub Desktop.
Merge mp4 files with ffmpeg in one bash line
# input current mp4 files, output: merged.mp4
ls *mp4 | sed "s#^#file '#g" | sed "s#\$#'#g" > tm.txt && ffmpeg -f concat -safe 0 -i tm.txt -c copy merged.mp4 && rm tm.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment