日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) >

ffmpeg 的 tbr tbc 和 tbn的意义

發(fā)布時(shí)間:2023/12/14 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ffmpeg 的 tbr tbc 和 tbn的意义 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

ffmpeg 的 tbr tbc 和 tbn的意義

857人閱讀?評(píng)論(0)?收藏?舉報(bào) ?分類:ffmpeg(45)??音視頻編解碼技術(shù)(26)?

點(diǎn)擊(此處)折疊或打開(kāi)

  • ffmpeg?-i video.flv

  • Stream #0.0[0x1e0]:?Video:?mpeg2video,?yuv420p,?704x576?[PAR 12:11 DAR 4:3],?9578 kb/s,?25 tbr,?90k tbn,?50 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
    不是所有參數(shù)都能得到的,有的文件沒(méi)有這些信息,要看解析層而定。
    代碼如下:

  • if(st->codec->codec_type == CODEC_TYPE_VIDEO){
  • ? if(st->r_frame_rate.den && st->r_frame_rate.num)
  • ? ? print_fps(av_q2d(st->r_frame_rate), "tbr");

  • ? 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");
  • }
  • 25 ? tbr代表幀率;90k tbn代表文件層(st)的時(shí)間精度,即1S=1200k,和duration相關(guān);50 ? tbc代表視頻層(st->codec)的時(shí)間精度,即1S=50,和strem->duration和時(shí)間戳相關(guān)

    總結(jié)

    以上是生活随笔為你收集整理的ffmpeg 的 tbr tbc 和 tbn的意义的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

    如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。