Discussion:
[FFmpeg-user] VBV underflow : what's the cure? Is it worth it?
sean darcy
2010-10-31 23:18:28 UTC
Permalink
I'm feeling a little dense. I've got a lot of these to transcode, so sorry
for all the stupid questions.
I have no clue why I'm using vbv. AFAICS, there's no option to enable (or
disable) it.
-bufsize and -maxrate are the options to enable it.
ffmpeg --help | grep vbv
.......
-rc_max_vbv_use<float> E.V..
-rc_min_vbv_use<float> E.V..
-crf_max<float> E.V.. in crf mode, prevents vbv from lowering
quality beyond this point
I'm transcoding to use in Android. If I set --level 31 will vbv_* be set to
14000?
No.
OK. Then the rest of the questions are nonsense.
If I still get a vbv warning when level is 31
What do you mean by "get a vbv warning"? If you don't set VBV, you
won't get a VBV warning, by definition.
Then if I still get a vbv warning, am I just out of
luck?
I have no idea what you're talking about.
And, if I do need to set vbv, do I use the options shown above rather than
bufsize and maxrate?
?!?!
So maxrate and bufsize should always be set. If they're not set, what
does x264 use for level 31?

sean
Jason Garrett-Glaser
2010-11-01 05:27:42 UTC
Permalink
Post by sean darcy
I'm feeling a little dense. I've got a lot of these to transcode, so sorry
for all the stupid questions.
I have no clue why I'm using vbv. AFAICS, there's no option to enable (or
disable) it.
-bufsize and -maxrate are the options to enable it.
ffmpeg --help | grep vbv
.......
-rc_max_vbv_use<float> ?E.V..
-rc_min_vbv_use<float> ?E.V..
-crf_max<float> ?E.V.. in crf mode, prevents vbv from lowering
quality beyond this point
I'm transcoding to use in Android. If I set --level ?31 will vbv_* be set
to
14000?
No.
OK. Then the rest of the questions are nonsense.
If I still get a vbv warning when level is 31
What do you mean by "get a vbv warning"? ?If you don't set VBV, you
won't get a VBV warning, by definition.
Then if I still get a vbv warning, am I just out of
luck?
I have no idea what you're talking about.
And, if I do need to set vbv, do I use the options shown above rather than
bufsize and maxrate?
?!?!
So ?maxrate and bufsize should always be set. If they're not set, what does
x264 use for level 31?
sean
x264 doesn't use any by default. You can generally get away with not
setting it unless you're seriously worried about the bitrate exceeding
the max.

Dark Shikari
sean darcy
2010-10-28 01:50:45 UTC
Permalink
I'm transcoding a bunch of old vhs tapes. I copied them fro the vhs deck
to a dv camcorder, and then to files.

