I'm using libVlcSharp to stream video in RTSP mode.
I'm trying to add a marquee on-the-fly, but I fail.
What I'm doing is something like this:
Code: Select all
Core.Initialize();
var vlc = new LibVLC ();
var mediaPlayer = new LibVLCSharp.Shared.MediaPlayer(vlc);
Media media = new Media(vlc, @"test.mov");
media.AddOption(":sub-source=marq{marquee=TEST,position=5,color=0xFFFF00,size=50}");
media.AddOption(":sout=#rtp{sdp=rtsp://127.0.0.1:555/test.sdp}");
mediaPlayer.Play(media);
Video is correctly streamed, but the marquee is not shown.
I also tried this way:
Code: Select all
mediaPlayer.SetMarqueeInt(VideoMarqueeOption.Enable, 1); //enable marquee option
mediaPlayer.SetMarqueeInt(VideoMarqueeOption.Size, 50); //set the font size
mediaPlayer.SetMarqueeInt(VideoMarqueeOption.Position, 5); //set the position of text
mediaPlayer.SetMarqueeInt(VideoMarqueeOption.X, 10); // margin X
mediaPlayer.SetMarqueeInt(VideoMarqueeOption.Y, 10); // margin Y
mediaPlayer.SetMarqueeInt(VideoMarqueeOption.Color, 16711680); // Color
mediaPlayer.SetMarqueeInt(VideoMarqueeOption.Opacity, 250); // Opacity
mediaPlayer.SetMarqueeString(VideoMarqueeOption.Text, "TEST"); //text
mediaPlayer.Play(media);
Does anyone know how to make it work?
Thanks!