Created
July 18, 2018 19:33
-
-
Save jngnyc/235b3029e87b14a99c39ff1543e14ec4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
start_time=0 | |
duration=0 | |
fps=10 | |
scale=640 | |
palette="/tmp/palette.png" | |
filters="fps=$fps,scale=$scale:-1:flags=lanczos" | |
ffmpeg -v warning -ss $start_time -t $duration -i $1 -vf "$filters,palettegen" -y $palette | |
ffmpeg -v warning -ss $start_time -t $duration -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment