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