Description of PlatformT text overlay implementation

 

 


General Description

To have flexible usage of text overlay, we supports another format of input argument in OSD_FORMAT URL. That means there are two types in OSD_FORMAT are available.

The type 2 is the new format which it removed %U (user defined text strings) from Format. Users could give their own text strings to any location in the Format directly.
The Type1 OSD_FORMAT command was described in OSD_FORMAT URL. In this document, we focus on type 2 OSD_FORMAT URL.

Input Argument

Region,State,Color,Transparent,Pos,Format
where
Region, State, Color, Transparent and Pos have the same definition as before.
The format and rule in the Format are listed below.

User defined texts could be placed at any location in the Format. For example,
OSD_FORMAT=1,1,00FF00,50,TOP,ABC-%YY-%MM-%DD-XYZ
The A,B,C,-,X,Y and Z are user defined text. The text on the video image looks like ACB-2011-05-23-XYZ.

The maximum length in Format is 128 bytes. We expected the non-English language characters was transformed to UTF-8 encoded string was sent to firmware by WEB browser. For example, a Chinese character was transfer to 3 bytes UTF-8 encoder data to sent to firmware. That means add one Chinese character needs 3 characters space in Format argument. So, users should make sure the length of Format should not exceed 128 bytes when they give non-English language characters in Format.
The question mark ? will be seen if firmware could not understand the UTF-8 data.

In type 1 OSD_FORMAT, when %U was used, the user defined string after the Format is needed. The accepted characters are as usual. But,
firmware will not transform lower-case English letters into upper-case English letters.
The %U could be used in type 2 OSD_FORMAT but we don't recommend.

The space of a character in test overlay on video image is 16x12 pixels. Four OSD regions share 64 characters. If total characters definded in these four OSD regions are lager than 64, the characters after the 64th characters will been not shown on video image.
For some languages, like Chinese, present one character need two 16x12 pixels space.

Back to

OSD_FORMAT