Answers.Body: <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>abbrev</th>
  <th>full</th>
  <th>variable</th>
  <th>explanation</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>fps</td>
  <td>frames per second</td>
  <td>AVStream.avg_frame_rate</td>
  <td>average frame rate = total frames / total seconds. A variable frame rate video may have an fps of 57.16</td>
  </tr>
  <tr>
  <td>tbr</td>
  <td>time base, real (?)</td>
  <td>AVStream.r_frame_rate</td>
  <td>user-friendly, target frame rate. The same variable frame rate video above could have a tbr of 60.</td>
  </tr>
  <tr>
  <td>tbn</td>
  <td>time base number (?)</td>
  <td>AVStream.time_base</td>
  <td>timescale (ticks per second). This number could be 90000, 15360, etc. It is used to <a href="https://stackoverflow.com/questions/43333542/what-is-video-timescale-timebase-or-timestamp-in-ffmpeg/43337235#43337235">calculate the actual time from a PTS</a> (Presentation Time Stamp). If timescale is 90000, and PTS for a frame is 45000, that frame is displayed at 0.5 seconds.<br/><br/>(Note: this abbreviation and variable name is a misnomer because it is actually timescale, not timebase. Timebase should be the reciprocal, such as 1/90000, 1/15360, etc.)</td>
  </tr>
  <tr>
  <td>tbc</td>
  <td>time base, codec (?)</td>
  <td>AVCodecContext.time_base</td>
  <td>codec timescale. Same as tbn, but for the codec. This has been deprecated and removed.</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>There is no mention in the source code explaining the full words for tbr, tbn, tbc. My guess is that tbr, tbn, tbc originally meant something, but the original names no longer apply, and now would be misnomers. For example, <code>tbn</code> is not even a timebase, it's a timescale (the reciprocal). I made a guess at the original full words based on clues from the source code.</p>
  <hr />
  <p><strong>References</strong></p>
  <ul>
  <li><p>variable names: <a href="https://github.com/FFmpeg/FFmpeg/commit/bb3388fd60e55db0b162dc78409ae495cbc6b64f" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/commit/bb3388fd60e55db0b162dc78409ae495cbc6b64f</a></p>
  </li>
  <li><p>fps (AVStream.avg_frame_rate):</p>
  <p><a href="https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h</a></p>
  <pre><code>/**
   * Average framerate
   */
  AVRational avg_frame_rate;
  </code></pre>
  </li>
  <li><p>tbr (AVStream.r_frame_rate):</p>
  <p><a href="https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h</a></p>
  <pre><code>/**
   * 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;
  </code></pre>
  </li>
  <li><p>tbn (AVStream.time_base):</p>
  <p><a href="https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avformat.h</a></p>
  <pre><code>/**
   * This is the fundamental unit of time (in seconds) in terms
   * of which frame timestamps are represented.
   */
  AVRational time_base;
  </code></pre>
  </li>
  <li><p>tbc (AVCodecContext.time_base) has been deprecated/removed:</p>
  <p><a href="https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/avcodec.h" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/avcodec.h</a></p>
  <pre><code>/**
   * 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;
  </code></pre>
  </li>
  <li><p>deprecation commits for tbc:</p>
  <ul>
  <li><a href="https://github.com/FFmpeg/FFmpeg/commit/202e06870eb4bbc4636aff5f461c1a0654ec2435" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/commit/202e06870eb4bbc4636aff5f461c1a0654ec2435</a></li>
  <li><a href="https://github.com/FFmpeg/FFmpeg/commit/3749eede66c3774799766b1f246afae8a6ffc9bb#diff-a48d0f241f423be450908b536b6adec39606ef72847aeeb500cee81e88a19697" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/commit/3749eede66c3774799766b1f246afae8a6ffc9bb#diff-a48d0f241f423be450908b536b6adec39606ef72847aeeb500cee81e88a19697</a></li>
  <li><a href="https://github.com/FFmpeg/FFmpeg/commit/4796ec5d4ea00a86f9f6732653469e682e5266da" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/commit/4796ec5d4ea00a86f9f6732653469e682e5266da</a></li>
  <li><a href="https://github.com/FFmpeg/FFmpeg/commit/2b41463b8706638b9aaf967655f95ddc195c32eb" rel="nofollow noreferrer">https://github.com/FFmpeg/FFmpeg/commit/2b41463b8706638b9aaf967655f95ddc195c32eb</a></li>
  </ul>
  </li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-28T07:24:11.883Z
Answers.LastActivityDate: 2022-12-28T07:24:11.883Z
Answers.UserDisplayName: wisbucky
Answers.Body: <p>Well it's all about time. FFMpeg uses in fact three different timestamps in different bases in order to work.</p>
  <ul>
  <li><strong>tbn</strong> = the time base in AVStream that has come from the container</li>
  <li><strong>tbc</strong> = the time base in AVCodecContext for the codec used for a particular stream</li>
  <li><strong>tbr</strong> = tbr is guessed from the video stream and is the value users
  want to see
  when they look for the video frame rate</li>
  </ul>
  <p>This was also asked on the FFmpeg mailing lists: <a href="http://ffmpeg-users.933282.n4.nabble.com/What-does-the-output-of-ffmpeg-mean-tbr-tbn-tbc-etc-td941538.html" rel="nofollow noreferrer">What does the output of ffmpeg mean? tbr tbn tbc etc?</a></p>
  <p>Original answer: <a href="https://stackoverflow.com/a/3199582/17011606">Meaning of ffmpeg output (tbc, tbn, tbr) [closed]</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-29T01:54:40.213Z
Answers.LastActivityDate: 2024-07-08T04:00:03.203Z
Answers.LastEditDate: 2024-07-08T04:00:03.203Z
Answers.UserDisplayName: marbens
Body: <p>I am using ffmpeg to tell me video info. Specifically:</p>
  <pre><code>ffmpeg -i video.ext
  </code></pre>
  <p>I get the output:</p>
  <pre><code>Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x576 [PAR 12:11 DAR 4:3], 9578 kb/s, 25 tbr, 90k tbn, 50 tbc
  </code></pre>
  <p>Does anyone know what tbr, tbn and tbc are exactly? I have seen speculation on the Internet but nothing definitive.</p>
  
Tags: <ffmpeg><video>
Title: Meaning of ffmpeg output (tbc, tbn, tbr)
UserDisplayName: marbens
ThreadText: # Meaning of ffmpeg output (tbc, tbn, tbr)
  
  (Asked by: username_0 on 2022-06-29)
  
  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 Internet but nothing definitive.
  
  **Tags:** ffmpeg, video
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2022-06-29. Score: 1 | Accepted answer
  
  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?](http://ffmpeg-users.933282.n4.nabble.com/What-does-the-output-of-ffmpeg-mean-tbr-tbn-tbc-etc-td941538.html)
  
  Original answer: [Meaning of ffmpeg output (tbc, tbn, tbr) [closed]](https://stackoverflow.com/a/3199582/17011606)
  
  
  ---
  
  ### Answer by username_1 on 2022-12-28. Score: 3
  
  | abbrev | full | variable | explanation |
  | --- | --- | --- | --- |
  | fps | frames per second | AVStream.avg\_frame\_rate | average frame rate = total frames / total seconds. A variable frame rate video may have an fps of 57.16 |
  | tbr | time base, real (?) | AVStream.r\_frame\_rate | user-friendly, target frame rate. The same variable frame rate video above could have a tbr of 60. |
  | tbn | time base number (?) | AVStream.time\_base | timescale (ticks per second). This number could be 90000, 15360, etc. It is used to [calculate the actual time from a PTS](https://stackoverflow.com/questions/43333542/what-is-video-timescale-timebase-or-timestamp-in-ffmpeg/43337235#43337235) (Presentation Time Stamp). If timescale is 90000, and PTS for a frame is 45000, that frame is displayed at 0.5 seconds.  (Note: this abbreviation and variable name is a misnomer because it is actually timescale, not timebase. Timebase should be the reciprocal, such as 1/90000, 1/15360, etc.) |
  | tbc | time base, codec (?) | AVCodecContext.time\_base | codec timescale. Same as tbn, but for the codec. This has been deprecated and removed. |
  
  There is no mention in the source code explaining the full words for tbr, tbn, tbc. My guess is that tbr, tbn, tbc originally meant something, but the original names no longer apply, and now would be misnomers. For example, `tbn` is not even a timebase, it's a timescale (the reciprocal). I made a guess at the original full words based on clues from the source code.
  
  ---
  
  **References**
  
  * variable names: <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;
  
    ```
  * 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;
  
    ```
  * 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;
  
    ```
  * tbc (AVCodecContext.time\_base) has been deprecated/removed:
  
    <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;
  
    ```
  * deprecation commits for tbc:
  
    + <https://github.com/FFmpeg/FFmpeg/commit/202e06870eb4bbc4636aff5f461c1a0654ec2435>
    + <https://github.com/FFmpeg/FFmpeg/commit/3749eede66c3774799766b1f246afae8a6ffc9bb#diff-a48d0f241f423be450908b536b6adec39606ef72847aeeb500cee81e88a19697>
    + <https://github.com/FFmpeg/FFmpeg/commit/4796ec5d4ea00a86f9f6732653469e682e5266da>
    + <https://github.com/FFmpeg/FFmpeg/commit/2b41463b8706638b9aaf967655f95ddc195c32eb>
  
  
  ---
  
  