ffmpeg -i vacation.dv -acodec libfaac -ab 48k -vcodec libx264 -vpre slow
-level 31 -bufsize 14000 -maxrate 14000 -crf 20 outfile-2.mp4
FFmpeg version SVN-r25585, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 26 2010 21:16:33 with gcc 4.4.4 20100630 (Red Hat 4.4.4-10)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
--shlibdir=/usr/lib64 --extra-cflags='-O2 -march=native -mtune=native
-fopenmp -msse4.1 -ftree-vectorize -I/usr/include/openjpeg'
--enable-static --enable-shared --enable-gpl --enable-nonfree
--enable-version3 --enable-postproc --enable-avfilter --enable-pthreads
--enable-x11grab --enable-gray --enable-vaapi --enable-hardcoded-tables
--enable-frei0r --enable-libdirac --disable-decoder=libdirac
--enable-libfaac --enable-libgsm --enable-libmp3lame
--enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--disable-encoder=libschroedinger --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
--enable-zlib --disable-debug --cpu=core2 --arch=x86_64 --enable-pic
libavutil 50.32. 3 / 50.32. 3
libavcore 0. 9. 1 / 0. 9. 1
libavcodec 52.93. 0 / 52.93. 0
libavformat 52.84. 0 / 52.84. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.53. 0 / 1.53. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[dv @ 0xdde710] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'vacation.dv':
Duration: N/A, start: 0.000000, bitrate: 28771 kb/s
Stream #0.0: Video: dvvideo, yuv411p, 720x480, 28771 kb/s, PAR 8:9
DAR 4:3, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[buffer @ 0xde2f60] w:720 h:480 pixfmt:yuv411p
[ffsink @ 0xde7740] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'src' and the filter 'out'
[scale @ 0xe412e0] w:720 h:480 fmt:yuv411p -> w:720 h:480 fmt:yuv420p
flags:0xa0000004
[libx264 @ 0xde1c10] using SAR=8/9
[libx264 @ 0xde1c10] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.1 Cache64
[libx264 @ 0xde1c10] profile High, level 3.1
[libx264 @ 0xde1c10] 264 - core 106 r1732+8 90efb28 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2010 - 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=1
sliced_threads=0 nr=0 decimate=1 interlaced=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=10 qpmax=51
qpstep=4 vbv_maxrate=40 vbv_bufsize=40 crf_max=0.0 ip_ratio=1.41
aq=1:1.00 nal_hrd=none
Output #0, mp4, to 'outfile-2.mp4':
Metadata:
encoder : Lavf52.84.0
Stream #0.0: Video: libx264, yuv420p, 720x480 [PAR 8:9 DAR 4:3],
q=10-51, 200 kb/s, 30k tbn, 29.97 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, 2 channels, s16, 48 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1


And I get a whole bunch of:

[libx264 @ 0xde1c10] VBV underflow (frame 127, -9035 bits)te=
136.3kbits/s
[libx264 @ 0xde1c10] VBV underflow (frame 128, -8683 bits)te=
148.4kbits/s
[libx264 @ 0xde1c10] VBV underflow (frame 131, -3648 bits)
[libx264 @ 0xde1c10] VBV underflow (frame 1227, -571 bits)ate=
143.3kbits/s
[libx264 @ 0xde1c10] VBV underflow (frame 2156, -5629 bits)te=
144.0kbits/s
[libx264 @ 0xde1c10] VBV underflow (frame 2157, -651 bits)
[libx264 @ 0xde1c10] VBV underflow (frame 3706, -11856 bits)te=
144.3kbits/s
[libx264 @ 0xde1c10] VBV underflow (frame 3707, -5867 bits)


What is this telling me? And should I be worried?

As I understand it, level 3.1 has a max vbv bitrate of 14000 and vbv
buffer of 14000.
http://rob.opendot.cl/index.php/useful-stuff/h264-profiles-and-levels/

And ffmpeg options maxrate and bufsize map to these x264 vbv options.

So:

1. If I just set -level <xx> , do I need to set maxrate and bufsize?

2. Why, when I did set them to 14000, does x264 use vbv_maxrate=40
vbv_bufsize=40?

And what, if anything, does this have to do with vbv underflow?

