#! /usr/bin/env nix-shell #! nix-shell -i bash -p ffmpeg # # 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 # #-s hd1080 \ # -c:v libx264 \ # -b:v 15M \ # -preset slow \ # -crf 10 \ ffmpeg -i "$1" \ -crf 10 \ -filter:v "setpts=0.25*PTS" \ -q 0 \ -an "$2"