时间基相关的定义
tbr 表示帧率,该参数倾向于一个基准,往往tbr跟fps相同。(the time base in AVStream that has come from the container)
tbn 表示视频流 timebase(时间基准),比如ts流的timebase 为90000,flv格式视频流timebase为1000 (the time base in AVCodecContext for the codec used for a particular stream)
tbc 表示视频流codec timebase ,对于264码流该参数通过解析sps间接获取(通过sps获取帧率)(tbr is guessed from the video stream and is the value users want to see when they look for the video frame rate)
时间基相关的设置
分别设置tbn为80k、tbc为45、tbr为25
ffmpeg -hide_banner -i input.mp4 -c:v libx264 -time_base 1/80000 -enc_time_base 1/45 -r 25 -f mp4 output.mp4 -y
output视频输出信息
Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 720x1280, q=-1--1, 25 fps, 80k tbn, 45 tbc (default)
文末获取FFmpeg资料