GNOME Bugzilla – Bug 762922
Fail to play H265 video decode if the video in matroska container in gstreamer-vaapi
Last modified: 2016-03-11 15:50:49 UTC
gstreamer framework 1.6.1 version gstreamer-vaapi 1.6.0 or 0.7.1.1 version. For gstreamer-vaapi 1.6.0 version, I changed to gstreamer minimum requirement support to 1.6.1 instead 1.6.3 to run the test. For gstreamer-vaapi master: I changed to gstreamer minimum requirement support to 1.6.1 instead 1.7.1.1. to run the test. And revert commit id for vp9 parser checking is been removed out from master branch (to avoid compilation error causing in my system that using 1.6.1) just to do test. Most of the H265 video clip in matroska container format not able to play. But if I'm extract the video to elementary stream (without matroska container format), I'm able to play the video. I also test with master branch side, and this issue get fixed by this commit id in master branch: From 6034734d733e8514e2aaa6d4d625b70985317b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <victorx.jaquez@intel.com> Date: Wed, 17 Feb 2016 13:43:48 +0100 Subject: [PATCH] vaapidecode: use video decoder getcaps() The usage of getcaps() vmethod is preferred than to handle manually the sink's caps query. In order to avoid function declarations, this patch moves the class_init() method to the end of the file. --- gst/vaapi/gstvaapidecode.c | 120 +++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 70 deletions(-) Will you push this commit to 1.6 branch?
> For gstreamer-vaapi master: > I changed to gstreamer minimum requirement support to 1.6.1 instead 1.7.1.1. > to run the test. > And revert commit id for vp9 parser checking is been removed out from master > branch (to avoid compilation error causing in my system that using 1.6.1) > just to do test. I'm aware of the why the compilation error happen my system and reason behind mention inside this commmit id: f1bdf09cb4cc874e644b1a7ac81b536dc8fae1dd for "build: remove vp9 parser check" is been removed". > > From 6034734d733e8514e2aaa6d4d625b70985317b2c Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= > <victorx.jaquez@intel.com> > Date: Wed, 17 Feb 2016 13:43:48 +0100 > Subject: [PATCH] vaapidecode: use video decoder getcaps() > > The usage of getcaps() vmethod is preferred than to handle manually the > sink's > caps query. > > In order to avoid function declarations, this patch moves the class_init() > method to the end of the file. > --- > gst/vaapi/gstvaapidecode.c | 120 > +++++++++++++++++++-------------------------- > 1 file changed, 50 insertions(+), 70 deletions(-) > > Will you push this commit to 1.6 branch? Tested using this commit, apply in gstreamer-vaapi 1.6.0 release, it is working.
You need to add another patch above that: 861ef4d (origin/master, master) vaapidecode: intersect with filter in getcaps() That's the last in master right now. Because the patch you mention is incomplete. And I'm pretty sure that it is working by mistake :D I don't have a computer with H.265 decoding capabilities for the moment. Could you upload the logs with GST_DEBUG="*:3,vaapi*:5" ??
So, is it fixed?
(In reply to Sebastian Dröge (slomo) from comment #3) > So, is it fixed? It is not, as far as I know. But also it is not clear for me what is the problem. I need to see the logs. (Thanks for the NEEDINFO tag)
(In reply to Víctor Manuel Jáquez Leal from comment #4) > (In reply to Sebastian Dröge (slomo) from comment #3) > > So, is it fixed? > > It is not, as far as I know. But also it is not clear for me what is the > problem. > I need to see the logs. > > (Thanks for the NEEDINFO tag) I will get back the information for you asap. Currently my image is crash.
(In reply to Víctor Manuel Jáquez Leal from comment #2) > You need to add another patch above that: > > 861ef4d (origin/master, master) vaapidecode: intersect with filter in > getcaps() > > That's the last in master right now. Because the patch you mention is > incomplete. And I'm pretty sure that it is working by mistake :D > > I don't have a computer with H.265 decoding capabilities for the moment. > Could you upload the logs with GST_DEBUG="*:3,vaapi*:5" ?? I'm cloning new image. To re-test again. Ever with or without 2 patch [861ef4d (origin/master, master) vaapidecode: intersect with filter in getcaps() + vaapidecode: use video decoder getcaps() + 1.6.0 release code base]. It didn't work anymore. :( Now very consistent getting the error same failure. vainfo: root@intel-corei7-64:~# vainfo libva info: VA-API version 0.38.1 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib64/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_38 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.38 (libva 1.6.3.pre1) vainfo: Driver version: Intel i965 driver for Intel(R) Broxton - 1.6.3.pre1 (1.6.1-95-gc180143) vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264MultiviewHigh : VAEntrypointVLD VAProfileH264MultiviewHigh : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileH264StereoHigh : VAEntrypointEncSlice VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointVLD gst command pipeline: gst-launch-1.0 -v filesrc location=/home/test/test_Main_at_L3.mkv ! matroskademux ! vaapidecode ! vaapisink gstreamer 1.6.1 version gst-plugins-base 1.6.1 version gst-plugins-bad 1.6.1 version gstreamer-vaapi 1.6.1 version.
Created attachment 322962 [details] debug log Attached the debug log.
I'm using mkvextract too to extract same video out from mkv file. It is working and able to play for same video. Example: mkvextract.exe tracks hevc.mkv -f 0:bitstream.265
(In reply to Lim Siew Hoon from comment #8) > I'm using mkvextract too to extract same video out from mkv file. It is > working and able to play for same video. > > Example: > mkvextract.exe tracks hevc.mkv -f 0:bitstream.265 Using this mkvextract tool to remove the mkv file container. gst command pipeline: gst-launch-1.0 -v filesrc location=/home/test/bitsrream.265 ! h265parse ! vaapidecode ! vaapisink
Created attachment 323508 [details] gst_debug_h265.log Switch over to git master and using gstreamer environment: 1.7.90. Still able to consistent reproduce the issue. (gdb) bt
+ Trace 236039
from parse_slice function, it call to gst_h265_parser_parse_slice_hdr function. if (nalu->type >= GST_H265_NAL_SLICE_BLA_W_LP && nalu->type <= RESERVED_IRAP_NAL_TYPE_MAX) READ_UINT8 (&nr, slice->no_output_of_prior_pics_flag, 1); READ_UE_MAX (&nr, pps_id, GST_H265_MAX_PPS_COUNT - 1); pps = gst_h265_parser_get_pps (parser, pps_id); if (!pps) { GST_WARNING ("couldn't find associated picture parameter set with id: %d", pps_id); return GST_H265_PARSER_BROKEN_LINK; -> exit from here due to pps is NULL. ...
So this issue seems to be in git master too, right? Please share the video sample...
(In reply to sreerenj from comment #11) > So this issue seems to be in git master too, right? Yes, happen in master. > Please share the video sample... I already share the link send to your office email. :D
This is an issue while handling packetized stream (hvc) in vaapidecoder . if you convert to byte-stream (adding a capsfilter "video/x-h265, stream-format=bytestream" after h265parse ) it will work.. We have to fix this. Hope i can have a look in the afternoon..
Created attachment 323692 [details] [review] Fix decoder: h265: Fix offset calculation in codec_data Could you please have a try with this patch?
Review of attachment 323692 [details] [review]: pushed, commit a486942ba2d44ba2f60fec25175c681786021b48 Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com> Date: Fri Mar 11 17:44:07 2016 +0200 decoder: h265: Fix offset calculation in codec_data parsing https://bugzilla.gnome.org/show_bug.cgi?id=762922
Closing, please feel free to reopen if issue persists.