<p>Add <code>-r 25</code> to your command.</p>

<p>The <code>q</code> readout refers to the allowed range for the quantizer. There's no bounds applied in your command, but you can limit by setting one or both of </p>

<p><code>-qmin N</code> and <code>-qmax N</code></p>

<p>Unless you have good reason to, don't change it.</p>

CC BY-SA 4.0
2021-07-18T12:03:53.290Z
How would this set the `tbc` to 50? I have exactly the same problem, I need to set `tbc` to 25 while keeping `fps` to 50
etuardu
CC BY-SA 4.0
2021-07-18T13:11:37.730Z
That's the opposite problem: tbc of 25 and fps of 50. `-r` will set the framerate and libx264 sets its time base (tbc) to twice that.
Gyan
CC BY-SA 3.0
2016-01-22T12:54:09.893Z
2016-01-22T12:54:09.893Z
Gyan
<p>You can accomplish that by adding <code>-r 25</code> or even <code>-r 60</code>, as you like to experiment. Here's example:</p>

<pre><code> ffmpeg -r 25 -i input.mov codec:v copy codec:a copy -f mp4 output.mp4
</code></pre>

<p>instead of</p>

<pre><code>ffmpeg -i input.mov codec:v copy -r 25 codec:a copy -f mp4 output.mp4
</code></pre>

<p>The key I found to be in control exactly what I wanted is to place <code>-r 25</code> right before the input agrument.</p>

CC BY-SA 3.0
2016-08-24T06:52:21.167Z
When streamcopying, this only works for raw video streams.
Gyan
CC BY-SA 3.0
2016-08-24T05:55:54.357Z
2016-08-25T14:59:38.497Z
2016-08-25T14:59:38.497Z
Faron
<p>I need to set tbc option for output video. For example, input video has 25 fps with 50 tbc and my encoded video has 25fps with 25 tbc. I used settb and video_track_timescale but these options did not change tbc. So my question is how can i set double fps for tbc?</p>

<p>Input video log</p>

<blockquote>
<pre><code>Duration: 00:04:41.33, start: 0.000000, bitrate: 1258 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1064 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
</code></pre>
</blockquote>

<p>Output video log</p>

<blockquote>
<pre><code>Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 
    [SAR 1:1 DAR 16:9], q=-1--1, max. 1835 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
</code></pre>
</blockquote>

<p>The ffmpeg command</p>

<pre><code>ffmpeg -y -i input.mp4 -filter_complex "scale=-2:'min(720,ih)',fps=25" -codec:v libx264 
    -profile:v high -level 4.0 -preset slow -minrate 1835k -maxrate 1835k -bufsize 2441k
    -c:a aac -strict experimental -q:a 9 -crf 20 -pix_fmt yuv420p 
    output.mp4 1&gt; output.log 2&gt;&amp;1
</code></pre>

<p>Full output log</p>

<pre><code>ffmpeg version N-76684-g1fe82ab Copyright (c) 2000-2015 the FFmpeg developers     
built with gcc 5.2.0 (GCC)  
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib  
  libavutil      55.  6.100 / 55.  6.100
  libavcodec     57. 15.100 / 57. 15.100
  libavformat    57. 14.100 / 57. 14.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 15.100 /  6. 15.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2015-02-20 11:51:25
  Duration: 00:04:41.33, start: 0.000000, bitrate: 1258 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1064 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      creation_time   : 2015-02-20 11:51:26
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
[libx264 @ 0000001d2ffe0a00] using SAR=1/1
[libx264 @ 0000001d2ffe0a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0000001d2ffe0a00] profile High, level 4.0
[libx264 @ 0000001d2ffe0a00] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1835 vbv_bufsize=2441 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf57.14.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, max. 1835 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.15.100 libx264
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2015-02-20 11:51:26
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
      encoder         : Lavc57.15.100 aac
Stream mapping:
  Stream #0:0 (h264) -&gt; scale (graph 0)
  settb (graph 0) -&gt; Stream #0:0 (libx264)
  Stream #0:1 -&gt; #0:1 (aac (native) -&gt; aac (native))
Press [q] to stop, [?] for help
frame=    3 fps=0.0 q=0.0 size=       0kB time=00:00:05.89 bitrate=   0.1kbits/s dup=0 drop=148
</code></pre>

