Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

real-time buffer too full or near too full! frame dropped! #84

Closed
LeetCodes opened this issue Jan 21, 2017 · 34 comments
Closed

real-time buffer too full or near too full! frame dropped! #84

LeetCodes opened this issue Jan 21, 2017 · 34 comments

Comments

@LeetCodes
Copy link

hi, i get this over and over and over again

[dshow @ 0000000000518fe0] real-time buffer [screen-capture-recorder] [video input] too full or near too full (117% of size: 100000000 [rtbufsize parameter])! frame dropped!
Last message repeated 1929 times

and then it just says 'message repeated x times' and goes into thousands and i can't even press q to stop, after it hits about 2,000 it usually starts spamming another error with it but it says audio input as well as video input, if i press ctrl + c then the video file is corrupt so there is no way to safely stop recording as far as i can tell, can anyone please help me? even if audio is messed up and video is kind of skippy id still like to be able to fix it as best as possible and i can just add music for audio i guess

any help is appreciated, thank you

cmd_2017-01-20_21-36-14
cmd_2017-01-20_21-37-35

@rdp
Copy link
Owner

rdp commented Jan 21, 2017 via email

@LeetCodes
Copy link
Author

ffmpeg.exe -y -rtbufsize 100M -f dshow -framerate 45 -i video="screen-capture-recorder":audio="virtual-audio-capturer" -c:v libx264 -r 45 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -c:a aac -strict -2 -ac 2 -b:a 128k "output.mp4"

thats the command ShareX is set to by default along with my settings as variables

(ffmpeg.exe -y -rtbufsize 100M -f dshow -framerate $fps$ -i video="screen-capture-recorder":audio="virtual-audio-capturer" -c:v libx264 -r $fps$ -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -c:a aac -strict -2 -ac 2 -b:a 128k "$output$")

im trying to use it with ShareX, but even testing without sharex i have the same problem

here's what happens when i try to stop recording, i get an error prompt that says this and it wont stop recording even if i press Stop, Abort, or press the stop recording hotkey, i have to close the command prompt error output to get it to stop

ffmpeg version N-82324-g872b358 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 36.100 / 55. 36.100
libavcodec 57. 66.101 / 57. 66.101
libavformat 57. 57.100 / 57. 57.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 66.100 / 6. 66.100
libswscale 4. 3.100 / 4. 3.100
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Guessed Channel Layout for Input Stream #0.1 : 4.0
Input #0, dshow, from 'video=screen-capture-recorder:audio=virtual-audio-capturer':
Duration: N/A, start: 377621.563000, bitrate: 3072 kb/s
Stream #0:0: Video: rawvideo, bgr0, 1792x1010, 45 fps, 45 tbr, 10000k tbn, 10000k tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, 4.0, s16, 3072 kb/s
[libx264 @ 00000000004cadc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 00000000004cadc0] profile Constrained Baseline, level 4.2
[libx264 @ 00000000004cadc0] 264 - core 148 r2721 72d53ab - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 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=28.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'C:\Users\Brbfapping\Pictures\Screenshots\2017-02-19\2017-02-19_21-02-21.mp4':
Metadata:
encoder : Lavf57.57.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1792x1010, q=-1--1, 45 fps, 11520 tbn, 45 tbc
Metadata:
encoder : Lavc57.66.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc57.66.101 aac
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

sharex_2017-02-19_20-59-43

then it just spams this

Last message repeated 2 times
[dshow @ 00000000004690c0] real-time buffer [screen-capture-recorder] [video input] too full or near too full (101% of size: 100000000 [rtbufsize parameter])! frame dropped!
[dshow @ 00000000004690c0] real-time buffer [virtual-audio-capturer] [audio input] too full or near too full (90% of size: 100000000 [rtbufsize parameter])! frame dropped!
Last message repeated 3 times
[dshow @ 00000000004690c0] real-time buffer [screen-capture-recorder] [video input] too full or near too full (101% of size: 100000000 [rtbufsize parameter])! frame dropped!
[dshow @ 00000000004690c0] real-time buffer [virtual-audio-capturer] [audio input] too full or near too full (90% of size: 100000000 [rtbufsize parameter])! frame dropped!
Last message repeated 2 times
[dshow @ 00000000004690c0] real-time buffer [screen-capture-recorder] [video input] too full or near too full (101% of size: 100000000 [rtbufsize parameter])! frame dropped!
[dshow @ 00000000004690c0] real-time buffer [virtual-audio-capturer] [audio input] too full or near too full (90% of size: 100000000 [rtbufsize parameter])! frame dropped!

