[FFmpeg-user] problem with limitng output bitrate and VBV underflow warning

Moritz Barsnick barsnick at gmx.net
Sun Apr 9 14:54:36 EEST 2017

On Sun, Apr 09, 2017 at 12:56:01 +0430, negin tebyani wrote:
> I am using this commad to transcode a video with 12000k bitrate to a lower
> bitrate like 300k.
> here is my command:
> ffmpeg -i 12000.mp4 -movflags faststart -c:v libx264 -x264opts
> 'keyint=288:min-keyint=24:8x8dct:sliced-threads=0' -deblock 1:1 -flags
> +loop -b:v 300k -maxrate 300k -bufsize 1000k -tune psnr  -vf
> "scale=-1280:720:flags=spline+full_chroma_inp+full_chroma_int+accurate_rnd+bitexact"
> -acodec libfdk_aac -b:a 320k -coder 1 -me_range 16 -sc_threshold 42 -bf 10
> -q:v 1 -qmin 0 -qmax 35 -trellis 2 -mbtree 1 -mixed-refs 1 -preset veryslow
> video.mp4
> here is my console output:
> [libx264 @ 0x20bb0c0] VBV underflow (frame 2992, -20064 bits)
> [libx264 @ 0x20bb0c0] VBV underflow (frame 2993, -13888 bits)
> [libx264 @ 0x20bb0c0] VBV underflow (frame 2995, -520 bits)
> [libx264 @ 0x20bb0c0] VBV underflow (frame 2996, -992 bits)
> [libx264 @ 0x20bb0c0] VBV underflow (frame 2997, -1320 bits)
> [libx264 @ 0x20bb0c0] VBV underflow (frame 2998, -9528 bits)
> [libx264 @ 0x20bb0c0] VBV underflow (frame 2999, -744 bits)
> [mp4 @ 0x20ba1e0] Starting second pass: moving the moov atom to the
> beginning of the file
> frame= 3000 fps= 13 q=-1.0 Lsize=   18665kB time=00:01:00.01
> bitrate=2547.9kbits/s

negin, on this list you are kindly asked to provide the actual command
line you are using, along with the complete, uncut console output. In
your e-mail, you are omitting important information.

Furthermore, I can see (guess!) that you are using a rather old version
of ffmpeg. (I would know for sure if you had provided the complete
console output.) We also kindly ask you to try with the latest version
first, before reporting. If you can't build for yourself, you can find
binaries built from git master both for Linux
(http://johnvansickle.com/ffmpeg/) and Windows
(https://www.johnvansickle.com/ffmpeg/). Choose "git", not "release".

> I need the bitrate to be 2000, but after using this command and using media
> info, I see that bitrate is different from what I specified (2000 for
> ecample) and there is a nominal bitrate which is what I specified in my
> command.

The mediainfo output you provided in the other e-mail is for a 300k
encoding, not a 2000k encoding. Please don't mix up cases! Output from
ffprobe instead of mediainfo should be just fine, BTW, unless mediainfo
is telling you something ffprobe isn't.

> [libx264 @ 0x20bb0c0] VBV underflow (frame 2992, -20064 bits)

I don't know anything about this though. ;-)

> https://streamable.com/e6dbg

Which is totally different (and thereby irrelevant), because that site
apparently re-encodes your uploaded video. Mixing up all these things
is making it really difficult to understand the actual issue.


More information about the ffmpeg-user mailing list