summaryrefslogtreecommitdiff
path: root/generate_video_poster.sh
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2023-06-15 15:58:59 -0500
committerluxagraf <sng@luxagraf.net>2023-06-15 15:58:59 -0500
commitab987e10f154f5536bb8fd936ae0966e909fa969 (patch)
tree9de5076f38b71ececb1bc94f8d9d19170898d603 /generate_video_poster.sh
added all my scriptssynced/master
Diffstat (limited to 'generate_video_poster.sh')
-rwxr-xr-xgenerate_video_poster.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/generate_video_poster.sh b/generate_video_poster.sh
new file mode 100755
index 0000000..0755ad9
--- /dev/null
+++ b/generate_video_poster.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# take in mp4, take screenshot at given interval, output same filename but with jpg extension
+FILE="$1"
+NEWFILE="${FILE%.mp4}.jpg"
+INTERVAL=$2
+echo "file - $FILE"
+ffmpeg -y -i $FILE -f mjpeg -vframes 1 -ss $INTERVAL $NEWFILE