Difference between revisions of "Documentation:Modules/marq"

From VideoLAN Wiki
Jump to navigation Jump to search
(→‎Time: New section with time command-line equivalents and an additional example)
m (Prepare for transclusion)
Line 4: Line 4:
  
 
== Options ==
 
== Options ==
 
+
<onlyinclude>{{Option
{{Option
 
 
|name=marq-marquee
 
|name=marq-marquee
 
|value=string
 
|value=string
Line 11: Line 10:
 
|description=Marquee text to display. Since VLC version 0.9.0 you can use [[Documentation:Play_HowTo/Format_String|format strings]] to display time information
 
|description=Marquee text to display. Since VLC version 0.9.0 you can use [[Documentation:Play_HowTo/Format_String|format strings]] to display time information
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-file
 
|name=marq-file
Line 17: Line 15:
 
|description=File to read the marquee text from
 
|description=File to read the marquee text from
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-x
 
|name=marq-x
Line 24: Line 21:
 
|description=X offset from upper left corner. (0.8.6d and prior: This is only if both marq-x and marq-y are positive)
 
|description=X offset from upper left corner. (0.8.6d and prior: This is only if both marq-x and marq-y are positive)
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-y
 
|name=marq-y
Line 31: Line 27:
 
|description=Y offset from upper left corner. (0.8.6d and prior: This is only if both marq-x and marq-y are positive)
 
|description=Y offset from upper left corner. (0.8.6d and prior: This is only if both marq-x and marq-y are positive)
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-position
 
|name=marq-position
Line 38: Line 33:
 
|description=Marquee position: 0=center, 1=left, 2=right, 4=top, 8=bottom, you can also use combinations of these values, eg 6 = top-right. (0.8.6d and prior: This is only used if marq-x or marq-y are negative)
 
|description=Marquee position: 0=center, 1=left, 2=right, 4=top, 8=bottom, you can also use combinations of these values, eg 6 = top-right. (0.8.6d and prior: This is only used if marq-x or marq-y are negative)
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-opacity
 
|name=marq-opacity
Line 47: Line 41:
 
|description=Marquee opacity. 0 is transparent, 255 is fully opaque
 
|description=Marquee opacity. 0 is transparent, 255 is fully opaque
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-color
 
|name=marq-color
Line 54: Line 47:
 
|description=Marquee color. Use the decimal value of the HTML color code
 
|description=Marquee color. Use the decimal value of the HTML color code
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-size
 
|name=marq-size
Line 63: Line 55:
 
|description=Font size in pixels. 0 uses the default font size (formerly represented by -1)
 
|description=Font size in pixels. 0 uses the default font size (formerly represented by -1)
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-timeout
 
|name=marq-timeout
Line 70: Line 61:
 
|description=Number of milliseconds the marquee must remain displayed. 0 means forever
 
|description=Number of milliseconds the marquee must remain displayed. 0 means forever
 
}}
 
}}
 
 
{{Option
 
{{Option
 
|name=marq-refresh
 
|name=marq-refresh
Line 76: Line 66:
 
|default=1000
 
|default=1000
 
|description=Number of milliseconds between string updates. This is mainly useful when using meta data or time format string sequences
 
|description=Number of milliseconds between string updates. This is mainly useful when using meta data or time format string sequences
}}
+
}}</onlyinclude>
  
 
== Examples ==
 
== Examples ==

Revision as of 06:09, 4 April 2019

Module: marq
Type Video sub-filter
First VLC version 0.8.0
Last VLC version -
Operating system(s) all
Description Overlays text on the video
Shortcut(s) -

The marq subfilter can be used to display text on a video. The time filter was merged with this filter in version 0.9.0.

