How to overlay Chinese characters over video frame using gstclockoverlay?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to overlay Chinese characters over video frame using gstclockoverlay?

Jie.Jiang
Hi all,

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.


Regards,
Robbie

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to overlay Chinese characters over video frame using gstclockoverlay?

Tim-Philipp Müller-2
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


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel