summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-06-14 13:42:57 -0700
committerBen Sima <ben@bsima.me>2018-06-14 13:42:57 -0700
commitd7d6894ea0c1a927d3ecd7340f70704ceb7669fd (patch)
treec8a9e6cb7e6b53fc6f9e4eca88577e4f65bfc170
parente3f2b18de458e7f15581a7abe44aa17f0c1558aa (diff)
Add timelapse script
-rwxr-xr-xtimelapse14
1 files changed, 14 insertions, 0 deletions
diff --git a/timelapse b/timelapse
new file mode 100755
index 0000000..cc7d470
--- /dev/null
+++ b/timelapse
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+#
+# Converts a regular video into a 4x timelapse.
+#
+# Research:
+# - https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
+# - 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
+#
+
+ffmpeg -i "$1" \
+ -vf "setpts=0.25*PTS" \
+ -q 0 \
+ -an "$2"