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. Therefore, any region ID (1 ~ 4) will be treated as region 1 in platformA 1CH encoder.
In another platform encoders, there are four OSD regions.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 and the background color is fixed to the 0x90FF90 in R,G,B color. Here is the summary of the horizontal position vs video resolutions and encoder types.
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/K encoders and cameras
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.Text Overlay in Dxx, Exx, Bxx and Ixx cameras
There are 4 regions for text overlay on video stream 1 and 2. These 4 text overlay regions are independent of privacy mask regions. That means these camera models have 4 text overlay regions and 4 privacy mask resions.
We use the 100% transparent level on the text overlay background. The space of a character in text overlay on video image is 10x16 pixels.
For some languages, like Chinese, present one word needs two 10x16 pixels space. There is a vertical line between two characters when we combine these two characters to one word. That is a limitation.
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
PlatformA, PlatformT and PlatformK the text overlay and privacy mask shared this OSD window, the privacy mask will be disabled automatically if the State = 1 in this URL. Dxx, Exx, Bxx and Ixx the text overlay and privacy mask are independent. They could be enabled at the same time. 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.
Note:
In Dxx, Exx, Bxx and Ixx cameras, the maximum length of every text overlay region is 52 characters. The %U in the Format filed is not recommended. You could type your defined string directly in this field. For example, you could type MyCamera-%hh:%mm:%ss.String User defined string
PlatformA only allow 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.
Note: the character in a~z will be transferred to A~Z automatically. No error message will be returned in this case.PlatformT and PlatformK 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.Dxx, Exx, Bxx and Ixx the maximum characters is 52 for every text overlay region. But, we don't recommend to use this field. The user defined string could be in the Format field. Special Note:
The texts shown on the video image are decided by the settings in the Format and String. The firmware will truncate the text in the video image if the length of text is longer than 63 in PlatformT/K and 52 in Dxx, Exx, Bxx and Ixx.New design of text overlay in PlatformT and Platform K devices.
To support non-english language texts on the text overlay, we improved the test overlay desing in PlatformT and PlatformK encoders and cameras. 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/K text overlay implementation.Here 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 multiple channel video encoder, 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