Last active
December 4, 2022 09:59
-
-
Save tomnomnom/79b0b6ac2ef7035d867dc2f19e30549d to your computer and use it in GitHub Desktop.
Revisions
-
tomnomnom renamed this gist
Mar 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Because I'll forget how to do this... ffmpeg -i in.mp4 -filter:v "crop=900:700:0:50" out.mp4 ``` ## Generate Palette ``` ffmpeg -y -i out.mp4 -vf fps=5,scale=600:-1:flags=lanczos,palettegen palette.png ``` -
tomnomnom created this gist
Mar 13, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ Because I'll forget how to do this... ## Crop `crop=w:h:x:y` ``` ffmpeg -i in.mp4 -filter:v "crop=900:700:0:50" out.mp4 ``` ## Generate Pallet ``` ffmpeg -y -i out.mp4 -vf fps=5,scale=600:-1:flags=lanczos,palettegen palette.png ``` ## Convert to gif ``` ffmpeg -i out.mp4 -i palette.png -filter_complex "fps=5,scale=600:-1:flags=lanczos[x];[x][1:v]paletteuse" out.gif ```