Video decoded with vaapih264 occasionally appears green
I use GStreamer to play a UDP video stream, and my pipeline string is
udpsrc port=1991 caps=\"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264\" ! rtpjitterbuffer latency=20 ! rtpmp2tdepay ! tsdemux ! queue name=video_ch ! h264parse ! queue name=dec0 ! vaapih264dec ! videoconvert n-threads=0 ! autovideosink
However, he may occasionally have a green screen as shown in the figure：
Then I use the following pipeline to play the video stream again and save the video stream as a video file in MP4 format again.
udpsrc port=1991 caps=\"application/x-rtp, media=video\" ! rtpjitterbuffer latency=200 ! rtpmp2tdepay ! tsdemux ! tee name=tee0 tee0.! queue ! filesink location=test.mp4 tee0.! queue name=video_ch ! h264parse ! queue name=dec0 ! vaapih264dec ! videoconvert n-threads=0 ! autovideosink
When I use ffplay and VLC to play the MP4 file, there will be no green screen, but the following prompt error occurs when I use ffplay.
When I broadcast the MP4 file using gstplay and the following pipeline, a green screen appears, but replace vaapih264dec in the pipeline with avdec_h264, vaapisink is replaced with autovideosink (using soft decoding), the green screen phenomenon disappears.
filesrc location=/home/wgs/hp2.mp4 ! h264parse ! vaapih264dec low-latency =true !vaapisink
I think the above reason is the problem of the decoder in vaapi plug-in. The decoder used by ffplay and VLC can deal with the loss of I-frames, while vaapih264dec has a problem when I-frames are lost. I don't know if my analysis is reasonable. I haven't found vaapih264dec any problems, and I don't know how to solve them.
When I use the vainfo command, the result is:
When I make the
lspci | grep VGAcommand, my result is shown in the figure.
I really need your help. Thanks.