Last active
July 9, 2018 16:31
-
-
Save francoism90/f53e3779d26d50de7b6f9c48251af1ae to your computer and use it in GitHub Desktop.
Concat compatible video files using ffmpeg (in this case mp4)
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 | |
rm -rf .list.txt | |
for file in *; do | |
filename=$(basename -- "$file") | |
basename="${filename%.*}" | |
extension="${filename##*.}" | |
echo "file '$file'" >> .list.txt; | |
done | |
cat .list.txt && ffmpeg \ | |
-f concat \ | |
-safe 0 \ | |
-i .list.txt \ | |
-threads 0 \ | |
-c:v copy \ | |
-c:a copy \ | |
-scodec copy \ | |
"${basename}-concat.${extension}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment