Reputation: 23
I'm a bit puzzled here and can't find an answer to the following question. Is it possible to have 2 .png
files watermarked into a video in a single command line with Libavfilter
?
I'm using this commandline, but everything I try to get the second PNG image in it fails.
ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]" outputvideo.flv
Upvotes: 2
Views: 6672
Reputation: 34011
This is certainly possible, and should look something like:
ffmpeg –i in.avi -vf "movie=logo1.png [logo1]; movie=logo2.png [logo2]; \
[in][logo1] overlay [tmp]; [tmp][logo2] overlay=50:50" out.flv
Both logo files are read in. One's overlaid at 0,0. Then the next is overlaid at 50,50 on the output from the first overlay filter.
Using more recent versions of FFmpeg, this command could be done slightly less verbosely like so:
ffmpeg -i in.avi -i logo1.png -i logo2.png -filter_complex "overlay [tmp]; \
[tmp] overlay=50:50" out.flv
The first overlay command overlays the first two inputs (in.avi and logo1.png), and the second automatically uses the third input (logo2.png) as its second input.
Upvotes: 7