[FFmpeg-user] Fwd: VBV Underflow errors while setting up a desktop stream on OS X

Prajna Kandarpa prajnakandarpa at gmail.com
Thu Mar 19 04:05:14 CET 2015


Hi,

I've setup a desktop stream using the following ffmpeg parameters. I stream
the raw data to an
ffserver instance running on the same machine (OS X Yosemite). The ffserver
streams encoded
video to another machine on the same local network.

I keep getting VBV Underflow errors on the desktop capture stream. I've
changed the encoding
parameters such as keyint, vbv-maxrate and vbv-bufsize on the ffserver conf
to no avail.(We encode
using libx264 )
The VBV underflow errors especially occur when there's a lot of movement on
the screen.

Can someone please take a look at my parameters and let me know if I'm
doing
something extremely wrong?

Thanks,
Praj

ffserver conf:

> HTTPPort 8090
> # bind to all IPs aliased or not
> HTTPBindAddress 0.0.0.0
> # max number of simultaneous clients
> MaxClients 1000
> # max bandwidth per-client (kb/s)
> MaxBandwidth 10000
> # Suppress that if you want to launch ffserver as a daemon.
> #NoDaemon
>
> <Feed feed1.ffm>
> File /tmp/feed1.ffm
> FileMaxSize 5M
> </Feed>
>
> <Stream test.flv>
> Feed feed1.ffm
> Format flv
> VideoCodec libx264
> #AVOptionVideo flags +global_header
> PixelFormat yuv420p
> VideoFrameRate 25
> #VideoGopSize 50
> VideoBufferSize 200
> VideoBitRate 200
> VideoBitRateRange 200-200
> AVOptionVideo preset ultrafast
> AVOptionVideo profile high
> AVOptionVideo tune zerolatency
> AVOptionVideo me_method hex
> AVOptionVideo refs 2
> AVOptionVideo subq 3
> AVOptionVideo level 4.0
> AVOptionVideo crf 30
> AVOptionVideo bt 10k
> AVOptionVideo g 15
> AVOptionVideo qcomp 0.9
> AVOptionVideo trellis 1
> AVOptionVideo 8x8dct 1
> AVOptionVideo mbtree 0
> VideoQMin 1
> VideoQMax 31
> VideoSize 1280x800
> PreRoll 0
> AudioCodec libmp3lame
> AudioBitRate 128
> AudioChannels 2
> AudioSamplerate 44100
> </Stream>


ffmpeg output:

> ffmpeg -f avfoundation -i "1:1" -s 1440x900 -r 25 -vcodec copy -threads:0
> 4 -acodec copy -movflags +faststart -pix_fmt yuv420p
> http://localhost:8090/feed1.ffm
> ffmpeg version N-70743-g332776f Copyright (c) 2000-2015 the FFmpeg
> developers
>   built with Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
>   configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
> --enable-libass --enable-libfdk-aac --enable-libfreetype
> --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
> --enable-libvpx --enable-libx264 --enable-libxvid
>   libavutil      54. 20.100 / 54. 20.100
>   libavcodec     56. 28.100 / 56. 28.100
>   libavformat    56. 25.101 / 56. 25.101
>   libavdevice    56.  4.100 / 56.  4.100
>   libavfilter     5. 12.100 /  5. 12.100
>   libswscale      3.  1.101 /  3.  1.101
>   libswresample   1.  1.100 /  1.  1.100
>   libpostproc    53.  3.100 / 53.  3.100
> [avfoundation @ 0x7f9dec005200] Selected pixel format (yuv420p) is not
> supported by the input device.
> [avfoundation @ 0x7f9dec005200] Supported pixel formats:
> [avfoundation @ 0x7f9dec005200]   uyvy422
> [avfoundation @ 0x7f9dec005200]   yuyv422
> [avfoundation @ 0x7f9dec005200]   nv12
> [avfoundation @ 0x7f9dec005200]   0rgb
> [avfoundation @ 0x7f9dec005200]   bgr0
> [avfoundation @ 0x7f9dec005200] Overriding selected pixel format to use
> uyvy422 instead.
> [avfoundation @ 0x7f9dec005200] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #0, avfoundation, from '1:1':
>   Duration: N/A, start: 0.154663, bitrate: N/A
>     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1440x900,
> 1000k tbr, 1000k tbn, 1000k tbc
>     Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s
> [tcp @ 0x7f9debd0f680] Connection to tcp://localhost:8090 failed
> (Connection refused), trying next address
>     Last message repeated 1 times
> [tcp @ 0x7f9debc76c00] Connection to tcp://localhost:8090 failed
> (Connection refused), trying next address
>     Last message repeated 1 times
> [ffm @ 0x7f9ded031200] Frame rate very high for a muxer not efficiently
> supporting it.
> Please consider specifying a lower framerate, a different muxer or -vsync 2
> [libx264 @ 0x7f9dec299200] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX
> [libx264 @ 0x7f9dec299200] profile High, level 4.0
> Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
>   Metadata:
>     creation_time   : now
>     encoder         : Lavf56.25.101
>     Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s32p, 128 kb/s
>     Metadata:
>       encoder         : Lavc56.28.100 libmp3lame
>     Stream #0:1: Video: h264 (libx264), yuv420p, 1280x800, q=1-31, 200
> kb/s, 1000k fps, 1000k tbn, 25 tbc
>     Metadata:
>       encoder         : Lavc56.28.100 libx264
> Stream mapping:
>   Stream #0:1 -> #0:0 (pcm_f32le (native) -> mp3 (libmp3lame))
>   Stream #0:0 -> #0:1 (rawvideo (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [libx264 @ 0x7f9dec299200] VBV underflow (frame 15, -644504 bits)
> frame=   17 fps=0.0 q=31.0 size=     160kB time=00:00:00.68
> bitrate=1927.5kbits/[libx264 @ 0x7f9dec299200] VBV underflow (frame 21,
> -25728 bits)
> [libx264 @ 0x7f9dec299200] VBV underflow (frame 26, -37216 bits)
> frame=   28 fps= 28 q=31.0 size=     300kB time=00:00:01.12
> bitrate=2194.3kbits/[libx264 @ 0x7f9dec299200] VBV underflow (frame 30,
> -992656 bits)
> [libx264 @ 0x7f9dec299200] VBV underflow (frame 31, -62504 bits)
> [libx264 @ 0x7f9dec299200] VBV underflow (frame 33, -61368 bits)
> [libx264 @ 0x7f9dec299200] VBV underflow (frame 36, -97968 bits)
> [libx264 @ 0x7f9dec299200] VBV underflow (frame 39, -41632 bits)
> [libx264 @ 0x7f9dec299200] VBV underflow (frame 41, -45344 bits)
> frame=   42 fps= 27 q=31.0 size=     472kB time=00:00:01.68
> bitrate=2301.6kbits


More information about the ffmpeg-user mailing list