From 82c9b6f601de7f872a426b8307143602898c849d Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Wed, 31 Aug 2022 20:47:02 +0200 Subject: [PATCH] add ffmpeg shortcut script --- scripts/cut_video.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/cut_video.sh diff --git a/scripts/cut_video.sh b/scripts/cut_video.sh new file mode 100755 index 0000000..aa36d10 --- /dev/null +++ b/scripts/cut_video.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then + echo "Usage:" + echo " " + echo + echo "Example:" + echo "cut_video recorded.mp4 1:23 4:31 output" + echo "which would produce: output.mp4 and output_raw.mp4" + exit +fi + +ffmpeg -i "$1" -ss $2 -to $3 -c copy $4"_raw.mp4" +ffmpeg -i "$1" -ss $2 -to $3 $4".mp4"