[Libav-user] AVFilterGraph and an In-Memory Image

Stephen H. Gerstacker stephen at napkinstudio.com
Fri Feb 28 22:41:07 CET 2014


As a follow up, I attempted the following

Create a new “buffer” that I dump BGRA frames in to (that’s the format the watermark is in as memory).
Every time I add a frame to my original buffer, I add a watermark frame to my watermark buffer.
After the pad link, I added an “overlay” filter with the pad and watermark buffer as inputs, outputting to the buffersink.

This worked, but I loose the alpha transparency. Anything I can do to preserve that?

- Stephen



On Feb 28, 2014, at 9:54 AM, Stephen H. Gerstacker <stephen at napkinstudio.com> wrote:

> I'm making an AVFilterGraph in code. I need to apply a watermark to the video. 
> 
> My assumption is that I need to use the "movie" AVFilter to then overlay it. My watermark is just stored in memory, not in a file, so I'm unsure how to point the "movie" filter to use that watermark? 
> 
> Can someone clarify how I would do that?
> 
> My current filter graph is basically:
> 
> buffer -> (optional rotation) -> scale -> pad -> buffersink
> 
> The watermark would come in after the pad and overlaid there.
> 
> - Stephen
> 
> 
> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user



More information about the Libav-user mailing list