From 775b30ea7c076d0cccec695e8498277133ed3429 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 27 Jun 2018 08:04:42 -0700 Subject: Improve timelapse script --- timelapse | 15 +++++++++------ 1 file 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" -- cgit v1.2.3