[Live-devel] MPEG4 streaming using ffmpeg as encoder

Ross Finlayson finlayson at live555.com
Fri Oct 18 13:24:59 PDT 2013


Your "deliverFrame()" function looks OK - provided that it gets called whenever a new MPEG-4 frame is available.  Note that each call to "MyStreamingDeviceSource::doGetNextFrame()" must be followed (eventually) by a call to "FramedSource::afterGetting(this)".  Therefore, if you return from "deliverFrame()" at the "if(newFrameSize == 0) return;" statement (because no new frame data is available), you must ensure that "deliverFrame()" somehow gets called again later when new frame data *is* available.


> when i am doing that I am not getting anything in VLC and testRTCPClient

You should use "testRTSPClient" (sic) for testing first; only after that's working should you bother using VLC.


> I suspect that I did not send the configuration data before sending the actual data. I saw that my AVPAcket has "00000001B6" in starting and I think i somehow need to send "00000001B0" to signal start of data.
> 
> I also noticed that when i encode using FFMpeg in codec->extradata I have some header information that has "00000001B0" in that but i dont know how to pack all this information

Yes, this 'extra data' is important.  You should treat it just as you would a video frame, and make sure that it is the first 'frame' that you feed to your "MyStreamingDeviceSource::deliverFrame()" is this 'extra data'.  I suspect that this may be enough to make your code work.


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/20131018/b17b80cd/attachment.html>


More information about the live-devel mailing list