summaryrefslogtreecommitdiff
path: root/bin/generate_video_poster.sh
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-02-16 15:57:40 -0500
committerluxagraf <sng@luxagraf.net>2020-02-16 15:57:40 -0500
commit2a9538f7711dcea71ba5702ca94a9d9c00287ea4 (patch)
treee0fe5ea7c909b01e10bf6a8dd4abcb619b6924c9 /bin/generate_video_poster.sh
parent3165ef5abdb298108efa2ba3d339f70ca966315a (diff)
added the rest of bin
Diffstat (limited to 'bin/generate_video_poster.sh')
-rwxr-xr-xbin/generate_video_poster.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/generate_video_poster.sh b/bin/generate_video_poster.sh
new file mode 100755
index 0000000..0755ad9
--- /dev/null
+++ b/bin/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