KoblentsBlog Photography
Contact About
Ches
Concatenating Video Files With FFMPEG
Handy little script to concatenate video files. Probably wouldn't recommend it with dissimilar files, though.
123456789101112
#!/bin/bash

if [[ -z $1 || -z $2 ]]; then
        echo "Must supply at least two arguments.";
        return 1;
fi

ext=`echo $1 | sed -e "s/.*\.//"`;

ffmpeg -f concat -safe 0 \
       -i <(for f in "$@"; do echo "file '$PWD/$f'"; done) \
       -c copy output.$ext
Ches Koblents
February 28, 2017
 
« Newer Older »
© Copyright Koblents.com, 2012-2024