h265parse: fails to parse video for HEVC main still profile
Issue is coming from codecparser from gst-plugins-bad. Used the following command to decode the main still profile encoded stream.
Example: gst-launch-1.0 filesrc location= HoneyBee_3840x2160_MainStill.h265 ! h265parse ! vaapih265dec ! filesink location=/storage/output/HoneyBee_3840x2160_MainStill.yuv
Also tried the following command just to make sure parser can read the stream properly and observed similar issue. We can confirm that this issue is not coming from gstvaapi decoder instead it's coming from h265 codec parser. Added the log observed when running GST_DEBUG for more information.
Example: gst-launch-1.0 filesrc location= HoneyBee_3840x2160_MainStill.h265 ! h265parse ! filesink location=/storage/output/HoneyBee_3840x2160_MainStill.yuv
0:00:00.154077842 29689 0x8c6af0 WARN basesrc gstbasesrc.c:3600:gst_base_src_start_complete: pad not activated yet
Pipeline is PREROLLING ...
Got context from element 'vaapidecode_h265-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"(GstVaapiDisplayDRM)\ vaapidisplaydrm1";
0:00:00.156583488 29689 0x7c3f70 WARN codecparsers_h265 gsth265parser.c:799:gst_h265_parser_parse_short_term_ref_pic_sets: value greater than max. value: 1, max 0
0:00:00.156632914 29689 0x7c3f70 WARN codecparsers_h265 gsth265parser.c:845:gst_h265_parser_parse_short_term_ref_pic_sets: error parsing "ShortTermRefPicSet Parameters"
0:00:00.156644478 29689 0x7c3f70 WARN codecparsers_h265 gsth265parser.c:1827:gst_h265_parse_sps: error parsing "Sequence parameter set"
0:00:00.156665437 29689 0x7c3f70 WARN codecparsers_h265 gsth265parser.c:799:gst_h265_parser_parse_short_term_ref_pic_sets: value greater than max. value: 1, max 0
0:00:00.156682636 29689 0x7c3f70 WARN codecparsers_h265 gsth265parser.c:845:gst_h265_parser_parse_short_term_ref_pic_sets: error parsing "ShortTermRefPicSet Parameters"
0:00:00.156692946 29689 0x7c3f70 WARN codecparsers_h265 gsth265parser.c:1827:gst_h265_parse_sps: error parsing "Sequence parameter set"
0:00:00.156707318 29689 0x7c3f70 WARN h265parse gsth265parse.c:624:gst_h265_parse_process_nal: failed to parse SPS:
0:00:00.156735598 29689 0x7c3f70 WARN h265parse gsth265parse.c:1112:gst_h265_parse_handle_frame: broken/invalid nal Type: 33 SPS, Size: 45 will be dropped
0:00:00.156823129 29689 0x7c3f70 WARN h265parse gsth265parse.c:1112:gst_h265_parse_handle_frame: broken/invalid nal Type: 34 PPS, Size: 8 will be dropped
0:00:00.156897167 29689 0x7c3f70 WARN h265parse gsth265parse.c:1112:gst_h265_parse_handle_frame: broken/invalid nal Type: 19 SLICE_IDR_W_RADL, Size: 36756 will be dropped
0:00:00.156966044 29689 0x7c3f70 WARN baseparse gstbaseparse.c:3626:gst_base_parse_loop: error: No valid frames found before end of stream
ERROR: from element /GstPipeline:pipeline0/GstH265Parse:h265parse0: No valid frames found before end of stream
Additional debug info:
gstbaseparse.c(3626): gst_base_parse_loop (): /GstPipeline:pipeline0/GstH265Parse:h265parse0
ERROR: pipeline doesn't want to preroll.