Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added documentation to header for alpha blending mode (2)

  • Loading branch information...
commit e5825b89f589c4ef1f7fc06d5e2c9b07987cbc6f 1 parent e338c75
@refractalize authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 ffmpeg/vhook/watermark.c
View
16 ffmpeg/vhook/watermark.c
@@ -3,7 +3,7 @@
* Copyright (c) 2005 Marcus Engene myfirstname(at)mylastname.se
*
* parameters for watermark:
- * -m nbr = nbr is 0..1. 0 is the default mode, see below.
+ * -m nbr = nbr is 0..2. 0 is the default mode, see below.
* -t nbr = nbr is six digit hex. Threshold.
* -f file = file is the watermark image filename. You must specify this!
*
@@ -36,6 +36,20 @@
* Note that the entire vhook argument is encapsulated in ''. This
* way, arguments to the vhook won't be mixed up with those for ffmpeg.
*
+ * MODE 2:
+ * Paste the watermark image onto the video image respecting alpha channels.
+ *
+ * Alpha channels are regularly found in PNG images and affect the tranparency
+ * of the image. If the pixel has 0x00 alpha value it is entirely transparent
+ * and the original video pixel is unchanged. If the alpha value is 0xff
+ * (100%) the watermark pixel is used entirely. Otherwise, the following
+ * formula is used:
+ *
+ * video_pixel = (1 - alpha) * video_pixel + alpha * watermark_pixel
+ *
+ * Example usage:
+ * ffmpeg -i infile -vhook '/path/watermark.so -f wm.png' -an out.mov
+ *
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
Please sign in to comment.
Something went wrong with that request. Please try again.