How to set marquee font in libvlc 2.1.0?

This forum is about all development around libVLC.
jianxia
New Cone
New Cone
Posts: 4
Joined: 30 May 2012 15:26

How to set marquee font in libvlc 2.1.0?

Postby jianxia » 15 May 2014 15:56

From command line, I use:
vlc.exe --sub-source=marq{marquee=Innvation China,size=40} myvideo.mkv
the media title name font and marquee font is Arial.

if I use:
vlc.exe --sub-source=marq{marquee=Innvation China,size=40} --freetype-font=MingLiu myvideo.mkv
the media title name font and marquee font is MingLiu.

But in libvlc, I use:

Code: Select all

const char * const vlc_args[] = { "-I", "dumy", // No special interface "--ignore-config", // Don't use VLC's config "--plugin-path=C:\\Program Files (x86)\\VideoLAN\\VLC\\plugins", "--freetype-font=MingLiu", "--sub-source=marq{marquee=Hello}"
the media title name font is MingLiu, but the marquee font still be Arial.


BTW:
I upgrade to version 2.1.3, the command line display correct, but with libvlc, neither media title name or marquee not display.

mangokm40
Cone that earned his stripes
Cone that earned his stripes
Posts: 130
Joined: 20 May 2010 20:00

Re: How to set marquee font in libvlc 2.1.0?

Postby mangokm40 » 15 May 2014 19:13

Have you checked 'libvlc_media_player_set_video_title_display()'?

jianxia
New Cone
New Cone
Posts: 4
Joined: 30 May 2012 15:26

Re: How to set marquee font in libvlc 2.1.0?

Postby jianxia » 20 May 2014 03:57

@mangokm40

Great, you are right!

I added

Code: Select all

libvlc_media_player_set_video_title_display(pMediaPlayer_, libvlc_position_bottom_left, 5000);
both title and marquee displayed.

but seems the enum libvlc_position_t is not right.

instead:
libvlc_position_bottom_left displays at the top-left,
libvlc_position_bottom displays at the top-right
libvlc_position_bottom_right displays at the bottom-center

don't know why, but it's no matter.

thanks a lot


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 22 guests