Concat mp4 file with ffmpeg
Concat mp4 file with ffmpeg
**Concatenated’’ video files (e.g. *.mp4) specified in *.txt file ‘‘created’’ on the file
Example: If you got *.mp4 files starting from: 1 to 46
1
2
3
file sound.mp4
file 46-Con-xyz-rendered.mp4
file sound.mp4
1
2
3
4
5
6
for i in {1..46}; do
    file=$(echo ${i}-*-rendered.mp4);
    touch ${file};
    echo -e "file sound.mp4\nfile ${file}\nfile sound.mp4" > ${file%.mp4}.txt;
    ffmpeg -f concat -safe 0 -i ${file%.mp4}.txt -c copy ${file%.mp4}-final.mp4;
done
 This post is licensed under  CC BY 4.0  by the author.
