Live DirectShow capture problems

Issues involving a Windows version of FFmpeg. Do not post general usage questions here.

Live DirectShow capture problems

Postby jonhall » Tue May 01, 2012 9:30 pm

Hello,
I am trying to use ffmpeg to capture video from a DirectShow device to publish to an RTMP stream. I'm having a lot of trouble getting this to work; I keep getting messages like "real-time buffer 101% full! frame dropped!" and nearly all of the frames are dropped. Can anyone provide some insight as to what I'm doing wrong? Here are the command-line arguments that I'm using:

Code: Select all
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


And here is some sample output:

Code: Select all
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


Help anyone??
jonhall
 
Posts: 2
Joined: Tue May 01, 2012 9:21 pm

Re: Live DirectShow capture problems

Postby ramiro » Wed May 02, 2012 3:33 am

try using a lower framerate (-r 15 for example) before -i
ramiro
 
Posts: 153
Joined: Tue May 10, 2011 12:56 am

Re: Live DirectShow capture problems

Postby jonhall » Mon May 07, 2012 1:46 am

Hi,
Thanks for the suggestion! I gave it a try, but I get an error when I set -r (before -i) to anything other than the video device native bitrate (29.97 fps).

I've been doing a bit more experimenting with various options (and pulling my hair out :P ) with no success. The command in my post above works fine if I substitute the server URL (rtmp://...) with a local file name (e.g. test.flv), so the problem doesn't seem to be with the PC not being able to handle the realtime encoding; it must be an issue with the streaming.

One thing I noticed when encoding to a file is that the bitrate was in the thousands of kbps, even though I've specified a video bitrate of 500k and an audio bitrate of 128k. Any idea why that is? How can I make the output bitrate lower? I've streamed 640x480 H.264 video at 350kbps before with another program (FMLE), so it must be possible...

Help, please!! I really need to get this working...
jonhall
 
Posts: 2
Joined: Tue May 01, 2012 9:21 pm

Re: Live DirectShow capture problems

Postby rogerdpack » Mon May 14, 2012 3:38 pm

If you stream from linux is it the same problems?
rogerdpack
 
Posts: 1210
Joined: Fri Aug 05, 2011 9:56 pm

Re: Live DirectShow capture problems

Postby rogerdpack » Wed Jul 11, 2012 12:24 am

I don't see where you had set the bit rate...
rogerdpack
 
Posts: 1210
Joined: Fri Aug 05, 2011 9:56 pm


Return to Usage Issues

Who is online

Users browsing this forum: Google [Bot] and 1 guest