Get or set the encoder's text overlay configurations.
When text overlay function is enabled, the device will pasted the text defined by this URL on the video image before compressed the video. These texts become the part of video image then. These texts could be date&time, camera name, user defined texts and so on.
When read, the configurations in all regions of text overlay will be returned.
In the WEB application, the host could preview the video stream on the WEB browser. There is a video control bar on the top of live view window. This control bar shows encoder's date and time.
When the date/time option in text overlay function is enabled, the encoder added its date and time on the video image. There are two date/time information could be seen on WEB page. One is in the video control bar and the other one is in the video image. To avoid the difference of these two date/time, we closed the date/time in the control bar when the text overlay is enabled with date/time option.The number of the text overlay regions is vary from encoder devices. In platformA 1CH encoder, there is only one OSD region. In PlatformT encoder, there are four OSD regions. Therefore, any region ID (1 ~ 4) will be treated as region 1 in platformA 1CH encoder.
The horizontal position of a text overlay region is fixed and started from the left edge. The vertical position of an OSD region could be set at top or bottom of the image.
Text Overlay in platformA encoder
Due to the limitation, the beginning horizontal position is vary from video resolutions and encoder types. Here is the summary of the horizontal position vs video resolutions and encoder types.
The background color is fixed to the 0x90FF90 in R,G,B color.
Encoder Type Video Resolution Beginning horizontal position Mega-Pixel Camera 1280x1024, 1280x720 256 640x480, 320x160,160x112 0 D1 Camera or Video Server 720x480,720x576, 640x480, 352x240,352x288,160x112,176x144 1 Text Overlay in PlatformT encoder
There are 4 regions for Text Overlay. These 4 regions are shared with the privacy mask functions. In text overlay function, the beginning horizontal position of every region is from the left of the image no matter what video resolution is. And, the vertical position of every region could be set at the top or button of the image.
Note that the background color could not be configurable and is preset to 0x808080 in R,G,B color.
Refer to the Text Overlay and Privacy Mask control flow for WEB page design. PlatformTOSD.pdf
Region,State,Color,Transparent,Pos,Format[,Strings]
Argument Parameters Note Region 1~4 OSD region. In PlatformA encoder, it should be fixed to 1 State 0,1 0: Disable, 1:Enable
In PlatformA and PlatformT encoders, the text overlay and privacy mask shared this OSD window, the privacy mask will be disabled automatically if the State = 1 in this URL.Color 000000~ffffff Text Color. 6 digitals for R(Red), G(Green) and B(Blue) colors.
Two digits give the color level of a color in R, G or B. Here is the format. RRGGBB where RR is the color level of red color. These value will be hexadecimal value.
For example, ff0000 give the fully red color in OSD.The format is RRGGBB where RR is the color level in red, GG is for green and BB is for blueTransparent 0~100 0~100 for Text overlay transparency level.
The level 0 is non-transparent mode and the foreground color of text is black no matter what color setting is, the OSD will overwrite the video image completed. The level 100 is fully transparent, the OSD will not be able to be seen on the video image.
In platformA encoder, this parameter could be either 0 or 100.Pos TOP, BOTTOM The vertical position of the OSD region. Format Refer to OSD format table
The maximum length of this field is 63 characters.String User defined string In platformA, only 0~9, A~Z, ':', ' ', '/' and '-'. The maximum length of the text is 24 characters. If the overall text string is larger than 24, the user defined string will be truncated.
In PlatformT, the maximum characters is 63 for these 4 OSD regions. The firmware does not limit the number of characters in every OSD region. The number of characters will be counted from OSD region 1 to 4. The characters after the 63th characters will not be shown on the image if total characters in 4 OSD regions is larger than 63 but will be kept in the text overlay configurations.
Note: the character in a~z will be transferred to A~Z automatically. No error message will be returned in this case.Special Note:
The length of text overlay in the video image has to be lower than 64 characters. The text in the video image is decided by the Format and String input arguments. The firmware will truncate the text in the video image if the length of text is larger than 63.New design of text overlay in PlatformT devices.
To support non-english language texts on the text overlay, we improved the test overlay desing in PlatformT encoders and cameras. This implementation will apply to PlatformK cameras as well. We keep the same format of this URL but add another format for this URL then.
The rule in String was changed a little bit. Please refer to the description of PlatformT text overlay implementation. This implementation is available in firmware 4.10 and later.
Description of PlatformT text overlay implementationHere are some examples of this URL.
OSD_FORMAT=1,1,0000ff,50,TOP,%YYYY%X%MM%X%DD%W%hh%C%mm%C%ss
The OSD region 1 will shows the date and time with transparent level 50 in blue. The format of date and time is YYYY/MM/DD HH:MM:SS. For example, 2008/09/01 20:03:45.OSD_FORMAT=2,1,000000,0,TOP,%MM%HH%DD%X%hh%C%mm%C%ss%X%U,TEST
The OSD region 2 will shows the date, time and user in white. The background is black. The format of this OSD texts is MM-DD/HH:MM:SS/TEST. For example, 09-01/20:03:45/TESTOSD_FORMAT=3,1,00ff00,0,BOTTOM,%N
The OSD region 3 will shows the camera name in green on the image with black background color. If the video loss was detected, the VIDEO LOSS will be attached after the camera name. For example, it shows CAMERA-1 as the camera name and shows CAMERA-1.If the CHANNEL=n was not set with this URL to the Multi-Channel device, the error message will be returned.
OSD_FORMAT='1,1,00ff00,30,TOP,%YYYY%X%MM%X%DD%W%hh%C%mm%C%ss'
OSD_FORMAT='2,1,0000ff,50,BOTTOM,%YYYY%X%MM%X%DD%W%hh%C%mm%C%ss'
...
OK: OSD_FORMAT='1,1,00ff00,30,TOP,%YYYY%X%MM%X%DD%W%hh%C%mm%C%ss'
or
ERROR: invalid parameters
Valid
OSD_ENABLED, PRIVACY_REGION
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&OSD_FORMAT
or
http://ip:port/cgi-bin/cmd/encoder?OSD_FORMAT
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&OSD_FORMAT=1,1,00ff00,30,TOP,%YYYY%X%MM%X%DD
or
http://ip:port/cgi-bin/cmd/encoder?OSD_FORMAT=1,1,00ff00,30,TOP,%YYYY%X%MM%X%DD
HOME, ENCODER CGI