Problem in Streaming desktop using dshow filter?

For the developers that use FFmpeg in their software.
Post Reply
navedjobs
Posts: 19
Joined: Sun Jun 10, 2012 3:18 pm

Problem in Streaming desktop using dshow filter?

Post by navedjobs » Tue Jun 19, 2012 6:59 pm

hi guys , i am facing a problem , my problem is if I stream a ready to play videos like flv, or avi etc it works fine but when i stream Desktop using this command

Code: Select all

ffmpeg -f dshow -i video="screen-capture-recorder" -preset ultrafast -async 1 -f mpegts -bufsize 30000k udp://ip:5555
then play it using ffplay

Code: Select all

ffpay udp://ip:5555
then the video seems to be freeze, can any one help, any suggestions are most welcome

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: Problem in Streaming desktop using dshow filter?

Post by rogerdpack » Tue Jun 19, 2012 8:02 pm

uncut console output? what vcodec?

navedjobs
Posts: 19
Joined: Sun Jun 10, 2012 3:18 pm

Re: Problem in Streaming desktop using dshow filter?

Post by navedjobs » Wed Jun 20, 2012 12:50 pm

rogerdpack wrote:uncut console output? what vcodec?
uncut console output using command

Code: Select all

C:\Users\Admin\Desktop\imgToVideo\in>ffmpeg -f dshow -i video="screen-capture-recorder" -vcodec libx26
4 -preset ultrafast -async 1 -f mpegts -bufsize 30000k udp://111.119.227.124:5555

Code: Select all

ffmpeg version N-34549-g13b7781, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov  6 2011 22:02:08 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enab
le-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --ena
ble-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-lib
schroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enab
le-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 24. 0 / 51. 24. 0
  libavcodec   53. 28. 0 / 53. 28. 0
  libavformat  53. 19. 0 / 53. 19. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 47. 0 /  2. 47. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[dshow @ 01C48C40] Estimating duration from bitrate, this may be inaccurate
Input #0, dshow, from 'video=screen-capture-recorder':
  Duration: N/A, start: 4695.032000, bitrate: N/A
    Stream #0:0: Video: rawvideo, rgb555le, 1440x900, 10000k tbr, 10000k tbnreal-time buffer 170% full
! frame dropped!
, 10000k tbc
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
    Last message repeated 1 times
Incompatible pixel format 'rgb555le' for codec 'libx264', auto-selecting format 'yuv420p'
[mpegts @ 02DBAA60] Frame rate very high for a muxer not effciciently supporting it.
Please consider specifiying a lower framerate, a different muxer or -vsync 2
[buffer @ 02DBA900] w:1440 h:900 pixfmt:rgb555le tb:1/1000000 sar:0/1 sws_param:
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
[buffersink @ 02DBA9C0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the
 filter 'out'
[scale @ 02DD2D80] w:1440 h:900 fmt:rgb555le -> w:1440 h:900 fmt:yuv420p flags:0x4
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
    Last message repeated 1 times
[libx264 @ 02DC0D00] VBV bufsize set but maxrate unspecified, ignored
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
[libx264 @ 02DC0D00] MB rate (-239607552) > level limit (983040)
[libx264 @ 02DC0D00] using cpu capabilities: MMX2 SSE2Slow SlowCTZ
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
[libx264 @ 02DC0D00] profile Constrained Baseline, level 5.1
[mpegts @ 02DBAA60] muxrate VBR, pcr every 1000000 pkts, sdt every 200, pat/pmt every 40 pkts
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
Output #0, mpegts, to 'udp://111.119.227.124:5555':
  Metadata:
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
    encoder         : Lavf53.19.0
    Stream #0:0: Video: h264, yuv420p, 1440x900, q=-1--1, 90k tbn, 10000k tbc
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> libx264)
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
Press [q] to stop, [?] for help
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
    Last message repeated 92 times
[mpegts @ 02DBAA60] Application provided invalid, non monotonically increasing dts to muxer in stream
0: 1 >= 1
av_interleaved_write_frame(): Invalid argument
[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
    Last message repeated 1 times
If i use this command then the stream is not working the ffmpeg end with the above console output
please help me with this , I m a newbie to ffmpeg

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: Problem in Streaming desktop using dshow filter?

Post by rogerdpack » Wed Jun 20, 2012 8:02 pm

Does VLC receive the stream well?
Do you see pauses in the receiving side, or just the sending side?

[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
Last message repeated 92 times

may be a clue. My guess would be that the cpu can't keep up with the frame rate...hmm...I don't have much experience with streaming so don't know for sure...if you have multi core you could try adding -threads 0

navedjobs
Posts: 19
Joined: Sun Jun 10, 2012 3:18 pm

Re: Problem in Streaming desktop using dshow filter?

Post by navedjobs » Thu Jun 21, 2012 2:39 pm

rogerdpack wrote:Does VLC receive the stream well?
Do you see pauses in the receiving side, or just the sending side?

[dshow @ 01C48C40] real-time buffer 170% full! frame dropped!
Last message repeated 92 times

may be a clue. My guess would be that the cpu can't keep up with the frame rate...hmm...I don't have much experience with streaming so don't know for sure...if you have multi core you could try adding -threads 0
Yes i see pauses at the receiving side and not in the sending side the sending show frame drop regularly at command line i guess the problem is cpu is not getting enough time to play the video because capturing desktop using "screen-capture-recorder" filter takes 100% cpu and streaming also takes 100% and cpu is busy serving this two processes , so is there any work around to solve performance problem ?

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: Problem in Streaming desktop using dshow filter?

Post by rogerdpack » Thu Jun 21, 2012 3:33 pm

decrease frame rate, or choose a different video codec, or try receiving it from a different computer, or a computer with more cores. At least the problem is probably on the sending side, so you know where to start.
You could also try streaming it VLC that might help...but if it does please let us know since I am always on the look out for the "best" streaming codec...
-r

Post Reply
'