Add watermark to a video using ffmpeg in python

8.1k views Asked by At

I want to add watermark for my video, with ffmpeg i found command:

ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=1500:1000" output.mp4

But it run in cli, not in python code(i cannot found). So have anyway to embbeded it to python code(not call in subprocess)? edit: i found pyffmpeg but no guide to use it too.

1

There are 1 answers

1
Tumpilli Samba On
from pyffmpeg import FFmpeg
ff = FFmpeg()
ff.options("-i input.mp4 -i watermark.png -filter_complex overlay=1500:10 output.mp4")