[Libav-user] decoding h264 RTP stream question

Assaf kave asafk at robo-team.com
Mon Apr 28 17:51:14 CEST 2014


Hi there,

I am developing video player based on your FFmpeg libraries, I am trying to decode NAL units streamed from IP camera, but I get "Invalid data found when processing input" on the first SPS and the return code from "avcodec_decode_video2" is -1094995529.
Only if I concatante SPS,PPS IDR or SPS,PPS IDR I get decoded frame.
My first SPS looks like this:
00 00 00 01 67 64 00 28 ad 00 ce 50 28 0b fe 5c 04 40 00 03 84 00 00 af c8 38 00 00 03 01 7d 78 40 00 03 b9 ac a8 bd f8 c0 00 00 0b eb c2 00 00 1d cd 65 45 ef c1 b4 11 08 94 b0 00

The avcodec initlization :

av_register_all();

video_dec_codec_ = avcodec_find_decoder(AV_CODEC_ID_H264);

video_dec_ctx_ = avcodec_alloc_context3(video_dec_codec_);

avcodec_open2(video_dec_ctx_, video_dec_codec_, NULL) ;

frame_ = av_frame_alloc();

av_init_packet(&pkt_);

can you help please?




Best Regards,

Asaf Kave
R&D, Software engineer.
[cid:image001.png at 01CF6311.2FC3AAE0]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140428/934939d4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5807 bytes
Desc: image001.png
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140428/934939d4/attachment.png>


More information about the Libav-user mailing list