Options

  • marq-marquee <string> : Marquee text to display. Since VLC version 0.9.0 you can use format strings to display time information default value: VLC
  • marq-file <string> : File to read the marquee text from
  • marq-x <integer> : X offset from upper left corner. (0.8.6d and prior: This is only if both marq-x and marq-y are positive) default value: 0 (0.8.6d and prior: -1)
  • marq-y <integer> : Y offset from upper left corner. (0.8.6d and prior: This is only if both marq-x and marq-y are positive) default value: 0
  • marq-position <integer> : Marquee position: 0=center, 1=left, 2=right, 4=top, 8=bottom, you can also use combinations of these values, eg 6 = top-right. (0.8.6d and prior: This is only used if marq-x or marq-y are negative) default value: -1 (formerly 5)
  • marq-opacity <integer [0 .. 255]> : Marquee opacity. 0 is transparent, 255 is fully opaque default value: 255
  • marq-color <integer> : Marquee color. Use the decimal value of the HTML color code default value: -268435456 (formerly 16777215 (0xFFFFFF, white))
  • marq-size <integer [0 .. 4096]> : Font size in pixels. 0 uses the default font size (formerly represented by -1) default value: 0 (formerly -1)
  • marq-timeout <integer> : Number of milliseconds the marquee must remain displayed. 0 means forever default value: 0
  • marq-refresh <integer> : Number of milliseconds between string updates. This is mainly useful when using meta data or time format string sequences default value: 1000

Examples

Example command line use (VLC 2.0.0 and newer):

% vlc --sub-source="marq{marquee=test,color=16776960} somevideo.avi
This example displays yellow test text in the top left corner of video

Example command line use (VLC 0.9.0 - 1.1.13):

% vlc --sub-filter "marq{marquee=\$t (\$P%%),color=16776960}:marq{marquee=%H:%M:%S,position=6}" somevideo.avi
% vlc --sub-filter 'marq{marquee=$t ($P%%),color=16776960}:marq{marquee=%H:%M:%S,position=6}' somevideo.avi
This command line will show the stream's title ($t) and current position ($P) in the upper left corner and the current time in the upper right corner. Note that we have to escape $ characters when running this from command line in UNIX shells (this is why we use \$ instead of $). The second line uses single quotes to delimit the string so we don't need to escape the $ character.
On windows the command line would be:
C:\Program Files\VideoLAN\VLC\>vlc.exe --sub-filter=marq{marquee=$t ($P%%),color=16776960}:marq{marquee=%H:%m%s,position=6} somevideo.avi

Example command line (All versions including VLC 0.8.6d and prior):

% vlc --sub-filter=marq --marq-marquee="Obvious Watermark" --marq-position=0 --marq-size=50 --marq-opacity=25 --marq-color=32768 somevideo.avi
This command will show centered transparent green text. Text sized too large to fit the video window will not appear, and may crash VLC.

Time

The time module has different command-lines than the marq module. This not-functional command snippet overlays a white 12-point time display in the lower left of an input stream or video:

time:

% vlc input_stream --sub-filter=time --time-format %Y-%m-%d,%H:%M:%S --time-position 9 --time-color 16777215 --time-size 12

marq equivalent:

% vlc input_stream '--sub-source=marq{marquee="%Y-%m-%d,%H:%M:%S",position=9,color=16777215,size=12}'

marq equivalent (long form):

% vlc input_stream --sub-source=marq --marq-marquee="%Y-%m-%d,%H:%M:%S" --marq-position=9 --marq-color=16777215 --marq-size=12

additional marq example:

% vlc input_stream '--sub-source=marq{marquee="%c (Week %V)",color=16711680,opacity=216,size=16,position=4,timeout=500,refresh=1000}'

This overlays a 25%-transparent flashing red 16-point locale-dependent time representation with week number at the top of the input stream or video.

See also

Source code

Help VideoLAN by adding an image to this page!
Create an account and then upload.
This page is part of official VLC media player Documentation (User GuideStreaming HowToHacker GuideModules)
Please read the Documentation Editing Guidelines before you edit the documentation
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.