commit c6548e0dd37343e56337e504f5c99fdcb1db81e2 parent 1db2a5af55abd585592c0c4d2abd9b948f9daae3 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Thu, 4 Mar 2021 13:40:35 +0100 ffmpeg-combine: don't change extension for output and give sane output name Diffstat:
M | .local/bin/ffmpeg-combine | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/.local/bin/ffmpeg-combine b/.local/bin/ffmpeg-combine @@ -1,6 +1,5 @@ #!/bin/sh -filelist="combined.txt" -out="combined.mp4" +filelist="$(mktemp)" if [ $# -lt 2 ]; then echo "usage: $0 FILE1 FILE2 ..." >&2 @@ -16,5 +15,7 @@ if [ $? -ne 0 ]; then exit 1 fi -ffmpeg -f concat -safe 0 -i "$filelist" -c copy "$out" && rm -f "$filelist" +out="${1%.*}_combined.${1##*.}" +ffmpeg -f concat -safe 0 -i "$filelist" -c copy "$out" +rm -f "$filelist" printf '%s\n' "$out"