Skip to content

Instantly share code, notes, and snippets.

@ggorlen
Last active May 16, 2022 02:15
Show Gist options
  • Select an option

  • Save ggorlen/d1be48ff7b8e4bb21306a0e41e16358d to your computer and use it in GitHub Desktop.

Select an option

Save ggorlen/d1be48ff7b8e4bb21306a0e41e16358d to your computer and use it in GitHub Desktop.
ffmpeg resources

ffmpeg

This is an unorganized dump of resources I've looked at for ffmpeg.

ffmpeg  -i ./example_image/outputfinal.gif -i ./example_image/qrborder.gif  -filter_complex "fps=24.999999999999996,overlay=0:0,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" D:/webbsites/seapad/adapter/finaloutput.gif

ffmpeg -i initialimage.gif -filter:v "setpts=(newdurationinMSeconds / initialDuration)*PTS" out.gif

and this speeds it up:

fmpeg -i  initialimage.gif -filter:v "setpts=(initialDuration / newdurationinMSeconds)*PTS" out.gif

ffmpeg -vsync 2 -safe 0 -f concat -i "file:concat.txt" -lavfi palettegen=stats_mode=diff[pal],[0:v][pal]paletteuse=new=1:diff_mode=rectangle -y "Test.gif"
ffmpeg -ss 30 -t 3 -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
final command with quality and overlay combined:
ffmpeg -i top.gif -i bottom.gif -filter_complex "overlay=0:0,fps=10,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif # commands separated by commas

with shortest=1:
 C:\Users\greg\Desktop\giff> ffmpeg -i walking.gif -i qrborder.gif -filter_complex "overlay=0:0:shortest=1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif

Normalizing audio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment