I'm developing a WPF player using libav to get the frames from a rtsp with
h264 encoding. I need low delay settings so I put the flag in the code:

pCodecCtx->flags|= CODEC_FLAG_LOW_DELAY;

where pCodecCtx is the codec from my video stream.

The problem is that sometimes I receiving about 10 frames that aren't
completed or corrupted. I'm using:

// Decode video frame

avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished,&packet);

// Did we get a video frame?

if(frameFinished)

To get a full frame, and then I pass the pFrame->data to a RGB frame with
this:

sws_scale(img_convert_ctx, pFrame->data, pFrame->linesize,
0,pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);

And the I pass the pframeRGB to my .net App.

So most of the time I get a perfect video with very good delay (about 250
ms) with a FullHD source, but then sometimes I see like uncompleted frames,
the top lines of the video are correct but the bottom are something like
blurring with lines from top to bottom. Also when I put the debug traces of
libav I found at the same time the artifacts occurs messages like:

[h264 @ 0fb719a0] RTP: missed 4 packets

[h264 @ 0fb719a0] Delayed frames seen. Reenabling low delay requires a
codec flush.

[h264 @ 0fb719a0] Delayed frames seen. Reenabling low delay requires a
codec flush.

[h264 @ 05a15540] RTP: missed 4 packets

[h264 @ 05a15540] Delayed frames seen. Reenabling low delay requires a
codec flush.

[h264 @ 05a15540] Delayed frames seen. Reenabling low delay requires a
codec flush.

[h264 @ 0fb719a0] cbp too large (4294967295) at 75 57

[h264 @ 0fb719a0] error while decoding MB 75 57

[h264 @ 0fb719a0] concealing 1174 DC, 1174 AC, 1174 MV errors

[h264 @ 05a15540] cbp too large (4294967295) at 75 57

[h264 @ 05a15540] error while decoding MB 75 57

[h264 @ 05a15540] concealing 1174 DC, 1174 AC, 1174 MV errors

[h264 @ 0fb719a0] Delayed frames seen. Reenabling low delay requires a
codec flush.

Any ideas?
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to