[FFmpeg-devel] [PATCH] watermark.c Alpha Channel Patch Submission

Phill Clarke phillclarke
Tue Sep 8 14:20:48 CEST 2009


Hello All,

Attached is a patch for the vhook watermark.c utility.

This patch means watermark.c now obeys the alpha channel in a PNG
file. The ?m option is the mode, this must be 2 for alpha blending.
The watermark image is applied to the input video and then scaled with
the input video to the output video?s dimensions. So best to make an
image the same dimensions as the input video, otherwise you?ll get
horrible scaling effects.

Usage:
ffmpeg ? -vhook ?/usr/local/lib/vhook/watermark.so ?m 2 path/to/image.png? ?

(replace /usr/local/lib/vhook with wherever your watermark.so is.)

I realise that this is now deprecated in the main FFmpeg trunk, but I
still wanted to post this update back to the list, as it may be useful
for some.

This patch has been tested and used against the FFmpeg 0.5 release.

Credit for the patch goes to Tim MacFarlane - http://refractalize.blogspot.com/

Regards,
Phill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: watermark.patch
Type: application/octet-stream
Size: 5681 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090908/fafbc78a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: watermark.c
Type: application/octet-stream
Size: 27875 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090908/fafbc78a/attachment-0001.obj>



More information about the ffmpeg-devel mailing list