Use ffmpeg to make GIFs from videos
Go to file
2024-12-11 23:11:31 -05:00
Dockerfile A bunch of stuff, including outsourcing globs to the shell, positional input argument, more consistent edocs, and better Docker handling 2024-07-05 21:52:15 -04:00
README.md Update README.md and documentation in video_to_gif2.py 2024-12-11 23:11:31 -05:00
video_to_gif2.py Update README.md and documentation in video_to_gif2.py 2024-12-11 23:11:31 -05:00
video_to_gif.py Better input handling 2024-07-25 23:22:49 -04:00

video-to-gif

video_to_gif.py usage

usage: video_to_gif.py [-h] [-w WIDTH] [-r FRAMERATE]
                       [-s {fast_bilinear,bilinear,bicubic,experimental,neighbor,area,bicublin,gauss,sinc,lanczos,spline}]
                       [-i {none,dup,blend,mci}] [-t TAG]
                       INPUT [INPUT ...]

Use ffmpeg to make GIFs from videos

positional arguments:
  INPUT                 input file, supports passing a glob like /Users/MyName/Videos/*.mov

options:
  -h, --help            show this help message and exit
  -w, --width WIDTH     width of the GIF in pixels, respecting aspect ratio (default: 960)
  -r, --framerate FRAMERATE
                        framerate of GIF (default: 12)
  -s, --scaler {fast_bilinear,bilinear,bicubic,experimental,neighbor,area,bicublin,gauss,sinc,lanczos,spline}
                        scaling algorithm to use (default: lanczos)
  -i, --interpolate {none,dup,blend,mci}
                        interpolation method to use (default: none)
  -t, --tag TAG         optional tag included in file name

— Be gay and do crime

video_to_gif2.py usage

usage: video_to_gif2.py [-h] [-w WIDTH] [-r FRAMERATE] [-e] [-t TAG] INPUT [INPUT ...]

Use ffmpeg and gifski to make GIFs from videos

positional arguments:
  INPUT                 input file, supports passing a glob like /Users/MyName/Videos/*.mov

options:
  -h, --help            show this help message and exit
  -w, --width WIDTH     width of the GIF in pixels, respecting aspect ratio (default: 960)
  -r, --framerate FRAMERATE
                        framerate of GIF (default: 12)
  -e, --extra           increase quality at the expense of file size and encoding time
  -t, --tag TAG         optional tag included in file name

— Be gay and do crime

Docker

Docker only works for the video_to_gif.py script.

docker build -t video_to_gif:latest .
docker run --rm -it video_to_gif --help
docker run -it --rm -v "/Users/MyUsername/Movies/:$PWD" video_to_gif $PWD/my_movie.mov