Maps frames of a gif to audio based on its amplitude.
As with many multimedia programs, ffmpeg is required. Here are a couple guides.
You'll also want ImageMagick installed if you plan on using the liquid rescale ("content-aware scale") effect.
Gifsync currently isn't on PyPI since it's in an early state, but it can be run like a typical Python app. After cloning the repo:
pip install poetry # if you don't already have it
poetry install
It's also worth making sure that you have ffmpeg
in your PATH.
$ ffmpeg -version
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
<...>
For more info on tweaking the result, use the --help
/-h
flag. Basic usage is illustrated below.
poetry run python -m gifsync \
-a in_audio.mp3 \
-g in_gif.gif \
-o out_video.mp4