H.264流标头 [英] H.264 stream header

查看:163
本文介绍了H.264流标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在开始时使用此标头/参数破坏了视频流。

  00 00 00 01 67 64 00 1E AC D9 40 B0 33 FB C0 44 
00 00 03 00 04 00 00 03 00 C8 3C 58 B6 58 00 00
00 01 68 EB EC B2 2C

我试图找出实际值,但我所猜测的是:

  67  -  AVC / H264 
64 00 - 高调
1E - 30级(十进制)

有谁知道其他字节代表什么?至少,如何计算视频尺寸(宽x高)。我认为它应该是十进制数,但显然不是。还是我都错了,这种方式不起作用?

解决方案

您可以在这里找到答案:



您的数据解码像这样:

序列参数集

  profile_idc 100 
constraint_set0_flag 0
constraint_set1_flag 0
constraint_set2_flag 0
constraint_set3_flag 0
level_idc 30
seq_parameter_set_id 0
chroma_format_idc 1
// ...
num_ ref_frames 4
spaces_in_frame_num_value_allowed_flag 0
pic_width_in_mbs_minus1 43
pic_height_in_map_units_minus1 24
frame_mbs_only_flag 1
direct_8x8_inference_flag 1
frame_cropping_flag 1
frame_crop_left_offset 0
frame_crop_right_offset 0
frame_crop_top_offset 0
frame_crop_bottom_offset 2
vui_parameters_present_flag 1
// ...

图片参数集

  pic_parameter_set_id 0 
seq_parameter_set_id 0
entropy_coding_mode_flag 1
num_slice_groups_minus1 0
// ...


I have corrupted video stream with this header / parameters in the beginning.

00 00 00 01 67 64 00 1E AC D9 40 B0 33 FB C0 44  
00 00 03 00 04 00 00 03 00 C8 3C 58 B6 58 00 00  
00 01 68 EB EC B2 2C  

I’m trying to figure out the actual values, but all I have guessed is that

67 – AVC / H264 
64 00 - High Profile
1E – Level 30 (in decimal)  

Does anybody know what other bytes stand for?

At least, how to calculate video dimensions (Width x Height). I thought it should be decimal numbers but apparently it’s not. Or am I all wrong and it doesn’t work this way?

解决方案

You will find answers here:

Your data decodes like this:

Sequence Parameter Set

profile_idc 100 
constraint_set0_flag 0 
constraint_set1_flag 0 
constraint_set2_flag 0 
constraint_set3_flag 0 
level_idc 30 
seq_parameter_set_id 0 
chroma_format_idc 1 
// ... 
num_ref_frames 4 
gaps_in_frame_num_value_allowed_flag 0 
pic_width_in_mbs_minus1 43 
pic_height_in_map_units_minus1 24 
frame_mbs_only_flag 1 
direct_8x8_inference_flag 1 
frame_cropping_flag 1 
frame_crop_left_offset 0 
frame_crop_right_offset 0 
frame_crop_top_offset 0 
frame_crop_bottom_offset 2 
vui_parameters_present_flag 1 
// ... 

Picture Parameter Set

pic_parameter_set_id 0 
seq_parameter_set_id 0 
entropy_coding_mode_flag 1 
num_slice_groups_minus1 0 
// ... 

这篇关于H.264流标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