Skip to content

Instantly share code, notes, and snippets.

@dardo82
Last active October 17, 2019 15:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dardo82/5c3b4d7cbe48107b03a082bcad81949b to your computer and use it in GitHub Desktop.
Join MP4s per subdir
#!/bin/sh
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
done
# 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