<p>Also in output video, i see option <strong>q=-1--1</strong>. What is this? How can i configure this option?</p>

CC BY-SA 3.0
2016-03-22T17:56:00.197Z
Is this to create 25 PsF streams or what is the purpose of the operation?
Hans Meiser
CC BY-SA 3.0
2016-03-25T11:40:47.700Z
@HansMeiser No, i just wanted to set double tbc from fps. Now i understood that there is no neccessary to change this option.
nurmat
<ffmpeg><conversion><h.264>
How to set double fps for tbc option of video
nurmat
# How to set double fps for tbc option of video

(Asked by: username_0 on 2016-01-22)

I need to set tbc option for output video. For example, input video has 25 fps with 50 tbc and my encoded video has 25fps with 25 tbc. I used settb and video_track_timescale but these options did not change tbc. So my question is how can i set double fps for tbc?
Input video log

Duration: 00:04:41.33, start: 0.000000, bitrate: 1258 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1064 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)


Output video log

Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 
    [SAR 1:1 DAR 16:9], q=-1--1, max. 1835 kb/s, 25 fps, 12800 tbn, 25 tbc (default)


The ffmpeg command
ffmpeg -y -i input.mp4 -filter_complex "scale=-2:'min(720,ih)',fps=25" -codec:v libx264 
    -profile:v high -level 4.0 -preset slow -minrate 1835k -maxrate 1835k -bufsize 2441k
    -c:a aac -strict experimental -q:a 9 -crf 20 -pix_fmt yuv420p 
    output.mp4 1> output.log 2>&1

Full output log
ffmpeg version N-76684-g1fe82ab Copyright (c) 2000-2015 the FFmpeg developers     
built with gcc 5.2.0 (GCC)  
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib  
  libavutil      55.  6.100 / 55.  6.100
  libavcodec     57. 15.100 / 57. 15.100
  libavformat    57. 14.100 / 57. 14.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 15.100 /  6. 15.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2015-02-20 11:51:25
  Duration: 00:04:41.33, start: 0.000000, bitrate: 1258 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1064 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      creation_time   : 2015-02-20 11:51:26
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
[libx264 @ 0000001d2ffe0a00] using SAR=1/1
[libx264 @ 0000001d2ffe0a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0000001d2ffe0a00] profile High, level 4.0
[libx264 @ 0000001d2ffe0a00] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1835 vbv_bufsize=2441 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf57.14.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, max. 1835 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.15.100 libx264
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2015-02-20 11:51:26
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
      encoder         : Lavc57.15.100 aac
Stream mapping:
  Stream #0:0 (h264) -> scale (graph 0)
  settb (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame=    3 fps=0.0 q=0.0 size=       0kB time=00:00:05.89 bitrate=   0.1kbits/s dup=0 drop=148

Also in output video, i see option q=-1--1. What is this? How can i configure this option?

**Tags:** ffmpeg, conversion, h.264

> **Comments:**
> **username_1**: Is this to create 25 PsF streams or what is the purpose of the operation?  
> **username_0**: @HansMeiser No, i just wanted to set double tbc from fps. Now i understood that there is no neccessary to change this option.  

---

## 2 answers

### Answer by username_2 on 2016-01-22. Score: 1

Add `-r 25` to your command.

The `q` readout refers to the allowed range for the quantizer. There's no bounds applied in your command, but you can limit by setting one or both of

`-qmin N` and `-qmax N`

Unless you have good reason to, don't change it.

> **Comments:**
> **username_3**: How would this set the `tbc` to 50? I have exactly the same problem, I need to set `tbc` to 25 while keeping `fps` to 50  
> **username_2**: That's the opposite problem: tbc of 25 and fps of 50. `-r` will set the framerate and libx264 sets its time base (tbc) to twice that.  

---

### Answer by username_4 on 2016-08-24. Score: 0

You can accomplish that by adding -r 25 or even -r 60, as you like to experiment. Here's example:
 ffmpeg -r 25 -i input.mov codec:v copy codec:a copy -f mp4 output.mp4

instead of
ffmpeg -i input.mov codec:v copy -r 25 codec:a copy -f mp4 output.mp4

The key I found to be in control exactly what I wanted is to place -r 25 right before the input agrument.

> **Comments:**
> **username_2**: When streamcopying, this only works for raw video streams.  

---

