RPi Moonlight (Wifi): Dropped Frames, Multiple Errors, Crash

Casting any media from a PC to the RPi, other than on a Ethernet connection, results in a large number of errors, and an eventual crash. Streams are very responsive, and smooth at 720p at 30fps, but drops frames and lags sporadically, until that crash (~15min).

I’m unsure, but are the wireless routers are too slow? The 1 gigabit cable runs perfectly.

Otherwise, I’m not sure what I’m doing wrong, as I’ve spent hours on this and Moonlight seems unusable in terms of reliability. Other applications have latency times of up to 10 seconds (e.g. uv4l, OBS, VLC).

I’ve searched for each error, but find little information - any help (fixes or software / hardware alternatives) would be appreciated.

If I resolve this, I’ll come back and post the solution.


Objective: Wireless live cast of VR headset output to Moonlight.

Problem: While smooth and responsive for the most part (latency <50ms), Moonlight drops frames, and eventually crashes. How long it takes to crash appears to be dependent on both the intensity of applications run, and the connection medium between the PC and the RPi. Running a game (e.g. Fallout 4), will result in a crash in about 15 minutes.

Moonlight Configuration: moonlight stream -720 -fps 30 -app Steam x.x.x.x


  • VR Headset: Samsung HMD Odyssey
  • PCs: Asus ROG G751JT / Dell Inspiron 15 Gaming 7577
  • Microprocessor: Raspberry Pi 2 Model B
  • RPi Wi-Fi Dongle: EDUP (802.11N)
  • Networking: Technicolor TG587 / Samsung Galaxy Note 4 / Direct Cat 5e RJ45

Attempted Troubleshoots: All configurations of the Asus or the Dell, through the TG587 or Note 4 or Cat 5e, to the RPi, to multiple HDMI-compliant screens.

Error Details: Direct Cat 5e Ethernet connection yields perfect results (aside from one crash when starting up Windows Mixed Reality; worked fine once running). However, any combination using the TG587 or Note 4 produces the following errors:

  • “Returning RTP packet after queue overgrowth” / “Returning RTP packet queued for too long” followed by “Received OOS audio data (expected ####, but got ####)” - occurs dozens of times;
  • “Waiting for IDR frame” - occurs hundreds of times;
  • “IDR frame request sent” - occurs a few dozen times;
  • “Network dropped an entire frame” - occurs about a dozen times;
  • “Unrecoverable frame ###: ## + ## = ## received < ## needed” - occurs a few dozen times; and
  • “Request IDR frame: Transaction failed: 11” / “Loss Stats: Transaction failed: 11” - occurs once right before crashing.

Possible Cause: Transfer rate of router / Wi-Fi dongle is too low to handle smooth, responsive and reliable casts?

Hi @anky1978,

Thanks for being part of the GitHub Community Forum! We’re glad you’re here.

I wanted to jump in here, and mention that if you don’t get the help you’re looking for here, you might want to try the project’s official documentation. You’ll often get faster and more accurate support directly from the project maintainers and the documentation or contact info in their repo.

Best of luck!

Thanks nadiajoyce. I had a look at some of the documentation, but most of what I needed to work out required emailing the devs.

TLDR Solution
Using an RJ45 cable, plug the RPi in to your Fast/Gigabit Ethernet capable router and stream wirelessly from your PC.

Errors and crashes in the above configurations seem to be due to poor data transfer speeds. Total wireless streaming could possibly be improved by using an 802.11ac dongle on the RPi.

Re-installing GeForce Experience can resolve some errors.

After troubleshooting the above configurations for a considerable number of hours, I came up with a workable solution. If the Raspberry Pi is plugged in to a router via an Ethernet cable, then errors above can be reduced if not completely eliminated.

Using a 1000BASE-T router (Gigabit Ethernet), no errors whatsoever occur running Moonlight at 720p/30fps. A few errors occur when running 720p/60fps, as it does with worse latency at 1080p/30fps, or 1080p/60fps. Nevertheless, streaming multiple applications (word processing, media sites, screen recording, DirectX applications, and VR), worked stably for at least four hours.

Using a 100BASE-T router (Fast Ethernet), produces significantly more of the errors above, but ran for about four or five hours with only one crash. It is worth noting, that streaming audio tends to fail within a few minutes of the stream.

All tests between the computer and the router were done over a 20GHz 802.11n protocol.

Included in the tests, was switching between Windows Mixed Reality, Steam VR, and Unity. It’s worth noting that I observed multiple errors and crashes when changing between graphics-heavy applications. On the Dell, when Moonlight did crash, new errors concerning failing the RTSP handshake, and memory allocations, prevented a reconnection until the computer was reset.

Uninstalling and re-installing GeForce Experience resolved that issue, so there appears to be some disagreement between the two applications.

Future Tests
Although 802.11n has data transfer ceiling of 150mbps, you are likely to get much less than that in practice - which is probably causing the crashes. It does appear though, that the 100mbps between the router and the RPi is fast enough to stream content at 720p/30fps. It would be worth investigating the wireless transfer speeds of the RPi, and any PC being used.

It would also be worth investigating the faster 802.11ac protocol. However, as all models of the Raspberry Pi are still using USB2.0, any USB dongle would be limited by the USB BUS speeds. This would mean you’d be streaming at something closer to 200mbps, but that might just be enough to reliably stream wirelessly to the RPi.