Documentation:Modules/marq
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) | marq , time
|
The marq subtitle filter can be used to display text on a video. The time filter was merged with this filter in version 0.9.0, adding time format string recognition. There are two methods of specifying position: coordinate and (since VLC 0.9.0) numbered positions.
Contents
Options
- marq-marquee <string> : Marquee text to display. default value: VLC
- marq-file <string> : File to read the marquee text from. default value: NULL
Position
- marq-x <integer> : X offset, from the left screen edge. default value: 0
- marq-y <integer> : Y offset, down from the top. 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. default value: -1
Font
- marq-opacity <integer [0 .. 255]> : Opacity (inverse of transparency) of overlaid text. 0 = transparent, 255 = totally opaque. default value: 255
- marq-color <integer> { 0x000000, 0x808080, 0xC0C0C0, 0xFFFFFF, 0x800000, 0xFF0000, 0xFF00FF, 0xFFFF00, 0x808000, 0x008000, 0x008080, 0x00FF00, 0x800080, 0x000080, 0x0000FF, 0x00FFFF } : Color(key) of the text that will be rendered on the video. This must be an hexadecimal (like HTML colors). The first two chars are for red, then green, then blue. default value: 0xFFFFFF
- marq-size <integer [0 .. 4096]> : Font size, in pixels. 0 uses the default font size. default value: 0
Misc
- 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
Versions 2.0 and later
Example command line use (VLC 2.0.0 and newer):
% vlc --sub-source="marq{marquee=test,color=0xFFFF00}" somevideo.avi
This example displays yellow test text in the top left corner of video
Versions 0.9.0 to 1.1.13
$ vlc --sub-filter 'marq{marquee=$t ($P%%),color=0xFFFF00}: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. The single quotes '
enclose our $
characters to prevent them from being interpreted as Bash variables.
On Windows the command line would be:
> "%PROGRAMFILES%\VideoLAN\VLC\vlc.exe" --sub-filter=marq{marquee=$t ($P%%),color=0xFFFF00}:marq{marquee=%H:%m%s,position=6} somevideo.avi
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 0xFFFFFF --time-size 12
marq equivalent:
% vlc input_stream '--sub-source=marq{marquee="%Y-%m-%d,%H:%M:%S",position=9,color=0xFFFFFF,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=0xFFFFFF --marq-size=12
additional marq example:
% vlc input_stream '--sub-source=marq{marquee="%c (Week %V)",color=0xFF0000,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.
Gallery
See also
Source code
- modules/spu/marq.c
- modules/video_filter/marq.c (vlc/vlc-0.8.git)
Appendix
Sample | Colour | Hex code |
---|---|---|
Black | 0x000000
| |
Gray | 0x808080
| |
Silver | 0xC0C0C0
| |
White | 0xFFFFFF
| |
Maroon | 0x800000
| |
Red | 0xFF0000
| |
Fuchsia | 0xFF00FF
| |
Yellow | 0xFFFF00
| |
Olive | 0x808000
| |
Green | 0x008000
| |
Teal | 0x008080
| |
Lime | 0x00FF00
| |
Purple | 0x800080
| |
Navy | 0x000080
| |
Blue | 0x0000FF
| |
Aqua | 0x00FFFF
|
Please read the Documentation Editing Guidelines before you edit the documentation