189

I am using ffmpeg to tell me video info. Specifically:

ffmpeg -i video.ext

I get the output:

Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x576 [PAR 12:11 DAR 4:3], 9578 kb/s, 25 tbr, 90k tbn, 50 tbc

Does anyone know what tbr, tbn and tbc are exactly? I have seen speculation on the net but nothing definitive?

1
  • 9
    This should be transferred to video.se if possible – v010dya Nov 9 '14 at 9:07
210

Well it's all about time. FFMpeg uses in fact three different timestamps in different bases in order to work.

  • 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

This was also asked on the FFmpeg mailing lists: What does the output of ffmpeg mean? tbr tbn tbc etc?

10
  • 7
    Thanks for this - the way 'I think' was used in these posts - I wasn't sure whether it was 'fact' or 'opinion'. How does TBR relate to frame per second exactly and under what conditions do they differ and why? – user7289 Jul 7 '10 at 23:05
  • 6
    Also see this answer and the ffmpeg source – djvg Sep 25 '17 at 8:31
  • 12
    "the time base in AVStream that has come from the container" is a meaningless sentence. – Chloe Sep 29 '18 at 6:04
  • 17
    @Gyan What is a "time base"? What is an "AVStream"? What is a "container"? Why would a time value come from a container? Isn't time objective? Same with all 3. This answer needs more words. Try rewording it first with the smallest number of basic English words, then second, append a longer version with many more words describing each jargon term in plain language, and how they related to each other, with examples. – Chloe Sep 29 '18 at 17:34
  • 7
    @Chloe time base: basis from which timing of frames is determined; avstream: audio/video sequential data; container: file format that can contain channels of audio/video data, such as avi, mp4, or mkv; these are digital video words, likely from the ffmpeg source, but I think what you are saying is that the answer does not explain these ffmpeg terms, which is valid. – fuzzyTew Apr 11 '19 at 15:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.