summaryrefslogtreecommitdiff
path: root/timelapse
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-06-27 08:04:42 -0700
committerBen Sima <ben@bsima.me>2018-06-27 08:04:42 -0700
commit775b30ea7c076d0cccec695e8498277133ed3429 (patch)
treefa7242ac6f9620f021cc979a884e0cae0d1ad96f /timelapse
parentf6444ff704b73e16977b1e0188a924e225a3ce3c (diff)
Improve timelapse script
Diffstat (limited to 'timelapse')
-rwxr-xr-xtimelapse15
1 files changed, 9 insertions, 6 deletions
diff --git a/timelapse b/timelapse
index f5a41be..00976ac 100755
--- a/timelapse
+++ b/timelapse
@@ -1,4 +1,5 @@
-#!/usr/bin/env bash
+#! /usr/bin/env nix-shell
+#! nix-shell -i bash -p ffmpeg
#
# Converts a regular video into a 4x timelapse.
#
@@ -7,12 +8,14 @@
# - https://superuser.com/questions/777938/ffmpeg-convert-a-video-to-a-timelapse#778425
# - https://superuser.com/questions/803453/ffmpeg-speed-up-video-but-keep-same-quality
#
+#-s hd1080 \
+# -c:v libx264 \
+# -b:v 15M \
+# -preset slow \
+# -crf 10 \
ffmpeg -i "$1" \
- -s hd1080 \
- -c:v libx264 \
- -preset slow \
- -crf 18 \
- -vf "setpts=0.25*PTS" \
+ -crf 10 \
+ -filter:v "setpts=0.25*PTS" \
-q 0 \
-an "$2"