[Live-devel] "no frame!"
Ross Finlayson
finlayson at live555.com
Wed Jan 11 16:44:14 PST 2012
> I’m working on my Live555/FFmpeg video player, and I ran into an interesting problem that has kept me stumped for several days. I am taking the buffer that is delivered to my MediaSink (like the example in testRTSPClient), and I am passing the buffer and the size to FFmpeg to decode. It says that there is “no frame!” I’m stumped as to why that is the case when I’m taking the buffer after the “afterGettingFrame” function is called. I was wondering if there was something else that must be done to that buffer for it to be a true frame that can be decoded.
Well, remember that you have complete source code - for "ffmpeg", as well as our code. If necessary, you should be able to find out why "ffmpeg" is complaining.
> My first guess is that the decoder needs more information which brings me to my next question: the SDP description that I’m pulling down doesn’t contain the width/height, so I’m guessing I need to pull that out of the sprop_parameter_sets; is this the case?
Yes. You should take the string (from "MediaSubsession::fmtp_spropparametersets()"), and parse this string into a set of SPS and PPS NAL units, using the function "parseSPropParameterSets()". You should then insert these NAL units into your decoder (before the NAL units that come from the RTP stream).
> My second guess is that there is no frame separator; I noticed that in one particular file: H264VideoFileSink they prepend a 0x00000001 along with the sprop_parameters. Is this a potential problem?
Perhaps, depending upon how your decoder works. Perhaps your decoder needs to see a 'start code' (0x00000001) before each NAL unit. If so, then you'll need to prepend it to each NAL unit before you feed it to your decoder.
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/20120111/ceebfd55/attachment.html>
More information about the live-devel
mailing list