HiI need to increase my buffer size for UDP video streaming
My current buffer size is
When I use ffmpeg to capture my desktop and send the stream over udp to another computer to record, the maximum bit rate and buffer size I can use is 500k with this command:
If I use a higher bit rate the command fails and gives me an error saying the buffer size is too small
I tried to increase the buffer size with this command but I still get the same error with a higher bitrate
Do I need to add set the new buffer size in my /etc/sysctl.conf and then reboot, and are there any other settings that control the buffer size I should set
The reason I'm looking into this is because I have figured out how to send the output from obs studio over an UDP stream with ffmpeg to a second machine which I can then record the stream on either using obs or ffmpeg.
This is useful because it means you can spread the load between 2 computers, the first computer using obs to capture you web cam, record the desktop and audio etc, then send the stream over udp using ffmpeg command in obs to the second machine to record
I have also figured out how you take the output from obs and multicast stream to all device on the network at onc ewith less than 1 second of latency which is very cool as it means you can create your own lan tv station with obs.
My laptop has 4 gig of ram if that has any bearing on the buffer size I have used the same laptop running OS-X and Linux to send higher bitrate streams over UDP before
so the bottleneck is buffer size on FreeBSD, if anyone could give me a prod in the right direction would be really helpful.
I'll make a video about obs and udp streaming soon I just need to resolve the buffer size issue on FreeBSD first.
My current buffer size is
Bash:
kern.ipc.maxsockbuf: 2097152
When I use ffmpeg to capture my desktop and send the stream over udp to another computer to record, the maximum bit rate and buffer size I can use is 500k with this command:
Bash:
ffmpeg -f x11grab -r 15 -s 1366x768 -i :0.0+0,0 \
-c:v libx264 -preset ultrafast -b 500k \
-tune zerolatency \
-maxrate 500k -bufsize 500k \
-pix_fmt yuv420p \
-f mpegts 'udp://192.168.1.102:6881?pkt_size=1316'
If I use a higher bit rate the command fails and gives me an error saying the buffer size is too small
I tried to increase the buffer size with this command but I still get the same error with a higher bitrate
Bash:
# sysctl -w kern.ipc.maxsockbuf=16777216
Do I need to add set the new buffer size in my /etc/sysctl.conf and then reboot, and are there any other settings that control the buffer size I should set
The reason I'm looking into this is because I have figured out how to send the output from obs studio over an UDP stream with ffmpeg to a second machine which I can then record the stream on either using obs or ffmpeg.
This is useful because it means you can spread the load between 2 computers, the first computer using obs to capture you web cam, record the desktop and audio etc, then send the stream over udp using ffmpeg command in obs to the second machine to record
I have also figured out how you take the output from obs and multicast stream to all device on the network at onc ewith less than 1 second of latency which is very cool as it means you can create your own lan tv station with obs.
My laptop has 4 gig of ram if that has any bearing on the buffer size I have used the same laptop running OS-X and Linux to send higher bitrate streams over UDP before
so the bottleneck is buffer size on FreeBSD, if anyone could give me a prod in the right direction would be really helpful.
I'll make a video about obs and udp streaming soon I just need to resolve the buffer size issue on FreeBSD first.