Ffmpeg Real-time buffer issue [rtbufsize parameter]

ffmpegstreaming

Im trying to Stream the Audio and Video over the Network using this command

  -f gdigrab -framerate 60 -video_size 1920x1080 -i desktop -f dshow -i audio=""virtual-audio-capturer"" -vcodec libx264 -preset ultrafast -tune zerolatency-pix_fmt yuv422p -f mpegts udp://{IpAddress}:1234 

but after 5 minutes of perfect quality streaming im getting this Error Message and the Stream suddenly stopps streaming.

enter image description here

What am i doing wrong here?

Best Answer

Set a larger buffer for the audio

-f gdigrab -framerate 60 -video_size 1920x1080 -i desktop -f dshow -rtbufsize 15M -i audio=""virtual-audio-capturer"" -vcodec libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv422p -f mpegts udp://{IpAddress}:1234 
Related Question