首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > 多媒体 >

live555 264视频时间戳有关问题

2013-06-25 
live555 264视频时间戳问题//注意!注意!注意!此处计算时间戳!!186:if (thisNALUnitEndsAccessUnit) {187:u

live555 264视频时间戳问题

//注意!注意!注意!此处计算时间戳!!     
186:         if (thisNALUnitEndsAccessUnit) {    
187:             usingSource()->fPictureEndMarker = True;    
188:             ++usingSource()->fPictureCount;    
189:     
190:             // Note that the presentation time for the next NAL unit will be different:     
191:             struct timeval& nextPT = usingSource()->fNextPresentationTime; // alias     
192:             nextPT = usingSource()->fPresentationTime;    
193:             double nextFraction = nextPT.tv_usec / 1000000.0    
194:                     + 1 / usingSource()->fFrameRate;    
195:             unsigned nextSecsIncrement = (long) nextFraction;    
196:             nextPT.tv_sec += (long) nextSecsIncrement;    
197:             nextPT.tv_usec = (long) ((nextFraction - nextSecsIncrement)    
198:                     * 1000000);    
199:         }    
200:         setParseState();    


time_scale
H264VideoStreamParser
::analyze_seq_parameter_set_data(unsigned& num_units_in_tick, unsigned& time_scale, unsigned& fixed_frame_rate_flag) {
  num_units_in_tick = time_scale = fixed_frame_rate_flag = 0; // default values
analyze_vui_parameters(bv,num_units_in_tick, time_scale, fixed_frame_rate_flag);
time_scale = bv.getBits(32);
这里我跟踪的一些步骤,
请问time_scale 这个东西是和计算时间戳有关的么,这个数据是存在h264文件里的么

[解决办法]
在H264中,如果VUI中的nuit_field_based_flag=0,那么
num_units_in_tic/time_scale表示帧率,如果nuit_field_based_flag=1,那么
num_units_in_tic/time_scale/2表示帧率。

[解决办法]
推荐一款软件给你们,elecard stream tool的工具,可以分析h264、mpeg2/4的语法语义,也就可以看到VUI中的nuit_field_based_flag的信息了
http://www.kuaipan.cn/file/id_71114062737440932.htm


[解决办法]
重给个链接吧http://www.skycn.com/soft/28471.html

热点排行