rdp / screen-capture-recorder-to-video-windows-free

a free open source windows "screen capture" device and recorder (also allows VLC/ffmpeg and others to capture/stream desktop/audio)
https://github.com/rdp/screen-capture-recorder-to-video-windows-free/releases
Other
2.11k stars 463 forks source link

Limited to 30fps? #121

Open steven-agg opened 5 years ago

steven-agg commented 5 years ago

I'm capturing a screen and seems to be limited to 30 fps, I've already configured to use 60 fps but then it just starts duplicating every other frame. You can see my settings and output of ffmpeg showing frame=601 and dup=277. Ran the benchmarks and my minimum capture was 77fps, average about 120fps.

capture_height= capture_width= start_x= start_y= default_max_fps=60 stretch_to_width= stretch_to_height= stretch_mode_high_quality_if_1= hwnd_to_track= disable_aero_for_vista_plus_if_1= track_new_x_y_coords_each_frame_if_1= capture_mouse_default_1= capture_foreground_window_if_1= dedup_if_1= millis_to_sleep_between_poll_for_dedupe_changes= capture_transparent_windows_including_mouse_in_non_aero_if_1_causes_annoying_mouse_flicker= hwnd_to_track_with_window_decoration=

D:\ffmpeg\bin\ffmpeg.exe -f dshow -i audio="virtual-audio-capturer":video="screen-capture-recorder" -c:v libx264 -crf 23 -preset ultrafast -t 10 D:\output\output.mp4 ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.3.1 (GCC) 20190414 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 leaving aero onGuessed Channel Layout for Input Stream #0.1 : stereo Input #0, dshow, from 'audio=virtual-audio-capturer:video=screen-capture-recorder': Duration: N/A, start: 144285.694841, bitrate: 1411 kb/s Stream #0:0: Video: rawvideo, bgr0, 1680x1050, 60 fps, 60 tbr, 10000k tbn, 10000k tbc Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped! Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native)) Press [q] to stop, [?] for help [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped! [libx264 @ 00000176d5075200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 00000176d5075200] profile High 4:4:4 Predictive, level 4.2, 4:4:4, 8-bit [libx264 @ 00000176d5075200] 264 - core 157 r2970 5493be8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0 Output #0, mp4, to 'D:\output\output.mp4': Metadata: encoder : Lavf58.20.100 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1680x1050, q=-1--1, 60 fps, 5000k tbn, 60 tbc Metadata: encoder : Lavc58.35.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavc58.35.100 aac [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped! frame= 601 fps= 60 q=-1.0 Lsize= 2975kB time=00:00:10.00 bitrate=2434.7kbits/s dup=277 drop=0 speed= 1x video:2810kB audio:152kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.430039% [libx264 @ 00000176d5075200] frame I:3 Avg QP:15.33 size:653886 [libx264 @ 00000176d5075200] frame P:598 Avg QP:15.59 size: 1530 [libx264 @ 00000176d5075200] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 00000176d5075200] mb P I16..4: 0.1% 0.0% 0.0% P16..4: 0.7% 0.0% 0.0% 0.0% 0.0% skip:99.2% [libx264 @ 00000176d5075200] coded y,u,v intra: 30.2% 29.0% 29.0% inter: 0.3% 0.2% 0.2% [libx264 @ 00000176d5075200] i16 v,h,dc,p: 74% 24% 1% 1% [libx264 @ 00000176d5075200] kb/s:2297.31 [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped! [aac @ 00000176d507fa00] Qavg: 44148.844 Received stop event after 996 passes [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped!

rdp commented 5 years ago

Might be limitation of your output or something weird like that (the capture itself might be limiting/limited... it's trying to do 60 fps but doesn't seem to be able to...)

On Fri, Aug 2, 2019 at 8:36 AM steven-allstar-gg notifications@github.com wrote:

