Page 1 of 1

How to set marquee font in libvlc 2.1.0?

Posted: 15 May 2014 15:56
by jianxia
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.

Re: How to set marquee font in libvlc 2.1.0?

Posted: 15 May 2014 19:13
by mangokm40
Have you checked 'libvlc_media_player_set_video_title_display()'?

Re: How to set marquee font in libvlc 2.1.0?

Posted: 20 May 2014 03:57
by jianxia
@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