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
This commit is contained in:
Kieran O'Leary 2015-12-24 23:15:11 +00:00
parent 85f207b360
commit 8b8c43729f

View File

@ -594,18 +594,18 @@ path_name_and_extension_to_the_last_file</i></pre></dd>
<div class="well">
<h3>Create centered, transparent text watermark</h3>
<p>E.g For creating access copies with your institutions name</p>
<p><code>ffmpeg -i <i>input_file</i> -vf drawtext="fontfile=<i>font_path</i>:fontsize=<i>font_size</i>:text=<i>watermark_text</i>:fontcolor=<i>font_colour</i>:alpha=0.4:x=w/2-tw/2:y=h/2-th/2" <i>output_file</i></code></p>
<p><code>ffmpeg -i <i>input_file</i> -vf drawtext="fontfile=<i>font_path</i>:fontsize=<i>font_size</i>:text=<i>watermark_text</i>:fontcolor=<i>font_colour</i>:alpha=0.4:x=(w-text_w)/2:y=(h-text_h)/2" <i>output_file</i></code></p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-vf drawtext=</dt><dd>This calls the drawtext filters with the following options:
<dl>
<dt>fontfile=<i>font_path</i></dt><dd> Set path to font. For example in OSX: <code>"fontfile=/Library/Fonts/AppleGothic.ttf"</code></dd>
<dt>fontfile=<i>font_path</i></dt><dd> Set path to font. For example in OSX: <code>fontfile=/Library/Fonts/AppleGothic.ttf</code></dd>
<dt>fontsize=<i>font_size</i></dt><dd> Set font size. <code>35</code> 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.</dd>
<dt>text=<i>watermark_text</i> </dt><dd> Set the content of your watermark text. For example: <code>"text="FFMPROVISR HACK DAY NEVAR ENDS"</code></dd>
<dt>fontcolor=<i>font_colour</i> </dt><dd> Set colour of font. Can be a text string such as <code>"fontcolor=white"</code> or a hexadecimal value such as <code>"fontcolor=0xFFFFFF"</code></dd>
<dt>text=<i>watermark_text</i> </dt><dd> Set the content of your watermark text. For example: <code>text='FFMPROVISR HACK DAY NEVAR ENDS'</code></dd>
<dt>fontcolor=<i>font_colour</i> </dt><dd> Set colour of font. Can be a text string such as <code>fontcolor=white</code> or a hexadecimal value such as <code>fontcolor=0xFFFFFF</code></dd>
<dt>alpha=0.4</dt><dd> Set transparency value.</dd>
<dt>x=w/2-tw/2:y=h/2-th/2</dt><dd> Sets <i>x</i> and <i>y</i> coordinates for the watermark. These relative values will centre your watermark regardless of video dimensions.</dd>
<dt>x=(w-text_w)/2:y=(h-text_h)/2</dt><dd> Sets <i>x</i> and <i>y</i> coordinates for the watermark. These relative values will centre your watermark regardless of video dimensions.</dd>
</dl>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file.</dd>
</dl>