[Live-devel] Endless h264 streaming
Ross Finlayson
finlayson at live555.com
Sat Oct 11 07:48:21 PDT 2014
> For h264: When I reboot (or boot) my pc and start my server, connect to it using VLC or MPlayer, it works perfeclty. But when I stop it and restart it, connect to it using VLC or MPlayer again, at the first loop I get "non-existing PPS referenced" errors (no video displayed) but it starts streaming perfectly (and endless) at the 2nd loop again. In other words, i have to reboot after each launch of the server to see my h264 streaming working fine...
The problem here, I think, is that - in your H.264 video stream - SPS and PPS NAL units are occurring only at the start of the stream. Therefore, if a client tries to connect to the stream in some position other than the start, the server is having trouble finding the SPS and PPS NAL units.
First, you should make sure that when your "OnDemandServerMediaSubsession" subclass's constructor calls the "OnDemandServerMediaSubsession" constructor, it sets the "reuseFirstSource" parameter to True. That way, if more than one client connects concurrently, the server won't try to read the stream again for the second (and other) clients.
Second, in your implementation of the "createNewRTPSink()" virtual function, you may need to use one of the versions of "H264VideoRTPSink::createNew()" that specify the SPS and PPS NAL units.
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/20141011/9b7d4668/attachment-0001.html>
More information about the live-devel
mailing list