Constant avdec_h264: decoding error
Juan Navarro
juan.navarro at gmx.es
Wed Apr 29 15:27:38 UTC 2020
I'm getting a continuous stream of WARN and ERROR messages when trying
to play an RTSP source, due to issues in the H.264 decoding done by
avdec_h264.
This is a (truncated) sample of the messages:
0:00:02.186 WARN libav gstavcodecmap.c:2441:gst_ffmpeg_caps_to_pixfmt:
ignoring insane framerate 1/0
0:00:02.187 ERROR libav :0:: no frame!
0:00:02.187 WARN libav
gstavviddec.c:1535:gst_ffmpegviddec_frame:<avdec_h264-0> avdec_h264:
decoding error (len: -1094995529, have_data: 0)
0:00:02.189 ERROR libav :0:: left block unavailable for requested intra
mode at 0 2
0:00:02.189 ERROR libav :0:: error while decoding MB 0 2, bytestream 10023
0:00:02.201 ERROR libav :0:: no frame!
0:00:02.201 WARN libav
gstavviddec.c:1535:gst_ffmpegviddec_frame:<avdec_h264-0> avdec_h264:
decoding error (len: -1094995529, have_data: 0)
0:00:02.202 ERROR libav :0:: no frame!
0:00:02.202 WARN libav
gstavviddec.c:1535:gst_ffmpegviddec_frame:<avdec_h264-0> avdec_h264:
decoding error (len: -1094995529, have_data: 0)
0:00:02.202 ERROR libav :0:: Reference 4 >= 2
0:00:02.202 ERROR libav :0:: error while decoding MB 35 4, bytestream 2615
0:00:02.202 ERROR libav :0:: no frame!
0:00:02.202 WARN libav
gstavviddec.c:1535:gst_ffmpegviddec_frame:<avdec_h264-0> avdec_h264:
decoding error (len: -1094995529, have_data: 0)
0:00:02.204 ERROR libav :0:: Reference 2 >= 2
0:00:02.204 ERROR libav :0:: error while decoding MB 29 4, bytestream 3647
0:00:02.209 ERROR libav :0:: no frame!
0:00:02.209 WARN libav
gstavviddec.c:1535:gst_ffmpegviddec_frame:<avdec_h264-0> avdec_h264:
decoding error (len: -1094995529, have_data: 0)
0:00:02.209 ERROR libav :0:: Reference 3 >= 2
0:00:02.209 ERROR libav :0:: error while decoding MB 36 10, bytestream 4386
0:00:02.210 ERROR libav :0:: no frame!
As you can see from the timestamps, these are printed dozens of times
per second.
The RTSP stream used to get these errors is this one:
rtsp://95.131.167.44:554/10701947
Hopefully this stays accessible for the next days / weeks.
My gst-launch command is like this:
gst-launch-1.0 \
rtspsrc location="rtsp://95.131.167.44:554/10701947" protocols="tcp" \
! "application/x-rtp, media=(string)video" \
! decodebin \
! autovideosink
Of course, a completely manual equivalent has the same issues:
gst-launch-1.0 \
rtspsrc location="rtsp://95.131.167.44:554/10701947" protocols="tcp" \
! "application/x-rtp, media=(string)video" \
! rtph264depay \
! h264parse \
! avdec_h264 \
! autovideosink
I have been able to test and got same results with the GStreamer
versions available in Ubuntu 16.04 (Gstreamer 1.8.3), 18.04 (GStreamer
1.14.5), and 20.04 (GStreamer 1.16.2).
Curious thing is that even despite all those errors and warnings, the
end result seems to be playing back fluidly and without issues. Also if
audio is added to the pipeline, it also is correct and synchronized with
the video. Nevertheless, all those warnings must be indicating some
issue that is ingrained in the encoding of the video, and I'd love some
help figuring out if there is something a receiver application can do to
solve it, or if there might be a bug to be reported in the decoder itself.
Thanks!
Juan Navarro
More information about the gstreamer-devel
mailing list