0
I am trying to stream my desktop to facebook rtmp server using screen-capture-recorder:
ffmpeg -re -rtbufsize 256M -f dshow -i audio="Mikrofon (Realtek Audio)"
-rtbufsize 256M -f dshow -i audio="virtual-audio-capturer"
-rtbufsize 1024M -f dshow -i video=screen-capture-recorder -r 30
-filter:v scale=1280:720 -c:v h264_nvenc -pix_fmt yuv420p -preset fast
-b:v 8M -maxrate:v 10M -c:a aac -b:a 128k -ar 44100
-f flv rtmp://live-api.facebook.com:80/rtmp/..............
I am using h264_nvenc codec for gpu acceleration, but I can stream to rtmp at only 12-18 fps. However, when I stream into a file:
ffmpeg -re -rtbufsize 256M -f dshow -i audio="Mikrofon (Realtek Audio)"
-rtbufsize 256M -f dshow -i audio="virtual-audio-capturer"
-rtbufsize 1024M -f dshow -i video=screen-capture-recorder -r 30
-filter:v scale=1280:720 -c:v h264_nvenc -pix_fmt yuv420p -preset fast
-b:v 8M -maxrate:v 10M -c:a aac -b:a 128k -ar 44100
D:\test.mp4 -y
I get 30 fps without problem, even when playing game (eg. Call of duty 6, pretty HW draining).
Also, when streaming (to rtmp) starts, after a while I keep getting this error, altough my -rtbufsize size is 1024M, which I consider pretty big, and many frames are lost:
real-time buffer too full or near too full! frame dropped!
Can you help me how to prevent rtbufsize error, and is it possible to modify my command so I can stream to rtmp at 30 fps ? Thank you
If needed, my ffmpeg build config is:
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.1.0 (GCC) configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --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-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-zlib