sean
Jason Garrett-Glaser
2010-10-28 03:45:09 UTC
Permalink
I'm transcoding a bunch of old vhs tapes. I copied them fro the vhs deck to
a dv camcorder, and then to files.
ffmpeg -i vacation.dv -acodec libfaac -ab 48k -vcodec libx264 -vpre slow
-level 31 -bufsize 14000 -maxrate 14000 -crf 20 outfile-2.mp4
FFmpeg version SVN-r25585, Copyright (c) 2000-2010 the FFmpeg developers
?built on Oct 26 2010 21:16:33 with gcc 4.4.4 20100630 (Red Hat 4.4.4-10)
?configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --shlibdir=/usr/lib64
--extra-cflags='-O2 -march=native -mtune=native -fopenmp -msse4.1
-ftree-vectorize -I/usr/include/openjpeg' --enable-static --enable-shared
--enable-gpl --enable-nonfree --enable-version3 --enable-postproc
--enable-avfilter --enable-pthreads --enable-x11grab --enable-gray
--enable-vaapi --enable-hardcoded-tables --enable-frei0r --enable-libdirac
--disable-decoder=libdirac --enable-libfaac --enable-libgsm
--enable-libmp3lame --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --disable-encoder=libschroedinger --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxvid --enable-zlib --disable-debug --cpu=core2 --arch=x86_64
--enable-pic
?libavutil ? ? 50.32. 3 / 50.32. 3
?libavcore ? ? ?0. 9. 1 / ?0. 9. 1
?libavcodec ? ?52.93. 0 / 52.93. 0
?libavformat ? 52.84. 0 / 52.84. 0
?libavdevice ? 52. 2. 2 / 52. 2. 2
?libavfilter ? ?1.53. 0 / ?1.53. 0
?libswscale ? ? 0.12. 0 / ?0.12. 0
?libpostproc ? 51. 2. 0 / 51. 2. 0
?Duration: N/A, start: 0.000000, bitrate: 28771 kb/s
? ?Stream #0.0: Video: dvvideo, yuv411p, 720x480, 28771 kb/s, PAR 8:9 DAR
4:3, 29.97 tbr, 29.97 tbn, 29.97 tbc
? ?Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
the filter 'src' and the filter 'out'
flags:0xa0000004
SSE4.1 Cache64
- Copyleft 2003-2010 - 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=1 sliced_threads=0 nr=0 decimate=1
interlaced=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=10
qpmax=51 qpstep=4 vbv_maxrate=40 vbv_bufsize=40 crf_max=0.0 ip_ratio=1.41
aq=1:1.00 nal_hrd=none
? ?encoder ? ? ? ? : Lavf52.84.0
? ?Stream #0.0: Video: libx264, yuv420p, 720x480 [PAR 8:9 DAR 4:3], q=10-51,
200 kb/s, 30k tbn, 29.97 tbc
? ?Stream #0.1: Audio: libfaac, 48000 Hz, 2 channels, s16, 48 kb/s
?Stream #0.0 -> #0.0
?Stream #0.1 -> #0.1
What is this telling me? And should I be worried?
As I understand it, level 3.1 has a max vbv bitrate of 14000 and vbv buffer
of 14000.
http://rob.opendot.cl/index.php/useful-stuff/h264-profiles-and-levels/
And ffmpeg options maxrate and bufsize map to these x264 vbv options.
1. If I just set -level <xx> , do I need to set maxrate and bufsize?
2. Why, when I did set them to 14000, does x264 use vbv_maxrate=40
vbv_bufsize=40?
Because your bufsize and maxrate are off by a factor of 1000.

