Vlc client just play 4 second and then freeze

Topics: Question
Apr 30, 2015 at 6:34 PM
I am testing the server with the following workflow.

VLC stream a file (any codec) through rtsp --> aggregate in RtspServer --> VLC client read from server.

The problem is vlc client just start and in 4 second freeze the image not the player.

Maybe the problem is i am converting the projecto to framework 4.5 or is a VLC problem.

Why is 4.5.2 mandatory.
Apr 30, 2015 at 8:23 PM
Edited Apr 30, 2015 at 8:24 PM
Vlc sucks, check codec information and you will see it's not a problem in my code.

Use a stable version if you think my library is the issue, not a beta release.

Also there was a version which didn't need 4.5.2 but it's no longer supported.

Please also remember to adhere to the Apache License in your project or coursework.
Marked as answer by juliusfriedman on 4/30/2015 at 12:23 PM
May 4, 2015 at 6:28 PM
Thanks for your answer. Of course i believe your code is not the problem, my teachers use your code in production and everything ok, but they are closed to question in this project i need to work with ip cameras but i haven't. I need to work with MJPEG and H264 streams and the tool i know is VLC for transcoding and streaming. The previous workflow with (h264, mp3)(TS) profile just play 4 seconds in 111212 release and freeze the player, in the server log, it show "No context for package" and then it disconnect the player (client). I download the latest stable release and now the client don't contact the server, logs show.

Server Started @ 5/4/2015 4:46:26 PM
Starting Stream: stream Id=aa2bd517-932c-4715-8ed1-48b218ca762d
Thread is dead; priority cannot be accessed.
at System.Threading.Thread.GetPriorityNative()
at Media.Rtsp.RtspServer.StartStreams() in d:\net7mma-111009\RtspServer\RtspS
erver.cs:line 1106

That's the code i tested. So simple.

using (RtspServer server = new RtspServer() { Logger = new RtspServerConsoleLogger() })
            RtspSource source = new RtspSource("stream", "rtsp://");
            while (!server.IsRunning)
            foreach (var item in server.MediaStreams)
                //Console.WriteLine(item.Ready); //False
                //Console.WriteLine(item.State);  //Stopped
May 5, 2015 at 3:14 PM
Hi Julies
I have seen the exact same problem when trying to proxy an Axis Camera. VLC works direct but through the proxy drop the image after 4 seconds. I'd love to get to the bottom of this one.
May 9, 2015 at 3:18 PM
Can you explain, why VLC suck, and why it doesn't work as a source for your RtspServer.
May 9, 2015 at 3:22 PM
IMHO that would be because Live555 sucks, try a different RtspClient.

It does and should, please don't confuse your trouble with the overall functionality of the library and remember to base your expectations off of the latest stable download.

Marked as answer by juliusfriedman on 5/9/2015 at 7:22 AM
May 9, 2015 at 4:01 PM
Dear Sir: Thank again for your quick answers. When you say live555 sucks is due to it is not standard compliant with rtsp?. Other people say that when use vlc directly to view ip camera stream all good but when aggregate the camera and open the aggregated
video with vlc the problem begin. This is what i need to know. I am using the latest stable version.
May 9, 2015 at 4:09 PM
It depends on your view, I would not make that statement in most cases.

Well that sucks for them I guess? I dunno because your not really giving me any information...
Marked as answer by juliusfriedman on 5/9/2015 at 8:09 AM
May 9, 2015 at 4:37 PM
Dear Sir. Sorry for my stupid question. I read other codeproject article and in this article someone has the same problem. and you say. "To get VLC to play you need to forward the frames to the other participants with the correct SSRC. Sending VLC the
decoded packets will prevent it from displaying video. I have an Rtsp / Rtp implementation in c# which is working with VLC and Mplayer for all types of video streams. The thumbnails is the only reason to decode the data. If you are working on just aggregation
just forward the existing packets to the new source with the correct SSRC." The only thing i need is aggregate MJPEG and RTSP sources and playing with vlc. I am not pro in the video world, when you say "just forward the existing packets to the new source with
the correct SSRC" how can i do that with your library. Some code are welcome.
May 9, 2015 at 4:55 PM
If Live555 is not standard then how VLC can play hundred of ip-camera models streaming through rtsp/rtp?
May 9, 2015 at 8:11 PM
Sir, I am only giving my own biased opinions and you are taking things [it seems] in various other perspectives and inferring quite a bit from such statements.

All of your questions have already been answered.

Please let me know if you need anything further.
Marked as answer by juliusfriedman on 5/9/2015 at 12:11 PM
May 9, 2015 at 8:23 PM
Sorry Sir. The only thing i need is to deep in why vlc doesn't work with your amazing library, i am not the only one with this doubt in the discussion. Your library is theorically amazing, but people for any reason use vlc media player then i want to know
why when you use vlc server --> vlc media player workflow this work, and vlc server ---> RtspServer ---> vlc player this doesn't work. Just that.
May 9, 2015 at 10:57 PM
Edited May 9, 2015 at 10:58 PM
No problem.

I already told you that VLC uses Live 555 and that Live 555 sucks.

Why don't you and everyone else who has questions about Live 555 ask Ross about Live 555 since that is his library, my library is not the issue.

You can also try VLC without Live555 which may work better depending on the scenario.

Marked as answer by juliusfriedman on 5/9/2015 at 2:57 PM
May 21, 2015 at 12:31 AM
Tunning VLC, i solve the problem of freeze but now for example with h264 with mpeg-ts como muxer (the only option), when i aggregate the stream to the server, just work about 2 minutes and the image has bad quality. Then if i stream with VLC to VLC or VLC to MPlayer everithing is ok.

Some tips are welcome please. perhaps for understanding.