sharex_2017-02-19_21-12-14

@rdp
Copy link
Owner

rdp commented Feb 20, 2017 via email

@LeetCodes
Copy link
Author

that is the full command

ffmpeg.exe -y -rtbufsize 100M -f dshow -framerate 45 -i video="screen-capture-recorder":audio="virtual-audio-capturer" -c:v libx264 -r 45 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -c:a aac -strict -2 -ac 2 -b:a 128k "output.mp4"

@rdp
Copy link
Owner

rdp commented Feb 20, 2017 via email

@LeetCodes
Copy link
Author

output video wont play at all, the VLC window is the proper size of the recording, but screen is black, no duration or video/audio

@refi64
Copy link

refi64 commented Feb 21, 2017

I just tried this and got the same problem. The command is pretty simple:

ffmpeg -f dshow -i video=screen-capture-recorder Videos/chrome.mp4

Same errors, and ffplay says that the data is invalid.

@refi64
Copy link

refi64 commented Feb 21, 2017

Also, oddly enough, I get the exact same errors with UScreenCapture...maybe it's a bug in FFmpeg?

EDIT: Nvm, I can just pass -rtbufsize 1024M and it works perfectly.

@rdp
Copy link
Owner

rdp commented Feb 21, 2017 via email

@LeetCodes
Copy link
Author

LeetCodes commented Feb 24, 2017

not able to gracefully exit unless i press the quit key while it isn't outputting the error, like the error kind of starts and stops at first and seems to get worse until its repeating 1,000s of times same error, but if it is idle i can press q and quit, otherwise it ignores all key presses while spamming the error and i have to CTRL + C to force close

also, i can make the buffer size really big and it takes longer for the error to start occurring, but it eventually does it, i assume after buffer is full or something

@rdp
Copy link
Owner

rdp commented Feb 24, 2017 via email

@LeetCodes
Copy link
Author

LeetCodes commented Feb 24, 2017

same with avi and every other file type ive tried, with mpg, it does the same thing but with additional errors

ffmpeg.exe -y -rtbufsize 100M -f dshow -i video="screen-capture-recorder":audio="virtual-audio-capturer" "output.mpg"
cmd_2017-02-24_14-52-51

if you notice, i was able to spam q and end gracefully in-between errors, when i do this, the file will play fine, but i can only quit when it is not spamming the errors and it spams them more and more frequently until it is impossible to press the quit key

@rdp
Copy link
Owner

rdp commented Feb 24, 2017 via email

@LeetCodes
Copy link
Author

no, the mpg is playable if i can get it to quit gracefully, so is the mp4 but i cant quit gracefully if i let it run for more than a few minutes because the error will be repeating thousands of times and it wont take any input, if i force quit then none of the files are playable

@LeetCodes
Copy link
Author

cmd_2017-02-24_16-20-42
if i press q and stop at that point, it will exit gracefully and the file is playable, but if i wait until this, i cant give any input so i have to force exit and the file wont play

cmd_2017-02-24_16-25-19

it will say the message repeated 1,000's+ times and i cant give any input

@rdp
Copy link
Owner

rdp commented Feb 24, 2017 via email

@jonahzheng
Copy link

I have the same problem.

@rdp
Copy link
Owner

rdp commented May 19, 2017 via email

@rdp
Copy link
Owner

rdp commented Oct 7, 2017

If "at least some" frames are getting through then it "smells" to me like the encode can't keep up (not enough cpu or possibly not enough bandwidth). I don't see the parameters but you might be able to tweak them to make encode faster? https://trac.ffmpeg.org/wiki/Encode/H.264

@rdp rdp closed this as completed Oct 7, 2017
@amane-ame
Copy link

same problem.

@burstburst
Copy link

burstburst commented Feb 4, 2019

lmao, me too. I thought I might be writing to a drive that's too full but I changed the target. honestly i think my ram is just trash

@shashimn11
Copy link

I got the same error when capturing the screen.
[dshow @ 0000020d6fd4b480] real-time buffer [screen-capture-recorder] [video input] too full or near too full (92% of size: 1024000000 [rtbufsize parameter])! frame dropped!

I modified the ffmpeg command to include "-preset veryfast -crf 22 " for the output and it helped.