I'm capturing a screen and seems to be limited to 30 fps, I've already configured to use 60 fps but then it just starts duplicating every other frame. You can see my settings and output of ffmpeg showing frame=601 and dup=277. Ran the benchmarks and my minimum capture was 77fps, average about 120fps.

capture_height= capture_width= start_x= start_y= default_max_fps=60 stretch_to_width= stretch_to_height= stretch_mode_high_quality_if_1= hwnd_to_track= disable_aero_for_vista_plus_if_1= track_new_x_y_coords_each_frame_if_1= capture_mouse_default_1= capture_foreground_window_if_1= dedup_if_1= millis_to_sleep_between_poll_for_dedupe_changes=

capture_transparent_windows_including_mouse_in_non_aero_if_1_causes_annoying_mouse_flicker= hwnd_to_track_with_window_decoration=

D:\ffmpeg\bin\ffmpeg.exe -f dshow -i audio="virtual-audio-capturer":video="screen-capture-recorder" -c:v libx264 -crf 23 -preset ultrafast -t 10 D:\output\output.mp4 ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.3.1 (GCC) 20190414 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 leaving aero onGuessed Channel Layout for Input Stream #0.1 : stereo Input #0, dshow, from 'audio=virtual-audio-capturer:video=screen-capture-recorder': Duration: N/A, start: 144285.694841, bitrate: 1411 kb/s Stream #0:0: Video: rawvideo, bgr0, 1680x1050, 60 fps, 60 tbr, 10000k tbn, 10000k tbc Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped! Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native)) Press [q] to stop, [?] for help [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped! [libx264 @ 00000176d5075200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 00000176d5075200] profile High 4:4:4 Predictive, level 4.2, 4:4:4, 8-bit [libx264 @ 00000176d5075200] 264 - core 157 r2970 5493be8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0 Output #0, mp4, to 'D:\output\output.mp4': Metadata: encoder : Lavf58.20.100 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1680x1050, q=-1--1, 60 fps, 5000k tbn, 60 tbc Metadata: encoder : Lavc58.35.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavc58.35.100 aac [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped! frame= 601 fps= 60 q=-1.0 Lsize= 2975kB time=00:00:10.00 bitrate=2434.7kbits/s dup=277 drop=0 speed= 1x video:2810kB audio:152kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.430039% [libx264 @ 00000176d5075200] frame I:3 Avg QP:15.33 size:653886 [libx264 @ 00000176d5075200] frame P:598 Avg QP:15.59 size: 1530 [libx264 @ 00000176d5075200] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 00000176d5075200] mb P I16..4: 0.1% 0.0% 0.0% P16..4: 0.7% 0.0% 0.0% 0.0% 0.0% skip:99.2% [libx264 @ 00000176d5075200] coded y,u,v intra: 30.2% 29.0% 29.0% inter: 0.3% 0.2% 0.2% [libx264 @ 00000176d5075200] i16 v,h,dc,p: 74% 24% 1% 1% [libx264 @ 00000176d5075200] kb/s:2297.31 [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped! [aac @ 00000176d507fa00] Qavg: 44148.844 Received stop event after 996 passes [dshow @ 00000176d5069640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (464% of size: 3041280 [rtbufsize parameter])! frame dropped!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rdp/screen-capture-recorder-to-video-windows-free/issues/121?email_source=notifications&email_token=AAADBUDLJW273YM72ND23S3QCRA57A5CNFSM4II6LA6KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDCNK2A, or mute the thread https://github.com/notifications/unsubscribe-auth/AAADBUFVBHV6OCDAKEVT2FTQCRA57ANCNFSM4II6LA6A .

LordHDL commented 5 years ago

I also have this problem, except without the frame dupes or drops. It's configured to use 60 fps, but it only does so if I lower the capture resolution to 1280x720. I'm trying to record 1920x1080 at 60, which I know my system can handle because it does so perfectly in OBS with custom ffmpeg settings. I also have no issue doing this from ffmpeg directly when in macOS.

