From f3d72a01031f513d1cccf8af661b6ef09cfecc6d Mon Sep 17 00:00:00 2001 From: gutmet Date: Wed, 17 Feb 2021 10:56:49 +0100 Subject: [PATCH] concat video files with same codec --- concatVideos | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 concatVideos diff --git a/concatVideos b/concatVideos new file mode 100755 index 0000000..0aaf56b --- /dev/null +++ b/concatVideos @@ -0,0 +1,18 @@ +#!/bin/bash + +set -eu + +fullpath="$1" +source fileextensions + +timestamp=`stamp -filename` +tmplist="concatVideos-$timestamp.txt" +outfile="concatVideos-$timestamp.$extension" + +for file in "$@"; do + echo "file '$file'" >> $tmplist +done + +ffmpeg -f concat -safe 0 -i "$tmplist" -c copy "$outfile" + +echo "outfile: $outfile"