ffmpeg -loglevel info -f dshow -rtbufsize 1024M -framerate 20 -video_device_number 0 -i video="screen-capture-recorder" -f dshow -audio_device_number 0 -i audio="Stereo Mix (Conexant SmartAudio HD)" -filter_complex amix=inputs=1 -vcodec libx264 -pix_fmt yuv420p -r 15 -preset veryfast -crf 22 -s 1120x630 C:\Temp\del\recording\feb8_test1.mp4

@rdp
Copy link
Owner

rdp commented Feb 16, 2019 via email

@jan4984
Copy link

jan4984 commented Aug 30, 2019

em... I found if record to a local file which alerady exists, ffmpeg will ask to overwrite or not. That asking blocks stream and this problem happen. So means this capture device driver not work good with ffmpeg pipeline?

@LeetCodes
Copy link
Author

em... I found if record to a local file which alerady exists, ffmpeg will ask to overwrite or not. That asking blocks stream and this problem happen. So means this capture device driver not work good with ffmpeg pipeline?

you can use the -y flag to have ffmpeg assume yes for any yes/no prompts

@jan4984
Copy link

jan4984 commented Aug 30, 2019

@LeetCodes yes. but blocking output stream should not show this error, confusing users.

@rdp
Copy link
Owner

rdp commented Aug 31, 2019 via email

@RamProg
Copy link

RamProg commented Oct 16, 2020

I have the same problem, right now. Any solution?

[mp4 @ 0000019b2e74d0c0] Starting second pass: moving the moov atom to the beginning of the file
[dshow @ 0000019b2e73e640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (77% of size: 150000000 [rtbufsize parameter])! frame dropped!
Last message repeated 6 times
[dshow @ 0000019b2e73e640] real-time buffer [screen-capture-recorder] [video input] too full or near too full (110% of size: 150000000 [rtbufsize parameter])! frame dropped!

-rtbufsize 150M -f dshow -framerate 30 -i video="screen-capture-recorder":audio="virtual-audio-capturer" -c:v libx264 -r 30 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -movflags +faststart -c:a aac -ac 2 -b:a 128k -y "output.mp4"

@rdp
Copy link
Owner

rdp commented Oct 16, 2020 via email

@lynrayy
Copy link

lynrayy commented Sep 2, 2021

I set -rtbufsize 1024M and conslose says:

[dshow @ 000001d642c8ec00] real-time buffer [screen-capture-recorder] [video input] too full or near too full (88% of size: 150000000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001d642c8ec00] real-time buffer [screen-capture-recorder] [video input] too full or near too full (99% of size: 150000000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001d642c8ec00] real-time buffer [screen-capture-recorder] [video input] too full or near too full (110% of size: 150000000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001d642c8ec00] real-time buffer [screen-capture-recorder] [video input] too full or near too full (99% of size: 150000000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001d642c8ec00] real-time buffer [screen-capture-recorder] [video input] too full or near too full (110% of size: 150000000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001d642c8ec00] real-time buffer [screen-capture-recorder] [video input] too full or near too full (99% of size: 150000000 [rtbufsize parameter])! frame dropped!

ShareX commands:
-rtbufsize 150M -f dshow -framerate 60 -i video="screen-capture-recorder":audio="virtual-audio-capturer" -rtbufsize 1024M -c:v libx264 -r 60 -preset fast -tune zerolatency -crf 16 -pix_fmt yuv420p -movflags +faststart -c:a aac -ac 2 -b:a 128k -y "output.mp4"

RTX 2060 6GB + 8GB RAM + Intel Core i5 8400

@lynrayy
Copy link

lynrayy commented Sep 2, 2021

Also i tried use GDI Grab, but it is worse then screen-capture-recorder because it have bigger freezes

Why ShareX so bad?

@rdp
Copy link
Owner

rdp commented Sep 16, 2021 via email

@EzeKees
Copy link

EzeKees commented Nov 1, 2021

This can be solved by specifying -thread_queue_size 1024 in ffmpeg, you can even increase that value, for example 4096. However, you have to be VERY careful because this literally swallows ALL the RAM memory.

@MassMessage
Copy link

Getting same issue with command line:

ffmpeg -framerate 30 -thread_queue_size 1024 -f dshow -i video="EasyCamera" -video_size 640x480 -vcodec libx264 -preset ultrafast -rtbufsize 2G -r 15 -f rtsp rtsp://localhost:3030/stream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests