[Live-devel] Frames are corrupted

Vikram Singh vikram at vizexperts.com
Tue Apr 22 07:12:58 PDT 2014


Hi Ross,

 

Thanks for the correction. I fed "LiveSourceWithx264" into
"H264VideoStreamDiscreteFramer" and now it works if I comment out the
virtual function "getAuxSDPLine" in my implementation. 

 

In a previous question posted by user,

http://lists.live555.com/pipermail/live-devel/2011-December/014276.html

you said this function is needed "only for when you're streaming codecs like
H.264 or MPEG-4 video that require special 'configuration' parameters"
and I am streaming h264 video.
 
My getAuxSDPLine() is 
 
    char const* H264LiveServerMediaSession::getAuxSDPLine(RTPSink* rtpSink,
FramedSource* inputSource)
    {
        if(fAuxSDPLine != NULL) return fAuxSDPLine;
        if(fDummySink == NULL)
        {
            fDummySink = rtpSink;
            fDummySink->startPlaying(*inputSource, afterPlayingDummy, this);
            checkForAuxSDPLine(this);
        }
 
        envir().taskScheduler().doEventLoop(&fDoneFlag);
        return fAuxSDPLine;
    }

 

After entering into the doEventLoop() my function is going into infinite
loop because it is not getting SPS and PPS nal units.

If I comment out the function it is working on brower and vlc player on
desktop. But it is not working on iPad brower ie it is rendering one frame
and getting struck.

Does this happen because I have not received SPS and PPS nal units ?

 

Thanks 

Vikram Singh

 

From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Saturday, April 19, 2014 11:38 AM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Frames are corrupted

 

-        I think the issue is with fMaxSize in deliverFrame() which starts
from 150000 and goes to zero which should not happen.

 

OK, your problem is that - in your implementation of the
"createNewStreamSource()" virtual function - you are feeding a
"LiveSourceWithx264" object into a "H264VideoStreamFramer".  This is wrong,
because "H264VideoStreamFramer" is used only when parsing a H.264 *byte
stream*, not a discrete sequence of NAL units.  Instead, you should be
feeding a "LiveSourceWithx264" into a "H264VideoStreamDiscreteFramer".

 

Also, it's important that the H.264 NAL units that you deliver - from the
"LiveSourceWithx264" - into the "H264VideoStreamDiscreteFramer" *not* begin
with a 0x00 0x00 0x00 0x01 'start code'.  I.e., you need to remove these 4
bytes (and adjust "fFrameSize" accordingly) when you do the delivery.

 

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/20140422/e498886a/attachment-0001.html>


More information about the live-devel mailing list