Dark Shikari
sean darcy
2010-10-28 22:59:15 UTC
Permalink
Post by Jason Garrett-Glaser
I'm transcoding a bunch of old vhs tapes. I copied them fro the vhs deck to
a dv camcorder, and then to files.
ffmpeg -i vacation.dv -acodec libfaac -ab 48k -vcodec libx264 -vpre slow
-level 31 -bufsize 14000 -maxrate 14000 -crf 20 outfile-2.mp4
FFmpeg version SVN-r25585, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 26 2010 21:16:33 with gcc 4.4.4 20100630 (Red Hat 4.4.4-10)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --shlibdir=/usr/lib64
--extra-cflags='-O2 -march=native -mtune=native -fopenmp -msse4.1
-ftree-vectorize -I/usr/include/openjpeg' --enable-static --enable-shared
--enable-gpl --enable-nonfree --enable-version3 --enable-postproc
--enable-avfilter --enable-pthreads --enable-x11grab --enable-gray
--enable-vaapi --enable-hardcoded-tables --enable-frei0r --enable-libdirac
--disable-decoder=libdirac --enable-libfaac --enable-libgsm
--enable-libmp3lame --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --disable-encoder=libschroedinger --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxvid --enable-zlib --disable-debug --cpu=core2 --arch=x86_64
--enable-pic
libavutil 50.32. 3 / 50.32. 3
libavcore 0. 9. 1 / 0. 9. 1
libavcodec 52.93. 0 / 52.93. 0
libavformat 52.84. 0 / 52.84. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.53. 0 / 1.53. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
Duration: N/A, start: 0.000000, bitrate: 28771 kb/s
Stream #0.0: Video: dvvideo, yuv411p, 720x480, 28771 kb/s, PAR 8:9 DAR
4:3, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
the filter 'src' and the filter 'out'
flags:0xa0000004
SSE4.1 Cache64
- Copyleft 2003-2010 - 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=1 sliced_threads=0 nr=0 decimate=1
interlaced=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=10
qpmax=51 qpstep=4 vbv_maxrate=40 vbv_bufsize=40 crf_max=0.0 ip_ratio=1.41
aq=1:1.00 nal_hrd=none
encoder : Lavf52.84.0
Stream #0.0: Video: libx264, yuv420p, 720x480 [PAR 8:9 DAR 4:3], q=10-51,
200 kb/s, 30k tbn, 29.97 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, 2 channels, s16, 48 kb/s
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
What is this telling me? And should I be worried?
As I understand it, level 3.1 has a max vbv bitrate of 14000 and vbv buffer
of 14000.
http://rob.opendot.cl/index.php/useful-stuff/h264-profiles-and-levels/
And ffmpeg options maxrate and bufsize map to these x264 vbv options.
1. If I just set -level<xx> , do I need to set maxrate and bufsize?
2. Why, when I did set them to 14000, does x264 use vbv_maxrate=40
vbv_bufsize=40?
Because your bufsize and maxrate are off by a factor of 1000.
Dark Shikari
Ah. So the ffmpeg options are in b/s, and x264's are in kb/s. And
setting -bufsize 14000000 -maxrate 14000000 didn't give rise to
vbv_underflow, x264 showed vbv_maxrate=14000 vbv_bufsize=14000.

Tried just not setting bufsize and maxrate, but --level 31. Again no
vbv_underflow, but x264 didn't show what vbv_maxrate and vbv_bufsixe it
was using.

Does --level <xx> just set these options appropriately, or do I need to
set them?

