[Live-devel] "no frame!"
Steve McFarlin
steve at stevemcfarlin.com
Wed Jan 11 16:31:01 PST 2012
It sounds like your not setting up FFmpeg properly. The SDP will contain the SPS and PPS in the sprop-parameter-sets. You need to decode these (Base64 encoded) and place them in the extradata field of the AVCodecContext. Additionally every NALU passed to FFmpeg must be in Annex B format. That is it must be prefixed with the NALU start code of 0x00000001. This start code needs to be in network byte order.
If width and height information is not specified in the SDP you can get this from the SPS. See ISO 141496-10 section 7.3.2.1. If I recall correctly Live555 has a method to inspect the SPS. It might be able to be used to dig this information out of the SPS. Sorry my Live555 knowledge is starting to get fuzzy.
You might check out the dropcam sources on github (iPhone project). It uses Live555 and FFmpeg for decoding H264.
Thanks,
Steve
On Jan 11, 2012, at 2:53 PM, Menne, Neil wrote:
> 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.
>
> 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?
>
> 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?
>
> Video is not my expertise, so I’m spending most days reading anything/everything on these problems, but this one’s got me stuck.
>
> -Neil
>
> P.S. My video is an H.264 video stream
>
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120111/d44f6778/attachment.html>
More information about the live-devel
mailing list