<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Here’s the final output graph from my set up. To get the alpha properly, you need to force overlay to rgb, then format it back to yuv before the buffersink.<div><br></div><div><font face="Andale Mono">+-------------+<br>| watermarkIn |default--[439x102 1:1 bgra]--overlay:overlay<br>|  (buffer)   |<br>+-------------+<br><br>+----------+<br>|    in    |default--[640x960 0:1 yuvj420p]--pad:default<br>| (buffer) |<br>+----------+<br><br>                                           +-------+<br>in:default--[640x960 0:1 yuvj420p]--default|  pad  |default--[640x960 0:1 yuvj420p]--auto-inserted scaler 0:default<br>                                           | (pad) |<br>                                           +-------+<br><br>                                                           +-----------+<br>auto-inserted scaler 0:default--[640x960 0:1 bgra]-----main|  overlay  |default--[640x960 0:1 bgra]--auto-inserted scaler 1:default<br>watermarkIn:default-------------[439x102 1:1 bgra]--overlay| (overlay) |<br>                                                           +-----------+<br><br>                                                              +----------+<br>auto-inserted scaler 1:default--[640x960 0:1 yuv420p]--default|  format  |default--[640x960 0:1 yuv420p]--out:default<br>                                                              | (format) |<br>                                                              +----------+<br><br>                                              +--------------+<br>format:default--[640x960 0:1 yuv420p]--default|     out      |<br>                                              | (buffersink) |<br>                                              +--------------+<br><br>                                            +------------------------+<br>pad:default--[640x960 0:1 yuvj420p]--default| auto-inserted scaler 0 |default--[640x960 0:1 bgra]--overlay:main<br>                                            |        (scale)         |<br>                                            +------------------------+<br><br>                                            +------------------------+<br>overlay:default--[640x960 0:1 bgra]--default| auto-inserted scaler 1 |default--[640x960 0:1 yuv420p]--format:default<br>                                            |        (scale)         |<br>                                            +------------------------+</font></div><div><br></div><div><br></div><div><br><div>
<div>- Stephen</div><div><br></div><br class="Apple-interchange-newline">

</div>
<br><div><div>On Feb 28, 2014, at 4:41 PM, Stephen H. Gerstacker <<a href="mailto:stephen@napkinstudio.com">stephen@napkinstudio.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">As a follow up, I attempted the following<br><br>Create a new “buffer” that I dump BGRA frames in to (that’s the format the watermark is in as memory).<br>Every time I add a frame to my original buffer, I add a watermark frame to my watermark buffer.<br>After the pad link, I added an “overlay” filter with the pad and watermark buffer as inputs, outputting to the buffersink.<br><br>This worked, but I loose the alpha transparency. Anything I can do to preserve that?<br><br>- Stephen<br><br><br><br>On Feb 28, 2014, at 9:54 AM, Stephen H. Gerstacker <<a href="mailto:stephen@napkinstudio.com">stephen@napkinstudio.com</a>> wrote:<br><br><blockquote type="cite">I'm making an AVFilterGraph in code. I need to apply a watermark to the video. <br><br>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? <br><br>Can someone clarify how I would do that?<br><br>My current filter graph is basically:<br><br>buffer -> (optional rotation) -> scale -> pad -> buffersink<br><br>The watermark would come in after the pad and overlaid there.<br><br>- Stephen<br><br><br><br>_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>http://ffmpeg.org/mailman/listinfo/libav-user<br></blockquote><br>_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>http://ffmpeg.org/mailman/listinfo/libav-user<br></blockquote></div><br></div></body></html>