sean
Jason Garrett-Glaser
2010-10-29 04:45:14 UTC
Permalink
Post by Jason Garrett-Glaser
I'm transcoding a bunch of old vhs tapes. I copied them fro the vhs deck to
a dv camcorder, and then to files.
ffmpeg -i vacation.dv -acodec libfaac -ab 48k -vcodec libx264 -vpre slow
-level 31 -bufsize 14000 -maxrate 14000 -crf 20 outfile-2.mp4
FFmpeg version SVN-r25585, Copyright (c) 2000-2010 the FFmpeg developers
?built on Oct 26 2010 21:16:33 with gcc 4.4.4 20100630 (Red Hat 4.4.4-10)
?configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --shlibdir=/usr/lib64
--extra-cflags='-O2 -march=native -mtune=native -fopenmp -msse4.1
-ftree-vectorize -I/usr/include/openjpeg' --enable-static --enable-shared
--enable-gpl --enable-nonfree --enable-version3 --enable-postproc
--enable-avfilter --enable-pthreads --enable-x11grab --enable-gray
--enable-vaapi --enable-hardcoded-tables --enable-frei0r
--enable-libdirac
--disable-decoder=libdirac --enable-libfaac --enable-libgsm
--enable-libmp3lame --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --disable-encoder=libschroedinger
--enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxvid --enable-zlib --disable-debug --cpu=core2 --arch=x86_64
--enable-pic
?libavutil ? ? 50.32. 3 / 50.32. 3
?libavcore ? ? ?0. 9. 1 / ?0. 9. 1
?libavcodec ? ?52.93. 0 / 52.93. 0
?libavformat ? 52.84. 0 / 52.84. 0
?libavdevice ? 52. 2. 2 / 52. 2. 2
?libavfilter ? ?1.53. 0 / ?1.53. 0
?libswscale ? ? 0.12. 0 / ?0.12. 0
?libpostproc ? 51. 2. 0 / 51. 2. 0
?Duration: N/A, start: 0.000000, bitrate: 28771 kb/s
? ?Stream #0.0: Video: dvvideo, yuv411p, 720x480, 28771 kb/s, PAR 8:9 DAR
4:3, 29.97 tbr, 29.97 tbn, 29.97 tbc
? ?Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
the filter 'src' and the filter 'out'
flags:0xa0000004
SSE4.1 Cache64
- Copyleft 2003-2010 - 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=1 sliced_threads=0 nr=0 decimate=1
interlaced=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=10
qpmax=51 qpstep=4 vbv_maxrate=40 vbv_bufsize=40 crf_max=0.0 ip_ratio=1.41
aq=1:1.00 nal_hrd=none
? ?encoder ? ? ? ? : Lavf52.84.0
? ?Stream #0.0: Video: libx264, yuv420p, 720x480 [PAR 8:9 DAR 4:3], q=10-51,
200 kb/s, 30k tbn, 29.97 tbc
? ?Stream #0.1: Audio: libfaac, 48000 Hz, 2 channels, s16, 48 kb/s
?Stream #0.0 -> ?#0.0
?Stream #0.1 -> ?#0.1
What is this telling me? And should I be worried?
As I understand it, level 3.1 has a max vbv bitrate of 14000 and vbv buffer
of 14000.
http://rob.opendot.cl/index.php/useful-stuff/h264-profiles-and-levels/
And ffmpeg options maxrate and bufsize map to these x264 vbv options.
1. If I just set -level<xx> ?, do I need to set maxrate and bufsize?
2. Why, when I did set them to 14000, does x264 use vbv_maxrate=40
vbv_bufsize=40?
Because your bufsize and maxrate are off by a factor of 1000.
Dark Shikari
Ah. So the ffmpeg options are in b/s, and x264's are in kb/s. And setting
-bufsize 14000000 -maxrate 14000000 didn't give rise to vbv_underflow, x264
showed vbv_maxrate=14000 vbv_bufsize=14000.
Tried just not setting bufsize and maxrate, but --level 31. Again no
vbv_underflow, but x264 didn't show what vbv_maxrate and vbv_bufsixe it was
using.
Does --level <xx> just set these options appropriately, or do I need to set
them?
--level <xx> will, if you are using VBV, warn you if your VBV settings
are invalid.

