Skip to content

Instantly share code, notes, and snippets.

Last active Oct 17, 2019
What would you like to do?
Join MP4s per subdir
for dir in * do # join MP4 per subdir
txt="$dir.txt"; gfind $dir/*.mp4 -fprintf $txt "file '%p'\\n"
ffmpeg -f concat -safe 0 -i $txt -c copy $dir.mp4; rm -v $txt
# ffmpeg -f concat -safe 0 -i <(printf "file '$PWD/%s'\n" ./*.mp4) -c copy output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment