Difference between revisions of "Documentation:Modules/time"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Reverted edits by IziF04 (Talk); changed back to last version by Dionoea)
Line 3: Line 3:
 
Allows overlaying date and time information on the video. This filter has been merged with the [[Documentation:Modules/marq|marq]] filter in version 0.9.0.
 
Allows overlaying date and time information on the video. This filter has been merged with the [[Documentation:Modules/marq|marq]] filter in version 0.9.0.
  
{{Stub}}
+
The option for the time picture subfilter in version 0.8.6 are the following:
 +
 
 +
:--time-format <string>    Time format string (%Y%m%d %H%M%S)
 +
:--time-x <integer>        X offset
 +
:--time-y <integer>        Y offset
 +
:--time-position {
 +
::0 (Center),
 +
::1 (Left),
 +
::2 (Right),
 +
::4 (Top),
 +
::8 (Bottom),
 +
::5 (Top-Left),
 +
::6 (Top-Right),
 +
::9 (Bottom-Left),
 +
:: 10 (Bottom-Right)}
 +
:--time-opacity <integer>  Opacity
 +
:--time-color {
 +
::-268435456 (Default),
 +
::0 (Black),
 +
::8421504 (Gray),
 +
::12632256 (Silver),
 +
::16777215 (White),
 +
::8388608 (Maroon),
 +
::16711680 (Red),
 +
::16711935 (Fuchsia),
 +
::16776960 (Yellow),
 +
::8421376 (Olive),
 +
::32768 (Green),
 +
::32896 (Teal),
 +
::65280 (Lime),
 +
::8388736 (Purple),
 +
::128 (Navy),
 +
::255 (Blue),
 +
::65535 (Aqua)}
 +
:--time-size <integer>      Font size, pixels
 +
 
 +
There are two ways to use the time module:
 +
 
 +
'''To overlay the current time over vlc screen output or display'''
 +
 
 +
To do so, use the --time-? options (where ? means "format," "x", "y" etc; i.e. --time-format). 
 +
 
 +
In this example, the time will be displayed in white on the lower right hand corner of the viewable output of a transcoded stream and sent to a multicast IP address with the associated SAP announce.
 +
 
 +
% '''vlc input_stream --sub-filter=time --time-format %Y-%m-%d,%H:%M:%S --time-position 9 --time-color 16777215 --time-size 12 --sout "#transcode{venc=ffmpeg,vcodec=mp4v}:duplicate{dst=display,dst=standard{access=udp,mux=ts,dst=239.255.12.42,sap,name="TestStream"'''
 +
 
 +
In this example, the time will be displayed as 2007-6-19,10:09:33. In addition, the time will only be displayed on the visual display of the input_stream.  It will not be part of the transcoded output.
 +
 +
'''To overlay the current time over the transcoded output'''
 +
 
 +
To do so, enable the transcode module subpicture filter or sfilter option.
 +
 
 +
In this example, the time will be displayed in white on the lower right only in the transcoded output.
 +
 
 +
% '''vlc input_stream --time-format %Y-%m-%d,%H:%M:%S --time-position 9 --time-color 16777215 --time-size 12 --sout "#transcode{venc=ffmpeg,vcodec=mp4v,sfilter=time}:duplicate{dst=display,dst=standard{access=udp,mux=ts,dst=239.255.12.42,sap,name="TestStream"'''
 +
 
 +
Note that this is accomplished by removing the --sub-filter=time command line option and adding the sfilter transcode module option.  If the --sub-filter=time is included vlc will overlay the time over the overlay transcode time, essentially overlapping it.
 +
 
 +
Also note that the --time-? command line options are "global;" i.e., they affect the way the time overlays both the display and the transcoded output.

Revision as of 14:27, 19 June 2007

Module: time
Type Video sub-filter
First VLC version -
Last VLC version 0.8.6
Operating system(s) all
Description Overlays date and time on the video
Shortcut(s) -

Allows overlaying date and time information on the video. This filter has been merged with the marq filter in version 0.9.0.

The option for the time picture subfilter in version 0.8.6 are the following:

--time-format <string> Time format string (%Y%m%d %H%M%S)
--time-x <integer> X offset
--time-y <integer> Y offset
--time-position {
0 (Center),
1 (Left),
2 (Right),
4 (Top),
8 (Bottom),
5 (Top-Left),
6 (Top-Right),
9 (Bottom-Left),
10 (Bottom-Right)}
--time-opacity <integer> Opacity
--time-color {
-268435456 (Default),
0 (Black),
8421504 (Gray),
12632256 (Silver),
16777215 (White),
8388608 (Maroon),
16711680 (Red),
16711935 (Fuchsia),
16776960 (Yellow),
8421376 (Olive),
32768 (Green),
32896 (Teal),
65280 (Lime),
8388736 (Purple),
128 (Navy),
255 (Blue),
65535 (Aqua)}
--time-size <integer> Font size, pixels

There are two ways to use the time module:

To overlay the current time over vlc screen output or display

To do so, use the --time-? options (where ? means "format," "x", "y" etc; i.e. --time-format).

In this example, the time will be displayed in white on the lower right hand corner of the viewable output of a transcoded stream and sent to a multicast IP address with the associated SAP announce.

% vlc input_stream --sub-filter=time --time-format %Y-%m-%d,%H:%M:%S --time-position 9 --time-color 16777215 --time-size 12 --sout "#transcode{venc=ffmpeg,vcodec=mp4v}:duplicate{dst=display,dst=standard{access=udp,mux=ts,dst=239.255.12.42,sap,name="TestStream"

In this example, the time will be displayed as 2007-6-19,10:09:33. In addition, the time will only be displayed on the visual display of the input_stream. It will not be part of the transcoded output.

To overlay the current time over the transcoded output

To do so, enable the transcode module subpicture filter or sfilter option.

In this example, the time will be displayed in white on the lower right only in the transcoded output.

% vlc input_stream --time-format %Y-%m-%d,%H:%M:%S --time-position 9 --time-color 16777215 --time-size 12 --sout "#transcode{venc=ffmpeg,vcodec=mp4v,sfilter=time}:duplicate{dst=display,dst=standard{access=udp,mux=ts,dst=239.255.12.42,sap,name="TestStream"

Note that this is accomplished by removing the --sub-filter=time command line option and adding the sfilter transcode module option. If the --sub-filter=time is included vlc will overlay the time over the overlay transcode time, essentially overlapping it.

Also note that the --time-? command line options are "global;" i.e., they affect the way the time overlays both the display and the transcoded output.