以下缩写词在ffmpeg和中的含义是什么ffprobe?
>ffprobe -hide_banner logo.gif\nInput #0, gif, from \'logo.gif\':\n Duration: N/A, bitrate: N/A\n Stream #0:0: Video: gif, bgra, 320x314, 33.33 fps, 33.33 tbr, 100 tbn, 100 tbc\nRun Code Online (Sandbox Code Playgroud)\n\n我想 fps 是每秒帧数,但我不知道其他是什么。该文档没有帮助。tbr未找到。https://www.ffmpeg.org/ffmpeg.html
我tbr在https://www.ffmpeg.org/ffmpeg-all.html找到了,但没有意义
\xe2\x80\x98TBR\xe2\x80\x99\ntop back right\nRun Code Online (Sandbox Code Playgroud)\n\n常见问题解答也没有帮助。https://www.ffmpeg.org/faq.html
\n\n与网络搜索一样https://duckduckgo.com/?q=ffmpeg+fps%2C+tbr%2C+tbn%2C+tbc&ia=web
\n| 缩写 | 满的 | 多变的 | 解释 |
|---|---|---|---|
| 帧率 | 每秒帧数 | AVStream.avg_frame_rate | 平均帧率=总帧数/总秒数。可变帧率视频的 fps 可能为 57.16 |
| tbr | 时基,实数(?) | AVStream.r_frame_rate | 用户友好的目标帧速率。上面相同的可变帧率视频的 tbr 可能为 60。 |
| TBN | 时基数(?) | AVStream.time_base | 时间刻度(每秒滴答数)。该数字可以是 90000、15360 等。它用于根据 PTS(演示时间戳)计算实际时间。如果时间刻度为 90000,并且帧的 PTS 为 45000,则该帧将显示在 0.5 秒处。 (注意:这个缩写和变量名是用词不当,因为它实际上是时间刻度,而不是时基。时基应该是倒数,例如 1/90000、1/15360 等) |
| 待定 | 时基、编解码器(?) | AVCodecContext.time_base | 编解码器时间刻度。与 tbn 相同,但针对编解码器。这已被弃用并删除。 |
源代码中没有提及解释 tbr、tbn、tbc 的完整单词。我的猜测是,tbr、tbn、tbc 最初是有含义的,但原来的名称不再适用,现在可能是用词不当。例如,tbn甚至不是时基,而是时间刻度(倒数)。我根据源代码的线索猜测了原始的完整单词。
参考
变量名称:https://github.com/FFmpeg/FFmpeg/commit/bb3388fd60e55db0b162dc78409ae495cbc6b64f
fps(AVStream.avg_frame_rate):
https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h
/**
* Average framerate
*/
AVRational avg_frame_rate;
Run Code Online (Sandbox Code Playgroud)
tbr(AVStream.r_frame_rate):
https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h
/**
* Real base framerate of the stream.
* This is the lowest framerate with which all timestamps can be
* represented accurately (it is the least common multiple of all
* framerates in the stream). Note, this value is just a guess!
* For example, if the time base is 1/90000 and all frames have either
* approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
*/
AVRational r_frame_rate;
Run Code Online (Sandbox Code Playgroud)
tbn(AVStream.time_base):
https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h
/**
* This is the fundamental unit of time (in seconds) in terms
* of which frame timestamps are represented.
*/
AVRational time_base;
Run Code Online (Sandbox Code Playgroud)
tbc (AVCodecContext.time_base) 已被弃用/删除:
https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/avcodec.h
/**
* This is the fundamental unit of time (in seconds) in terms
* of which frame timestamps are represented. For fixed-fps content,
* timebase should be 1/framerate and timestamp increments should be
* identically 1.
* This often, but not always is the inverse of the frame rate or field rate
* for video. 1/time_base is not the average frame rate if the frame rate is not
* constant.
*/
AVRational time_base;
Run Code Online (Sandbox Code Playgroud)
tbc 的弃用提交:
小智 2
对于 mp4/mov 文件,“tbn”是在 mdhd-box 中发出信号的时间刻度值。每个基本流在 mp4 容器中都有自己的轨道,因此有自己的 MDHD 盒和自己的时间尺度。“tbn”与帧速率或帧持续时间无关。这只是时间尺度。
对于传输流(扩展名“ts”或“m2ts”),“tbn”始终为 90kHz,这是 ISO/IEC 13818-1 的时间尺度。与 mp4 容器不同,ts-container 具有固定的时间尺度(PTS/DTS 为 90kHZ,PCR 为 27MHz)。
| 归档时间: |
|
| 查看次数: |
12756 次 |
| 最近记录: |