A frei0r video source plugin that renders Lottie animation files.
Supported parameters are:
animation
- a path or URL to a Lottie animation JSON filetime_scale
- time scale multiplier (default 1.0).ffmpeg
reports frei0r times in milliseconds so use0.001
to convert to seconds.mode
- playback modeforward
(default),reverse
,bounce
orreverse-bounce
loop
- loop animation (default false)fit
- how to fit animation to video frame:contain
(default),fill
,cover
,fit-width
,fit-height
ornone
background_color
- background color of animation, default is transparent
Download the plugin release and extract into a frei0r-plugin
directory.
On macOS you must then xattr -dr com.apple.quarantine l0ttie.so
.
Example using ffmpeg to overlay a transparent animation over a video. The animation is half the size of the video and positioned in the lower right corner.
FREI0R_PATH=frei0r-plugin/ ffmpeg \
-i https://sample-videos.com/video321/mp4/360/big_buck_bunny_360p_1mb.mp4 \
-f lavfi -i "frei0r_src=size=320x180:framerate=25:filter_name=l0ttie:filter_params=https\\\\://lottie.host/b5100a40-ab25-4a1e-8ac4-88b63f3f1018/Nd2wTOGBRS.json|0.001" \
-filter_complex overlay=x=main_w-overlay_w:y=main_h-overlay_h:eval=init \
-t 2 -y output.mp4
output.mp4
A similar command using melt
from MLT framework
FREI0R_PATH=frei0r-plugin/ melt \
https://sample-videos.com/video321/mp4/360/big_buck_bunny_360p_1mb.mp4 out=60 \
frei0r.l0ttie 0=https://lottie.host/b5100a40-ab25-4a1e-8ac4-88b63f3f1018/Nd2wTOGBRS.json out=60 \
-mix 60 -mixer affine scale_x=2 scale_y=2 halign=right valign=bottom