Chinaunix首页 | 论坛 | 博客
  • 博客访问: 158004
  • 博文数量: 47
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 256
  • 用 户 组: 普通用户
  • 注册时间: 2013-10-10 09:15
个人简介

熟悉多种视频标准,如h.264, MPEG-2/MPEG-4, AVS.

文章分类

全部博文(47)

文章存档

2015年(5)

2014年(22)

2013年(20)

我的朋友

分类: LINUX

2014-04-24 15:06:43


libavformat/utils.c

{code}
    if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
        if(st->avg_frame_rate.den && st->avg_frame_rate.num)
            print_fps(av_q2d(st->avg_frame_rate), "fps");
#if FF_API_R_FRAME_RATE             
        if(st->r_frame_rate.den && st->r_frame_rate.num)
            print_fps(av_q2d(st->r_frame_rate), "tbr");
#endif
        if(st->time_base.den && st->time_base.num)
            print_fps(1/av_q2d(st->time_base), "tbn");
        if(st->codec->time_base.den && st->codec->time_base.num)
            print_fps(1/av_q2d(st->codec->time_base), "tbc");
    }
{code}

Stream #0:0: Video: h264 (High), yuv420p, 960x540, 1024 kb/s, 24 tbr, 1k tbn, 48 tbc


  • tbn = the time base in AVStream that has come from the container
  • tbc = the time base in AVCodecContext for the codec used for a particular stream
  • tbr = tbr is guessed from the video stream and is the value users want to see when they look for the video frame rate

tbr: 表示帧率,即24
tbn: 表示文件的时间精度, 即1 seconds 等于1k
tbc: 表示视频的时间精度, 即 1 seconds等于48
阅读(1789) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~