2024-06-29 03:03:23 +00:00
|
|
|
# video-to-gif
|
2024-12-12 01:37:48 +00:00
|
|
|
## video_to_gif.py usage
|
2024-06-29 03:03:23 +00:00
|
|
|
```
|
2024-12-12 01:37:48 +00:00
|
|
|
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 ...]
|
2024-06-29 03:03:23 +00:00
|
|
|
|
2024-12-11 05:37:22 +00:00
|
|
|
Use ffmpeg and gifski to make GIFs from videos
|
2024-06-29 03:03:23 +00:00
|
|
|
|
2024-07-06 01:41:03 +00:00
|
|
|
positional arguments:
|
|
|
|
INPUT input file, supports passing a glob like /Users/MyName/Videos/*.mov
|
|
|
|
|
2024-06-29 03:03:23 +00:00
|
|
|
options:
|
|
|
|
-h, --help show this help message and exit
|
2024-12-11 05:37:22 +00:00
|
|
|
-w, --width WIDTH width of the GIF in pixels, respecting aspect ratio (default: 960)
|
|
|
|
-r, --framerate FRAMERATE
|
2024-07-06 01:41:03 +00:00
|
|
|
framerate of GIF (default: 12)
|
2024-12-11 05:37:22 +00:00
|
|
|
-e, --extra increase quality at the expense of file size and encoding time
|
|
|
|
-t, --tag TAG optional tag included in file name
|
2024-06-29 03:03:23 +00:00
|
|
|
|
|
|
|
— Be gay and do crime
|
2024-07-03 04:15:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Docker
|
2024-12-11 05:37:22 +00:00
|
|
|
Docker only works for the video_to_gif.py script.
|
2024-07-06 01:41:03 +00:00
|
|
|
```sh
|
2024-07-03 04:15:18 +00:00
|
|
|
docker build -t video_to_gif:latest .
|
2024-07-06 01:41:03 +00:00
|
|
|
docker run --rm -it video_to_gif --help
|
|
|
|
docker run -it --rm -v "/Users/MyUsername/Movies/:$PWD" video_to_gif $PWD/my_movie.mov
|
2024-06-29 03:03:23 +00:00
|
|
|
```
|