How to overlay Chinese characters over video frame using gstclockoverlay?

Tim-Philipp Müller t.i.m at zen.co.uk
Mon Sep 10 01:50:29 PDT 2012


On Sun, 2012-09-09 at 22:29 +0800, JiangJie wrote:

Hi,

> I'm using gstclockoverlay to add text characters over video frames.
> By now, everything works well with English characters. 
> Is there any way to show Chinese characters with gstclockoveray? 
> If possible, how should I set the "text" property of gstclockoverlay?
> 
> By the way, my working platform is ARM Linux (i.Mx27) with
> gstreamer-0.10.35.

This *should* work fine. textoverlay and clockoverlay expect strings in
UTF-8 encoding.

This for example works fine for me:

  gst-launch-0.10 videotestsrc ! clockoverlay text='上海' ! xvimagesink

(might depend a bit on how your terminal/locale is set up though).

If you write C code, you can create UTF-8 text using escape codes, for
example (not sure what your compiler will do with UTF-8 characters in a
string literal):

 e.g. "\344\270\212\346\265\267\012"

 Cheers
  -Tim




More information about the gstreamer-devel mailing list