Last active
October 17, 2019 15:21
-
-
Save dardo82/5c3b4d7cbe48107b03a082bcad81949b to your computer and use it in GitHub Desktop.
Join MP4s per subdir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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