PTS,DTS,CTS和I,P,B帧的关系
来源:互联网 发布:淘宝详情分割线 编辑:程序博客网 时间:2024/05/22 10:36
今天终于弄懂以上几个关系。
I frame 的解码不依赖于任何的其它的帧.
p frame的解码则依赖于其前面的I frame或者P frame.
B frame的解码则依赖于其前的最近的一个I frame或者P frame 及其后的最近的一个P frame.
解码顺序:
I P B B B P B B B ...
显示顺序
I B B B P B B B P ...
DTS和PTS的不同:
DTS主要用于视频的解码,在解码阶段使用.
PTS主要用于视频的同步和输出.在display的时候使用.
在没有B frame的情况下.DTS和PTS的输出顺序是一样的.(这点很重要)
compositionTime = (PTS - DTS) / 90.0
AVCVIDEOPACKET
CompositionTime SI24 if AVCPacketType == 1
Composition time offset
0
由于我做的是直播流,为了减少延时,没有使用B帧。故CompositionTime为00 00 00.
特此记录
而x264.h里面x264_picture_t两个成员
int64_t i_pts;
/* Out: frame dts. When the pts of the first frame is close to zero,
* initial frames may have a negative dts which must be dealt with by any muxer */
int64_t i_dts;
/* In: custom encoding parameters to be set from this frame forwards
(in coded order, not display order). If NULL, continue using
parameters from the previous frame. Some parameters, such as
aspect ratio, can only be changed per-GOP due to the limitations
of H.264 itself; in this case, the caller must force an IDR frame
if it needs the changed parameter to apply immediately. */
解码顺序:
I P B B B P B B B ...
显示顺序
I B B B P B B B P ...
- PTS,DTS,CTS和I,P,B帧的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I, P, B帧和PTS, DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- I,P,B帧和PTS,DTS的关系
- MyEclipse启动SVN报错 Failed to load JavaHL Library
- 4.4.2.3 用函数绘图
- setInterval与setTimeout区别详解
- CSS3 简单动画效果
- 运算符重载 加减乘除
- PTS,DTS,CTS和I,P,B帧的关系
- 积分奖励会成为app推广的趋势么
- UI_GestureRecognizer_手势识别器
- PEP 0263 -- Defining Python Source Code Encodings
- Oracle Redo Log File调整大小
- LayoutInflater的inflate函数用法详解
- HTML5移动开发(1)——HTML介绍
- pthread的TLS(THREAD LOCAL STORAGE)
- stcc