[Live-devel] MPEG4 streaming using ffmpeg as encoder

ssingh at neurosoft.in ssingh at neurosoft.in
Mon Oct 21 10:58:20 PDT 2013


Thank you Ross for all the help. I finally managed to get it working and 
now i have both audio and video being streamed. I dont know but somehow 
the refresh rate (as seen on vlc) is not good. My video frames comes 
incomplete and it takes time for vlc to paint the whole frame and audio 
stops after about 1 second. I thought it has something to do with my 
router which is wireless and is about 54Mbps. I had same issue running 
testMPEG1or2AudiovideoStreamer.exe with VLC as client and when i 
increased the router speed to 100 Mbps the issue went away for test 
program but its still there in my program. I dont know what I am doing 
wrong. I tried messing with estimateBandWidth varibale and also 
fDurationInMicroseconds but did not solve this issue. Do you know any 
possible reason for this.

Thanks for all the help and I appreciate you inputs and time spend on 
ansewring the questions.


On 2013-10-19 07:26, Ross Finlayson wrote:
>> I tried the unicast server based on onDemand sample but my function
>> "getAuxSDPLine()" never returns. When i debugged i found that
>> function "checkForAuxSDPLine1()" calls the function
>> "fDummyRTPSink->auxSDPLine()" which is the function implemented in
>> MPEG4RTPSink which in turn tried to get the pointer to
>> MPEG4VideoStreamFramer which seems wrong as I put the
>> MPEG4VideoStreamDiscreteFramer as input to RTPSink. Am i doing
>> anything wrong or is it suppose to be like that. It never gets the
>> data required from Framer so it is stuck checking that.
> 
> Yes, and that's your problem. Note "MPEG4ESVideoRTPSink.cpp", lines
> 113 and 116. Either the call to
>  framerSource->profile_and_level_indication()
> is returning 0, or the call to
>  framerSource->getConfigBytes(configLength)
> is returning NULL. This means that your
> "MPEG4VideoStreamDiscreteFramer" object (which, BTW, is a subclass of
> "MPEG4VideoStreamFramer") *did not* receive correct configuration
> data. In particular, it shows that the code in
> "MPEG4VideoStreamDiscreteFramer.cpp" from lines 74-94 is not getting
> executed, despite the fact that you say that you're feeding a chunk of
> configuration data - beginning with 0xB0 - to your
> "MPEG4VideoStreamDiscreteFramer" as the first frame of data. So you
> need to figure out why that's not working.
> 
>> Also another question if i need to implement multicast I dont need
>> to subclass Subsession and implement 3 virtual functions. Is my
>> understanding correct?
> 
> Yes. However, you'd still need to have proper configuration data being
> fed to your "MPEG4VideoStreamDiscreteFramer" object (i.e., the same
> problem you're having with unicast), otherwise your RTSP server still
> would not be able to produce a correct SDP description for the stream
> (and no decoder would ever be able to decode it).
> 
>  Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/ [1]
> 
> 
> Links:
> ------
> [1] http://www.live555.com/
> 
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel


More information about the live-devel mailing list