Skip to content

Instantly share code, notes, and snippets.

@parties
Last active June 10, 2021 22:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parties/f904397d56c700b275634f39002b5f8e to your computer and use it in GitHub Desktop.
Save parties/f904397d56c700b275634f39002b5f8e to your computer and use it in GitHub Desktop.

bash notes

ffmpeg

  • timelapse video
    # setpts multiplier: smaller is faster
    ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS" -an output.mp4
  • compress
    # simple optimization
    ffmpeg -i input.mp4 output
  • gif
    • simple: ffmpeg -i input.mp4 input.gif
    • optimize with convert: convert input.gif -verbose -coalesce -layers OptimizeFrame input_optframe.gif
    • final optimization with gifsicle: gifsicle -O2 input_optframe.gif -o optimized.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment