[FFmpeg-user] Streaming to Flash Media Server

Hearken Media webmaster at hearkenmedia.com
Mon May 7 06:52:37 CEST 2012


Hello,

I've been trying to set up ffmpeg to stream from a live DirectShow capture
device to a Flash Media Server instance hosted on Amazon AWS. For some
reason I keep getting error messages like "real-time buffer 101% full!
frame dropped!" and very few frames actually get encoded. I have included
the command I'm using along with some sample output below. It works fine if
I save the output to a file instead of streaming it (i.e. by replacing
"rtmp://..." with "test.flv", for example), so I think that the issue is
with the streaming, not the encoding. The PC has a fairly powerful CPU that
should be able to handle the encoding and streaming without any problems
(Adobe's Flash Media Live Encoder works fine). One thing I noticed when
encoding to a file is that the bitrate is in the thousands of kbps, even
though I've specified a video bitrate of 500k and an audio bitrate of 128k.
How do I keep the bitrate reasonable?

I am new to both Flash Media Server and ffmpeg, so after spending quite a
few hours trying to get this to work I'll admit that I'm completely stuck.
Does anyone have any suggestions as to what I'm doing wrong or what other
parameters/options I should try? They would be very much appreciated!

Jonathan


ffmpeg.exe -threads 4 -f dshow -i video="vMix Virtual
Capture":audio="Microphone (Fast Track)" -f flv "rtmp://
ec2-50-112-32-198.us-west-2.compute.amazonaws.com:1935/live/fgbc-live"
-vcodec libx264 -s vga -r 24 -vb 500 -acodec libvo_aacenc -ar 22050 -ab 128k

ffmpeg version N-40126-ga4b58fd Copyright (c) 2000-2012 the FFmpeg
developers
  built on Apr 26 2012 03:29:50 with gcc 4.6.3
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libass
 --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut
--enable-libope
njpeg --enable-librtmp --enable-libschroedinger --enable-libspeex
--enable-libth
eora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxavs
--enable-libxvid --e
nable-zlib
  libavutil      51. 47.100 / 51. 47.100
  libavcodec     54. 15.100 / 54. 15.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 72.100 /  2. 72.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
[dshow @ 0229f340] Stream #1: not enough frames to estimate rate; consider
incre
asing probesize
Input #0, dshow, from 'video=vMix Virtual Capture:audio=Microphone (Fast
Track)'
:
  Duration: N/A, start: 4742.286000, bitrate: N/A
    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 640x480,
29.97 fp
s, 29.97 tbr, 10000k tbn, 29.97 tbc
    Stream #0:1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 9 times
HandShake: client signature does not match!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 9 times
[buffer @ 01d331a0] w:640 h:480 pixfmt:uyvy422 tb:1/1000000 sar:0/1
sws_param:fl
ags=2
[buffersink @ 01d3e1c0] auto-inserting filter 'auto-inserted scale 0'
between th
e filter 'src' and the filter 'out'
[scale @ 01d3e4a0] w:640 h:480 fmt:uyvy422 sar:0/1 -> w:640 h:480
fmt:yuv420p sa
r:0/1 flags:0x4
Guessed Channel Layout for  Input Stream #0.1 : stereo
Output #0, flv, to 'rtmp://
ec2-50-112-32-198.us-west-2.compute.amazonaws.com:193
5/live/fgbc-live':
  Metadata:
    encoder         : Lavf54.3.100
    Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 640x480,
q=2-31,
200 kb/s, 1k tbn, 29.97 tbc
    Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 44100 Hz, stereo, s16
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> flv)
  Stream #0:1 -> #0:1 (pcm_s16le -> libmp3lame)
Press [q] to stop, [?] for help
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
Input stream #0:1 frame changed from rate:44100 fmt:s16 ch:2 chl:0x0 to
rate:441
00 fmt:s16 ch:2 chl:0x3
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 126 times
frame=   28 fps=6.1 q=2.0 size=     226kB time=00:00:01.40
bitrate=1320.2kbits/s
real-time buffer 101% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 138 times
frame=   44 fps=4.6 q=2.3 size=     476kB time=00:00:05.90 bitrate=
661.4kbits/s
real-time buffer 101% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 64 times
 [dshow @ 0229f340] real-time buffer 80% full! frame dropped!
   Last message repeated 64 times
frame=   63 fps=5.2 q=6.5 size=     607kB time=00:00:10.89 bitrate=
456.4kbits/s
real-time buffer 101% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 64 times
frame=   75 fps=5.1 q=14.1 size=     737kB time=00:00:13.39 bitrate=
450.7kbits/
real-time buffer 101% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 38 times
frame=   88 fps=5.4 q=18.1 size=     793kB time=00:00:15.89 bitrate=
408.8kbits/
real-time buffer 101% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 20 times
frame=   95 fps=5.5 q=15.4 size=     845kB time=00:00:17.38 bitrate=
398.0kbits/
real-time buffer 101% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 16 times
frame=  104 fps=5.7 q=17.8 size=     891kB time=00:00:18.38 bitrate=
396.9kbits/
real-time buffer 101% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 14 times
frame=  117 fps=6.1 q=23.5 size=     934kB time=00:00:19.40 bitrate=
394.3kbits/
real-time buffer 80% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 12 times
frame=  131 fps=6.5 q=30.0 size=     971kB time=00:00:20.40 bitrate=
389.8kbits/
real-time buffer 80% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 11 times
frame=  148 fps=7.0 q=31.0 size=    1003kB time=00:00:21.39 bitrate=
384.1kbits/
real-time buffer 80% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 23 times
frame=  166 fps=7.4 q=31.0 size=    1056kB time=00:00:22.39 bitrate=
386.3kbits/
real-time buffer 80% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 10 times
frame=  172 fps=7.5 q=31.0 size=    1087kB time=00:00:23.39 bitrate=
380.5kbits/
real-time buffer 80% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 7 times
frame=  191 fps=8.0 q=31.0 size=    1118kB time=00:00:24.38 bitrate=
375.6kbits/
real-time buffer 80% full! frame dropped!
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 11 times
frame=  196 fps=8.0 q=31.0 Lsize=    1151kB time=00:00:25.01 bitrate=
376.9kbits
/s
video:1033kB audio:110kB global headers:0kB muxing overhead 0.664374%
[dshow @ 0229f340] real-time buffer 101% full! frame dropped!
    Last message repeated 4 times


More information about the ffmpeg-user mailing list