Add marquee to RTSP stream

About encoding, codec settings, muxers and filter usage
Klamay
New Cone
New Cone
Posts: 2
Joined: 16 Dec 2021 17:54

Add marquee to RTSP stream

Postby Klamay » 16 Dec 2021 18:11

Hi experts!

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);
Nope. The video is there but without marquee.

Does anyone know how to make it work?

Thanks! :wink:

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Add marquee to RTSP stream

Postby InTheWings » 16 Dec 2021 20:50

If you don't transcode, that's just useless options for display
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

Klamay
New Cone
New Cone
Posts: 2
Joined: 16 Dec 2021 17:54

Re: Add marquee to RTSP stream

Postby Klamay » 17 Dec 2021 17:39

Thanks for pointing out that I need to transcode.

So, I try to add the marquee on the client side, where I already transcode the stream.
So something like:

Code: Select all

Core.Initialize(); var vlc = new LibVLC (); var mediaPlayer = new LibVLCSharp.Shared.MediaPlayer(vlc); var media = new Media(_libVLC, @"rtsp://127.0.0.1:555/test.sdp", FromType.FromLocation, ":sout=#transcode{vcodec=h264,vb=6000,acodec=mp4a,aenc=fdkaac,ab=128}:file{dst=test.mp4"}", ":sout-keep"); media.AddOption(":sub-source=marq{marquee=TEST,position=5,color=0xFFFF00,size=50}"); mediaPlayer.Play(media);
Still, I get the transcoded file but I don't see any marquee :/

Any idea?

Thanks!


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 10 guests