Skip to content

Instantly share code, notes, and snippets.

@charlee
Last active January 19, 2022 15:05
Show Gist options
  • Save charlee/4522801 to your computer and use it in GitHub Desktop.
Save charlee/4522801 to your computer and use it in GitHub Desktop.
ffmpeg tips
# losslessly concat mp4 files
ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment