GNOME Bugzilla – Bug 751885
Distorted video output with horizontal stripes
Last modified: 2015-11-19 16:51:04 UTC
I'm running libva 1.6.0 and libva-intel-driver 1.6.0 on Sandy Bridge. If I encode any video with low (< 8 Mbit/s) bitrate I get very distorted video output with horizontal stripes in it. This is a case for both cqp and cbr encoding. I've tried to encode it with gstreamer 1.0, avcenc and h264encode with the same output result. This is what I get with 3000 Kbit/s CBR encoding: http://ovrload.ru/f/55938_bake-cbr-3000.mkv It was encoded with the following gstreamer pipeline: gst-launch-1.0 -e filesrc location=bake_op.mkv ! matroskademux ! vaapidecode ! videoconvert ! video/x-raw,format=NV12 ! vaapiencode_h264 rate-control=cbr bitrate=3000 ! video/x-h264,stream-format=byte-stream ! h264parse ! matroskamux ! progressreport ! filesink location=bake-cbr-3000.mkv Windows encoders like MediaCoder and handbrake produce decent video quality without horizontal stripes. Nothing different with current git master of libva and libva-intel-driver.
Could you please have a try with current git master of gstremaer-vaapi?? I have pushed some patches on yesterday to fix couple of CBR issues... Also it would be helpful if you can provide the source video file...
Nothing really changed with libva-git, libva-driver-intel-git and gstreamer-vaapi-git. Source file is here: ftp://serv.valdikss.org.ru/Anime/Bakemonogatari/Bonus/%5BANE%5D%20Bakemonogatari%20-%20Ep03%20Creditless%20Opening%20%5BBDRip%201080p%20x264%20FLAC%5D.mkv It was reencoded to h264 8 bit with ffmpeg. This issue is not bound to any particular source file.
Aha avcenc and h264enc also giving same result ! Then we might need to think/investigate from driver side too :)
Download comment 2's source file and run this command, it has error. [root@x-sgbmedia home]# gst-launch-1.0 -e filesrc location=751885.mkv ! matroskademux ! vaapidecode ! videoconvert ! video/x-raw,format=NV12 ! vaapiencode_h264 rate-control=cbr bitrate=3000 ! video/x-h264,stream-format=byte-stream ! h264parse ! matroskamux ! progressreport ! filesink location=bake-cbr-3000.mkv libva info: VA-API version 0.38.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /opt/X11R7/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_38 libva info: va_openDriver() returns 0 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Got context from element 'vaapidecode0': gst.vaapi.Display=context, display=(GstVaapiDisplay)NULL; ERROR: from element /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0: GStreamer encountered a general stream error. Additional debug info: matroska-demux.c(4500): gst_matroska_demux_loop (): /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0: stream stopped, reason not-linked ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ...
Sorry, I totally forgot about that. It's 10 bit video so vaapi can't decode it. You can either transcode it to 8 bit or change vaapidecode to avdec_h264 in the pipeline.
Do we close this report as NOTABUG??
(In reply to Víctor Manuel Jáquez Leal from comment #6) > Do we close this report as NOTABUG?? Why?
(In reply to ValdikSS from comment #7) > (In reply to Víctor Manuel Jáquez Leal from comment #6) > > Do we close this report as NOTABUG?? > > Why? Oops! sorry. I thought that comment #5 implied that. But I miss read. Sorry for the noise. Running gst-launch-1.0 -ve filesrc location=bug751885.mkv ! matroskademux ! \ avdec_h264 ! videoconvert ! video/x-raw,format=NV12 ! \ vaapiencode_h264 rate-control=cbr bitrate=3000 ! \ h264parse ! matroskamux ! progressreport ! \ filesink location=bake-cbr-3000.mkv with VA-API version 0.38.0 / intel-driver 1.6.2 / HSW / gstreamer-vaapi master I don't see horizontal stripes, but I see compression artifacts when there's a lot of information in the frame.
(In reply to Víctor Manuel Jáquez Leal from comment #8) > I don't see horizontal stripes, but I see compression artifacts when there's > a lot of information in the frame. Now I have two laptops: one with Haswell and HD5500 and one with Sandy Bridge with HD3000. Haswell encodes video fine with little to no artefacts but Sandy Bridge result you can see on the video in first post. Just re-tested it using your command on Sandy Bridge with VA-API version 0.38.0, libva 1.6.1, libva-intel-driver 1.6.1, gstreamer-vaapi 0.6.0. Everything is the same except there is "Unrepairable underflow!" error just on the start. The video encodes successfully though.
(In reply to ValdikSS from comment #9) > (In reply to Víctor Manuel Jáquez Leal from comment #8) > > I don't see horizontal stripes, but I see compression artifacts when there's > > a lot of information in the frame. > > Now I have two laptops: one with Haswell and HD5500 and one with Sandy > Bridge with HD3000. Haswell encodes video fine with little to no artefacts > but Sandy Bridge result you can see on the video in first post. > > Just re-tested it using your command on Sandy Bridge with VA-API version > 0.38.0, libva 1.6.1, libva-intel-driver 1.6.1, gstreamer-vaapi 0.6.0. > Everything is the same except there is "Unrepairable underflow!" error just > on the start. The video encodes successfully though. ValdikSS, Thanks for the testing,,,. Lets move to libva-intel-driver then :)
ValdikSS, could you please file a bug against intel-driver here: https://bugs.freedesktop.org/enter_bug.cgi?product=libva Provide this bug report as reference too..
Done. https://bugs.freedesktop.org/show_bug.cgi?id=92075
Thanks for taking the time to report this. However, as mentioned this bug looks no related with gstreamer-vaapi but with libva intel backend, and the bug was moved to that tracker. Hence, I'm closing this bug as invalid. Nonetheless, if the bug needs to be handled in gstreamer-vaapi, please re-open it. Thanks again!