[Live-devel] RSTP Live streaming from USB camera
Ross Finlayson
finlayson at live555.com
Thu Nov 13 08:42:45 PST 2014
> The only problem that we have is due to fact that we can only have a limited number of connections (client vlc) and this
> number is related to the source's resolution.
> If you exceed this number all the VLC clients begin to display artifacts.
>
> Source's resolution 320 x 240 allows just 6 VLC connections.
> Source's resolution 640 x 480 allows just 3 VLC connections.
> Source's resolution 1920 x 1080 allows just 1 VLC connection.
Issues like this are almost always caused by running resource limitations (CPU and/or network), rather than any inherent problem with the LIVE555 software.
Note also that (based on the experience of others) running more than one copy of VLC on the same computer tends to perform very poorly, so if you’re testing multiple VLC clients, you should do so on separate computers (separate *physical* computers, not separate ‘virtual machines’).
(Also, a reminder (yet again) that VLC is not our software. The best way to test RTSP client connections is to begin with our “openRTSP” software: <http://www.live555.com/openRTSP/ <http://www.live555.com/openRTSP/>>. Then, and only then, should you use a media player (such as VLC).)
> The OS is windows.
That may well be (at least part of) your problem :-( Windows is simply not a serious operating system for running server software. (It’s 2014; noone should be doing this anymore.)
> Below, what we did:
>
> 1) We used ffmpeg to capture the images from the camera and convert them to H264 + AAC frames (avcoded)
> 2) These frames were pushed in a circular queue
> 3) In a thread we created a RTP Server, the media session and two subsession, one for the video and the other one audio (see the code below)
> 4) Starting from the DeviceSource.cpp we created a source that reads the frames from the circular queue.
>
> 5) When a client connects to the RTPserver, we create a NewStreamSource and a NewRTPSink. As you can see in the code below,
> for the video StreamSource we create a H264VideoStreamDiscreteFramer for the audio we leave as it is.
>
> Regarding the RTPSink, for the video, we create an H264VideoRTPSink and for the audio we create MPEG4GenericRTPSink.
This all looks good. One more thing. Because you’re streaming from a ‘live source’, make sure that your “Live555ServerMediaSubsession” constructor - when it calls the “OnDemandServerMediaSubsession” constructor - sets the “reuseFirstSource” parameter to True. (That way, your input source will never be instantiated more than once concurrently, regardless of how many RTSP clients you have.)
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20141113/1c60bf02/attachment.html>
More information about the live-devel
mailing list