Skip to content

Instantly share code, notes, and snippets.

@dardo82
Last active Oct 17, 2019
Embed
What would you like to do?
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