I met some h.264 video files which show large area of green on the screen without any error when decoding using Video Toolbox while I can decode most other h.264 video files successfully.
Asked
Active
Viewed 706 times
1
-
sps and pps are: 0 0 0 1 67 64 0 1e ac 2c ac d 83 de 6f ff 5 0 5 1 10 0 0 3e 80 0 c 35 8 f1 c2 d3 80 0 0 0 1 68 ee 3c b0 – fernandowei Mar 02 '16 at 07:54
1 Answers
3
VTB will use your hardware decoder. Most hardware decoders are limited to decoding only certain profiles (e.g. only main, not high), levels (e.g. only 5.1, not unrestricted), bitdepths (e.g. only 8, not 10), resolutions (e.g. only up to 1080p, not 4k), chroma formats (e.g. only 4:2:0, not 4:4:4) or whatever.
The green probably means it was an unsupported combination of these terms. From the SPS/PPS, you can figure out the profile/level/etc and use software decoding for these that are unsupported.

Ronald S. Bultje
- 10,828
- 26
- 47
-
Thanks for your answer, Bultje. Yes here I want to figure out what parameters are not supported in VTB in order to decode these video files by using software. The parsing results of sps and pps are as below: – fernandowei Mar 03 '16 at 02:03
-
profile_idc: 100 level_idc: 30 sps_id: 0 chroma_format_idc: 1 bit_depth_luma: 8 bit_depth_chroma: 8 transform_bypass: 0 log2_max_frame_num_minus4: 4 poc_type: 0 log2_max_poc_lsb: 4 ref_frame_count: 2 gaps_in_frame_num_allowed_flag: 0 mb_width_mb_height: 54, 30 frame_mbs_only_flag: 1 crop_sps: 1 vui_parameters_present_flag: 1 – fernandowei Mar 03 '16 at 02:03
-
and for pps: pps_id: 0 sps_id: 0 cabac: 1 pic_order_present 0 slice_group_count 1 ref_count[0]: 1 ref_count[1]: 1 weighted_pred: 0 weighted_bipred_idc: 0 init_qp: 1a init_qs: 1a chroma_qp_index_offset[0]: 0 deblocking_filter_parameters_present: 1 constrained_intra_pred: 0 redundant_pic_cnt_present: 0 – fernandowei Mar 03 '16 at 02:04
-
and in another video file which can be decode by VTB, profile_idc is also 100. And differences from sps and pps between the right and wrong video file are, log2_max_frame_num_minus4(0 for right while 4 for wrong one), weighted_pred(1 for right while 0 for wrong one), weighted_bipred_idc(2 for right while 0 for wrong one) and chroma_qp_index_offset[0](fffffffe for right while 0 for wrong one). – fernandowei Mar 03 '16 at 02:11
-
Something like https://cardinalpeak.com/blog/the-h-264-sequence-parameter-set/ shows much more information in the SPS/PPS, but anyway, I think you're well underway. Try to find (by looking at more files) which features your hardware does not support, and you're done. – Ronald S. Bultje Mar 03 '16 at 13:39
-
great thanks for you, Bultje. From cardinalpeak.com/blog/the-h-264-sequence-parameter-set i found the handsome tool "h264bitstream" and i analyze my video files. Results show me that VTB can't decode h.264 video file successfully when one video frame from this file is divided into multiple slices and one slice is treated as one nalu at the same time. – fernandowei Mar 04 '16 at 08:06