Hello
TL;DR: two PC, peer-to-peer connected with Gigabit-LAN. How to stream the desktop via UDP @1080p60 with no (<100ms) latency using OBS studio and ffmpeg output?
I want stream my desktop in my local network (Gigabit-LAN) with (as close to) zero latency as possible.
I used to stream with ffmpeg (gdigrab/desktop as source) using libx264 to udp, accessing the stream with mplayer. I achieved a stable latency of 60ms and framerates of close to 60fps @1280x1024 and 35fps @1920x1080 with no visible image degradation.
Enter desktop duplication API (DDA, idk if that is the correct abbreviation).
Since Windows 8 the gdigrab performance (using the BitBLT-Method) has been severely limited as Aero cannot be switched off any more. I found OBS Studio, which gives terrific performance and almost no visible latency in its preview video (because it uses DDA).
I managed to set up OBS Studio to stream to UDP via the ffmpeg output quickly (see this), but the latency is 4 to 5 times larger than on my Windows 7 setup.
I think OBS Studio grabs the desktop via the DDA and encodes it to h264, then it handles the stream to ffmpeg which encodes it again and sends it to UDP. This introduces loads of lag. I tried so many different settings I lost track of what I'm doing; among my inspirations where this and this.
Is OBS Studio the right tool to achieve the performance I need?
How can I stream without much unnecessary encoding and very fast? I am not really limited on the bandwidth, as I have the full Gigabit LAN connection, though uncompressed video easily exceeds the network speed.
Thank you and cheers
Arvid
PS: if you need more specific information let me know.
TL;DR: two PC, peer-to-peer connected with Gigabit-LAN. How to stream the desktop via UDP @1080p60 with no (<100ms) latency using OBS studio and ffmpeg output?
I want stream my desktop in my local network (Gigabit-LAN) with (as close to) zero latency as possible.
I used to stream with ffmpeg (gdigrab/desktop as source) using libx264 to udp, accessing the stream with mplayer. I achieved a stable latency of 60ms and framerates of close to 60fps @1280x1024 and 35fps @1920x1080 with no visible image degradation.
Enter desktop duplication API (DDA, idk if that is the correct abbreviation).
Since Windows 8 the gdigrab performance (using the BitBLT-Method) has been severely limited as Aero cannot be switched off any more. I found OBS Studio, which gives terrific performance and almost no visible latency in its preview video (because it uses DDA).
I managed to set up OBS Studio to stream to UDP via the ffmpeg output quickly (see this), but the latency is 4 to 5 times larger than on my Windows 7 setup.
I think OBS Studio grabs the desktop via the DDA and encodes it to h264, then it handles the stream to ffmpeg which encodes it again and sends it to UDP. This introduces loads of lag. I tried so many different settings I lost track of what I'm doing; among my inspirations where this and this.
Is OBS Studio the right tool to achieve the performance I need?
How can I stream without much unnecessary encoding and very fast? I am not really limited on the bandwidth, as I have the full Gigabit LAN connection, though uncompressed video easily exceeds the network speed.
Thank you and cheers
Arvid
PS: if you need more specific information let me know.