blob: 00976ac81f3c0451139f3cf3c75a95ad7a61cecf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#! /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"
|