Skip to content

Instantly share code, notes, and snippets.

@chriad
chriad / concat mp4 files
Last active April 19, 2018 08:28
concat mp4 files
find -name "* *" -type d | rename 's/ /_/g' # first directories
find -name "* *" -type f | rename 's/ /_/g' # first remove whitesape
# https://stackoverflow.com/questions/38996925/ffmpeg-concat-unsafe-file-name
find `pwd` -type f -name '*.mp4' -printf "file '%p'\n" > myfile
# https://trac.ffmpeg.org/wiki/Concatenate
ffmpeg -f concat -safe 0 -i myfile -c copy output.mp4