时间基的作用

源码来自ffmpeg5.1。

时间基在ffmpeg中是通过数据结构有理数AVRational描述的。时间基为时间戳的单位,比如时间基tbn(AVStream.time_base)=0.001秒,AVPacket的pts=40,则表明该AVPacket要在tbn*pts=0.04秒开始显示。

/**  代码路径\ffmpeg\libavutil\rational.h* Rational number (pair of numerator and denominator). 有理数(通过分子和分母描述) */
typedef struct AVRational{int num; ///< Numerator 分子int den; ///< Denominator 分母
} AVRational;

ffmpeg官方对tbn、tbc、tbr的解释

There are three different time bases for time stamps in FFmpeg. The
values printed are actually reciprocals of these, i.e. 1/tbr, 1/tbn and
1/tbc.

ffmpeg有3种不同的时间基,通常用倒数的形式表示,比如1/tbr, 1/tbn and
1/tbc

tbn is the time base in AVStream that has come from the container, I
think. It is used for all AVStream time stamps.

tbn是AVStream的时间基,来自容器,被AVStream的所有时间戳使用

tbc is the time base in AVCodecContext for the codec used for a
particular stream. It is used for all AVCodecContext and related time
stamps.

tbc是AVCodecContext的时间基用于一段特定流的codec,用于AVCodecContext

内的成员以及相关时戳使用

tbr is guessed from the video stream and is the value users want to see
when they look for the video frame rate, except sometimes it is twice
what one would expect because of field rate versus frame rate.

从视频流中猜算得到,可能是帧率或场率(帧率的 2 倍)

tbn:

FFmpeg: AVStream Struct Reference

tbc:

FFmpeg: AVCodecContext Struct Reference

tbr:

从视频流中猜算得到,可能是帧率或场率(帧率的 2 倍)

参考:

FFmpeg时间戳详解 - 叶余 - 博客园

ffmpeg-时间基tbn、tbc、tbr相关推荐

  1. ffmpeg时间基种类及转换

    时间基相关结构 时间基种类 时间基转换函数 ffmpeg中时间基特殊使用 一.ffmpeg中时间基相关数据结构: typedef struct AVRational{ int num; ///< ...

  2. 音视频学习之ffmpeg时间戳相关整理(时间基tbr,tbn,tbc)

    1: I帧/P帧/B帧 I帧:I帧(Intra-coded picture, 帧内编码帧,常称为关键帧)包含⼀幅完整的图像信息,属于帧内编码图像,不含运动⽮量,在解码时不需要参考其他帧图像.因此在I帧 ...

  3. 音视频学习之时间戳相关整理(时间基tbr,tbn,tbc)

    1: I帧/P帧/B帧 I帧:I帧(Intra-coded picture, 帧内编码帧,常称为关键帧)包含⼀幅完整的图像信息,属于帧内编码图像,不含运动⽮量,在解码时不需要参考其他帧图像.因此在I帧 ...

  4. 几个FFmpeg 视频参数 fps、tbr、tbn、tbc

    几个FFmpeg 视频参数 fps.tbr.tbn.tbc 我们用Ffplay播放文件或者视频流命令行会出现fps.tbr.tbn.tbc等参数如下图所示 图1 ffplay 播放文件示意图 fps表 ...

  5. 【FFmpeg】tbr tbn tbc

    tbr tbn tbc LAS本地转码不指定,则从视频文件拷贝参数 这是快手的: 看起来也是一样的: Duration: N/A, start: 1612149.198000, bitrate: 22 ...

  6. FFmpeg之视频封装格式、流媒体协议、视频编解码协议和传输流格式、时间戳和时间基、视频像素数据

    通用视频分析工具:Mediainfo.Elecard StreamEye(视频编码分析工具); 视频封装格式: ********************MP4****************** MP ...

  7. tbr tbn tbc

    tbr tbn tbc http://tech.bobgo.net/?m=201004 因为最近的工作需要从MP4视频中提取一些关键帧,要了解如何将视频的时间点转换为对应的帧号,所以查阅了一些关于视频 ...

  8. tbr tbn tbc 的意思

    因为最近的工作需要从MP4视频中提取一些关键帧,要了解如何将视频的时间点转换为对应的帧号,所以查阅了一些关于视频编解码以及时间同步方式的资料.再此总结一下. 首先是解码,利用FFmpeg解码得到的信息 ...

  9. FFmpeg中的时间基(time_base), AV_TIME_BASE

    FFmpeg中的时间基(time_base), AV_TIME_BASE 一. AV_TIME_BASE 经常在FFmpeg的代码中看到一个奇怪的单位 AV_TIME_BASE ,比如 AVForma ...

最新文章

  1. python计算每月工资-Python实现扣除个人税后的工资计算器示例
  2. 开发高质量软件需要更高成本吗?
  3. kafka安装_安装Kafka
  4. java 根据预览图片上传_JavaSctit 利用FileReader和滤镜上传图片预览功能
  5. Origin一键复制粘贴,也能批量更改图片格式
  6. 6.变量的使用.rs
  7. python注入点查找_sqlmap常用注入点检测爆破命令
  8. 【转】2.2[译]async/await中阻塞死锁
  9. mui 头部tab代码
  10. [转]异步性能:了解 Async 和 Await 的成本
  11. matlab 28m35,F28M35M22C
  12. 为热门项目 若依(ruoyi) 添加请求日志输出
  13. jdbc中excute,excuteUpdate,excuteQuery函数解释
  14. 挂机平台android,红手指手游挂机平台
  15. 4和2大于号小于号箭头那边_小于号怎么打键盘(大于小于号怎么区分)
  16. 信用卡逾期别慌,有的逾期记录可撤销
  17. xctf攻防世界web新手练习区--write up
  18. 自然语言处理-jieba
  19. 计算菜价python
  20. Linux_rpm安装

热门文章

  1. 70行python代码实现qq视频加特效效果
  2. 数据库连接及数据库连接池
  3. 机器视觉中的像素、分辨率、灰度值等概念
  4. 58字体加密解决思路
  5. 2021-09-11职场规则
  6. Infrastructure 知识: dnf对module的处理
  7. 全球首届VueConf演讲PPT和视频免费公开
  8. 电子签名行业2017新风向
  9. Machine Learning Week5
  10. Android视频流解码