Closed chuqingq closed 2 years ago
ffmpeg rkmppdec is just a wrapper of mpp, so for this kind of issues, likely to be a mpp issue.
so please report to mpp issue tracker.
then for example enable mpp debug log to check where it stuck.
ffmpeg rkmppdec is just a wrapper of mpp, so for this kind of issues, likely to be a mpp issue.
so please report to mpp issue tracker.
then for example enable mpp debug log to check where it stuck.
OK, I will report to mpp issue tracker, which is https://github.com/rockchip-linux/mpp
right?
And I will enable mpp debug log, and provide more information to mpp issue tracker.
I trace the ffmpeg code, and find it stuck on decode_put_packet
https://github.com/JeffyCN/FFmpeg/blob/ubuntu/4.2.2-1ubuntu1/libavcodec/rkmppdec.c#L443 and timeout is MPP_TIMEOUT_BLOCK.
Thank you!
looks like mpp issue
FYI, we found an issue that the mpp might not be able to return frames with the starting 4 packets for some streams.
I've pushed a workaround for it:
+++ b/libavcodec/rkmppdec.c
@@ -721,8 +721,10 @@ static int rkmpp_receive_frame(AVCodecContext *avctx, AVFrame *frame)
// send pending data to decoder
ret = rkmpp_send_packet(avctx, packet);
if (ret == AVERROR(EAGAIN)) {
- // blocked polling since we got enough data
- return rkmpp_get_frame(avctx, frame, MPP_TIMEOUT_BLOCK);
+ // some streams might need more packets to start returning frame
+ ret = rkmpp_get_frame(avctx, frame, 1);
+ if (ret != AVERROR(EAGAIN))
+ return ret;
} else if (ret < 0) {
env:
sudo ./ffmpeg -v debug -y -vcodec h264_rkmpp -i ../1.mp4 -an -vframes 250 ../ffmpeg2.yuv
output:
and stuck here.