Dark Shikari
sean darcy
2010-10-29 20:41:15 UTC
Permalink
Post by Jason Garrett-Glaser
I'm transcoding a bunch of old vhs tapes. I copied them fro the vhs deck to
a dv camcorder, and then to files.
ffmpeg -i vacation.dv -acodec libfaac -ab 48k -vcodec libx264 -vpre slow
-level 31 -bufsize 14000 -maxrate 14000 -crf 20 outfile-2.mp4
FFmpeg version SVN-r25585, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 26 2010 21:16:33 with gcc 4.4.4 20100630 (Red Hat 4.4.4-10)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --shlibdir=/usr/lib64
--extra-cflags='-O2 -march=native -mtune=native -fopenmp -msse4.1
-ftree-vectorize -I/usr/include/openjpeg' --enable-static --enable-shared
--enable-gpl --enable-nonfree --enable-version3 --enable-postproc
--enable-avfilter --enable-pthreads --enable-x11grab --enable-gray
--enable-vaapi --enable-hardcoded-tables --enable-frei0r
--enable-libdirac
--disable-decoder=libdirac --enable-libfaac --enable-libgsm
--enable-libmp3lame --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --disable-encoder=libschroedinger
--enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxvid --enable-zlib --disable-debug --cpu=core2 --arch=x86_64
--enable-pic
libavutil 50.32. 3 / 50.32. 3
libavcore 0. 9. 1 / 0. 9. 1
libavcodec 52.93. 0 / 52.93. 0
libavformat 52.84. 0 / 52.84. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.53. 0 / 1.53. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
Duration: N/A, start: 0.000000, bitrate: 28771 kb/s
Stream #0.0: Video: dvvideo, yuv411p, 720x480, 28771 kb/s, PAR 8:9 DAR
4:3, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
the filter 'src' and the filter 'out'
flags:0xa0000004
SSE4.1 Cache64
- Copyleft 2003-2010 - 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=1 sliced_threads=0 nr=0 decimate=1
interlaced=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=10
qpmax=51 qpstep=4 vbv_maxrate=40 vbv_bufsize=40 crf_max=0.0 ip_ratio=1.41
aq=1:1.00 nal_hrd=none
encoder : Lavf52.84.0
Stream #0.0: Video: libx264, yuv420p, 720x480 [PAR 8:9 DAR 4:3], q=10-51,
200 kb/s, 30k tbn, 29.97 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, 2 channels, s16, 48 kb/s
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
What is this telling me? And should I be worried?
As I understand it, level 3.1 has a max vbv bitrate of 14000 and vbv buffer
of 14000.
http://rob.opendot.cl/index.php/useful-stuff/h264-profiles-and-levels/
And ffmpeg options maxrate and bufsize map to these x264 vbv options.
1. If I just set -level<xx> , do I need to set maxrate and bufsize?
2. Why, when I did set them to 14000, does x264 use vbv_maxrate=40
vbv_bufsize=40?
Because your bufsize and maxrate are off by a factor of 1000.
Dark Shikari
Ah. So the ffmpeg options are in b/s, and x264's are in kb/s. And setting
-bufsize 14000000 -maxrate 14000000 didn't give rise to vbv_underflow, x264
showed vbv_maxrate=14000 vbv_bufsize=14000.
Tried just not setting bufsize and maxrate, but --level 31. Again no
vbv_underflow, but x264 didn't show what vbv_maxrate and vbv_bufsixe it was
using.
Does --level<xx> just set these options appropriately, or do I need to set
them?
--level<xx> will, if you are using VBV, warn you if your VBV settings
are invalid.
Dark Shikari
I'm feeling a little dense. I've got a lot of these to transcode, so
sorry for all the stupid questions.

I have no clue why I'm using vbv. AFAICS, there's no option to enable
(or disable) it.

ffmpeg --help | grep vbv
.......
-rc_max_vbv_use <float> E.V..
-rc_min_vbv_use <float> E.V..
-crf_max <float> E.V.. in crf mode, prevents vbv from lowering
quality beyond this point

I'm transcoding to use in Android. If I set --level 31 will vbv_* be
set to 14000?

If I still get a vbv warning when level is 31, do I then set bufsize and
maxrate explicitly? Then if I still get a vbv warning, am I just out of
luck?

And, if I do need to set vbv, do I use the options shown above rather
than bufsize and maxrate?

Thanks

sean
Jason Garrett-Glaser
2010-10-29 23:15:24 UTC
Permalink
I'm feeling a little dense. I've got a lot of these to transcode, so sorry
for all the stupid questions.
I have no clue why I'm using vbv. AFAICS, there's no option to enable (or
disable) it.
-bufsize and -maxrate are the options to enable it.
ffmpeg --help | grep vbv
.......
-rc_max_vbv_use ? ?<float> E.V..
-rc_min_vbv_use ? ?<float> E.V..
-crf_max ? ? ? ? ? <float> E.V.. in crf mode, prevents vbv from lowering
quality beyond this point
I'm transcoding to use in Android. If I set --level ?31 will vbv_* be set to
14000?
No.
If I still get a vbv warning when level is 31
What do you mean by "get a vbv warning"? If you don't set VBV, you
won't get a VBV warning, by definition.
Then if I still get a vbv warning, am I just out of
luck?
I have no idea what you're talking about.
And, if I do need to set vbv, do I use the options shown above rather than
bufsize and maxrate?
?!?!

Dark Shikari

Loading...