From 8b8c43729ff27ee20466efe713f08d94ad7b7cac Mon Sep 17 00:00:00 2001 From: Kieran O'Leary Date: Thu, 24 Dec 2015 23:15:11 +0000 Subject: [PATCH] text_watermark - typos and x/y coordinate update @ablwr's comments applied, and x/y coordinates taken from ffmpeg docs https://ffmpeg.org/ffmpeg-filters.html#Examples-39 --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 8d0aab6..d9ca0ff 100644 --- a/index.html +++ b/index.html @@ -594,18 +594,18 @@ path_name_and_extension_to_the_last_file

Create centered, transparent text watermark

E.g For creating access copies with your institutions name

-

ffmpeg -i input_file -vf drawtext="fontfile=font_path:fontsize=font_size:text=watermark_text:fontcolor=font_colour:alpha=0.4:x=w/2-tw/2:y=h/2-th/2" output_file

+

ffmpeg -i input_file -vf drawtext="fontfile=font_path:fontsize=font_size:text=watermark_text:fontcolor=font_colour:alpha=0.4:x=(w-text_w)/2:y=(h-text_h)/2" output_file

ffmpeg
starts the command
-i input_file
path, name and extension of the input file
-vf drawtext=
This calls the drawtext filters with the following options:
-
fontfile=font_path
Set path to font. For example in OSX: "fontfile=/Library/Fonts/AppleGothic.ttf"
+
fontfile=font_path
Set path to font. For example in OSX: fontfile=/Library/Fonts/AppleGothic.ttf
fontsize=font_size
Set font size. 35 is a good starting point for SD. Ideally this value is proportional to video size, for example use ffprobe to acquire video height and divide by 14.
-
text=watermark_text
Set the content of your watermark text. For example: "text="FFMPROVISR HACK DAY NEVAR ENDS"
-
fontcolor=font_colour
Set colour of font. Can be a text string such as "fontcolor=white" or a hexadecimal value such as "fontcolor=0xFFFFFF"
+
text=watermark_text
Set the content of your watermark text. For example: text='FFMPROVISR HACK DAY NEVAR ENDS'
+
fontcolor=font_colour
Set colour of font. Can be a text string such as fontcolor=white or a hexadecimal value such as fontcolor=0xFFFFFF
alpha=0.4
Set transparency value.
-
x=w/2-tw/2:y=h/2-th/2
Sets x and y coordinates for the watermark. These relative values will centre your watermark regardless of video dimensions.
+
x=(w-text_w)/2:y=(h-text_h)/2
Sets x and y coordinates for the watermark. These relative values will centre your watermark regardless of video dimensions.
output_file
path, name and extension of the output file.