[FFmpeg-user] problem with limitng output bitrate and VBV underflow warning
negin tebyani
negin.tebyani at gmail.com
Sun Apr 9 11:27:17 EEST 2017
forgot to show mediainfo output:
General
Complete name : 300from12000.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 18.2 MiB
Duration : 1mn 0s
Overall bit rate : 2 547 Kbps
Writing application : Lavf56.25.101
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High at L5.0
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1mn 0s
Bit rate : 2 219 Kbps
Nominal bit rate : 300 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 50.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.048
Stream size : 15.9 MiB (87%)
Writing library : x264 core 142 r2495 6a301b6
Encoding settings : cabac=1 / ref=16 / deblock=1:1:1
/ analyse=0x3:0x133 / me=umh / subme=10 / psy=0 / mixed_ref=1 / me_range=16
/ chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 /
fast_pskip=1 / chroma_qp_offset=0 / threads=4 / lookahead_threads=1 /
sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 /
constrained_intra=0 / bframes=10 / b_pyramid=2 / b_adapt=2 / b_bias=0 /
direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=288 / keyint_min=24
/ scenecut=42 / intra_refresh=0 / rc_lookahead=60 / rc=cbr / mbtree=1 /
bitrate=300 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=35 / qpstep=4 /
vbv_maxrate=300 / vbv_bufsize=1000 / nal_hrd=none / filler=0 /
ip_ratio=1.40 / aq=1:0.00
Language : English
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 1mn 0s
Duration_LastFrame : -11ms
Bit rate mode : Constant
Bit rate : 320 Kbps
Channel count : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : 40ms
Stream size : 2.29 MiB (13%)
Language : English
On Sun, Apr 9, 2017 at 12:56 PM, negin tebyani <negin.tebyani at gmail.com>
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
>
> 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.
>
> and during the convert process i get the VBV underflow warning after a
> short time passes. until that warning hasn't showed up, the bitrate seems
> to be fine. but after that the bitrate starts to get higher.
>
> 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
> video:16252kB audio:2346kB subtitle:0kB other streams:0kB global
> headers:0kB muxing overhead: 0.363480%
> [libx264 @ 0x20bb0c0] frame I:15 Avg QP:30.80 size: 46683
> [libx264 @ 0x20bb0c0] frame P:592 Avg QP:31.14 size: 16537
> [libx264 @ 0x20bb0c0] frame B:2393 Avg QP:34.69 size: 2570
> [libx264 @ 0x20bb0c0] consecutive B-frames: 0.8% 3.3% 5.4% 9.6% 3.3%
> 76.2% 0.7% 0.0% 0.6% 0.0% 0.0%
> [libx264 @ 0x20bb0c0] mb I I16..4: 37.0% 48.8% 14.2%
> [libx264 @ 0x20bb0c0] mb P I16..4: 9.1% 9.4% 1.0% P16..4: 24.2% 7.5%
> 5.7% 0.8% 0.1% skip:42.2%
> [libx264 @ 0x20bb0c0] mb B I16..4: 0.4% 0.2% 0.0% B16..8: 17.9% 4.2%
> 0.7% direct: 0.9% skip:75.6% L0:37.7% L1:49.0% BI:13.3%
> [libx264 @ 0x20bb0c0] 8x8 transform intra:46.4% inter:49.8%
> [libx264 @ 0x20bb0c0] direct mvs spatial:99.9% temporal:0.1%
> [libx264 @ 0x20bb0c0] coded y,uvDC,uvAC intra: 18.8% 27.9% 7.3% inter:
> 5.6% 3.5% 0.3%
> [libx264 @ 0x20bb0c0] i16 v,h,dc,p: 29% 46% 10% 15%
> [libx264 @ 0x20bb0c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 19% 55% 3% 2%
> 3% 3% 2% 3%
> [libx264 @ 0x20bb0c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 30% 17% 3% 5%
> 6% 5% 4% 4%
> [libx264 @ 0x20bb0c0] i8c dc,h,v,p: 65% 20% 8% 6%
> [libx264 @ 0x20bb0c0] Weighted P-Frames: Y:5.6% UV:4.6%
> [libx264 @ 0x20bb0c0] ref P L0: 57.1% 15.8% 13.9% 3.3% 2.4% 1.7% 1.3%
> 0.6% 0.6% 0.8% 0.5% 0.4% 0.4% 0.4% 0.4% 0.3%
> [libx264 @ 0x20bb0c0] ref B L0: 84.1% 9.0% 2.3% 1.4% 0.6% 0.6% 0.6%
> 0.2% 0.2% 0.3% 0.2% 0.2% 0.1% 0.1% 0.1%
> [libx264 @ 0x20bb0c0] ref B L1: 96.4% 3.6%
> [libx264 @ 0x20bb0c0] kb/s:2218.78
>
>
> and here is a demo of video:
>
> https://streamable.com/e6dbg
>
>
>
>
>
>
>
More information about the ffmpeg-user
mailing list