This is on Windows 10, and there's a part of the output that says "leaving aero on." Not sure if that's relevant or not, but it's easy to miss. Here's the shell:

SCR

steven-agg commented 5 years ago

I switched to gdigrab and was having the same issue. So I eventually switched to capturing a specific window with gdigrab and have no issues with it. I'm guessing there's a lot of overhead composing the whole desktop.

On Thu, Sep 26, 2019, 6:42 PM LordHDL notifications@github.com wrote:

I also have this problem, except without the frame dupes or drops. It's configured to use 60 fps, but it only does so if I lower the capture resolution to 1280x720. I'm trying to record 1920x1080 at 60, which I know my system can handle because it does so perfectly in OBS with custom ffmpeg settings. I also have no issue doing this from ffmpeg directly when in macOS.

This is on Windows 10, and there's a part of the output that says "leaving aero on." Not sure if that's relevant or not, but it's easy to miss. Here's the shell:

[image: SCR] https://user-images.githubusercontent.com/5182602/65729632-fad7ca00-e08c-11e9-85f9-20b72976e4c5.PNG

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rdp/screen-capture-recorder-to-video-windows-free/issues/121?email_source=notifications&email_token=AMPN6BBQXCPKDTHBGBLPMKTQLU3GZA5CNFSM4II6LA6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7XFI3Y#issuecomment-535712879, or mute the thread https://github.com/notifications/unsubscribe-auth/AMPN6BFM5W7CCTS2L27Y2ATQLU3GZANCNFSM4II6LA6A .

LordHDL commented 5 years ago

I tried gdigrab too. It's not really a solution for me because it doesn't capture full screen apps, audio, or the mouse cursor (just shows a black box).

Would be nice if this dshow device could hook to specific executables directly like how OBS does. It's hard to beat the robustness of ffmpeg, except when problems like this arise.

rdp commented 5 years ago

It can hook to windows that's about it at this point unfortunately. With tons of funding I might be able to make an OBS plugin? :)

On Thu, Sep 26, 2019 at 6:32 PM LordHDL notifications@github.com wrote:

I tried gdigrab too. It's not really a solution for me because it doesn't capture full screen apps, audio, or the mouse cursor (just shows a black box).

Would be nice if this dshow device could hook to specific executables directly like how OBS does. It's hard to beat the robustness of ffmpeg, except when problems like this arise.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rdp/screen-capture-recorder-to-video-windows-free/issues/121?email_source=notifications&email_token=AAADBUBXC37B64FL5PPXG53QLVIC5A5CNFSM4II6LA6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7XKP7I#issuecomment-535734269, or mute the thread https://github.com/notifications/unsubscribe-auth/AAADBUCQG5CJ3HFUPHGFBALQLVIC5ANCNFSM4II6LA6A .

LordHDL commented 5 years ago

I don't see the purpose behind that. OBS has its own capture methods and custom ffmpeg output.

Regarding screen capture recorder, the main benefit is that you have full access to ffmpeg cli, but the utility of that is very limited because of this fps bug. I'm explicitly choosing 60 fps but getting 30-40.

rdp commented 5 years ago

I'm not sure how to fix it.

On Tue, Oct 1, 2019 at 2:26 PM LordHDL notifications@github.com wrote:

I don't see the purpose behind that. OBS has its own capture methods and custom ffmpeg output.

Regarding screen capture recorder, the main benefit is that you have full access to ffmpeg cli, but the utility of that is very limited because of this fps bug. I'm explicitly choosing 60 fps but getting 30-40.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rdp/screen-capture-recorder-to-video-windows-free/issues/121?email_source=notifications&email_token=AAADBUFNAHERCVGAFOV5C4DQMOXALA5CNFSM4II6LA6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEACT5JY#issuecomment-537214631, or mute the thread https://github.com/notifications/unsubscribe-auth/AAADBUENHXLJ47DUMVR4T5TQMOXALANCNFSM4II6LA6A .