I have issues with the streaming audio stuttering and I'm getting many OOS messages in the bash shell, visible when I quit limelight-pi. The stuttering is quite extreme, with considerable gaps of silence in between snippets of sound. The video stream shows no issues and when at 720p 60fps looks fantastic with little to no latency when playing a game.
I've tried both Raspbian and Arch - Arch gave a better audio performance than Raspbian when using ethernet but still had stuttering. Both distros give stuttering audio when using wifi.
I've tried changing command line arguments for limelight-pi like "-720 -30fps -bitrate 10000" etc, but nothing seems to improve matters greatly. I've also tried changing Host and Client settings in Steam BPM.
I've also tried reinstalling all Nvidia drivers and software, including testing with GFE 2.0.1 and reinstalling Steam; non made any difference to the problem.
My set up when using wireless is as follow:
PC:
Intel Core i5 4570s @2.90 GHz
8GB DDR3 RAM
EVGA Geforce GTX670
GFE 2.1.0.0
Nvidia drivers version 337.88
Intel I217-V gigabit ethernet NIC (wired to Buffalo router below)
Router:
Buffalo WZR-HP-G300NH wireless n router
Openwrt Attitude Adjustment 12.09
N wireless 40MHz bandwidth, channel 1 HT40+
(uses ath9k module)
Raspberry Pi:
512MB second version
Raspbian / Arch linux
TP-Link TL-WN722N 150Mbps USB wireless dongle with attached aerial (uses ath9k_htc module)
Oracle JDK 8
Overclocked to 1000MHz using standard overclocking config
128MB RAM for GPU
I've tested wireless throughput between my Raspi and my PC using iperf and constantly achieve 24-56 Mbps TCP and average 38.8 Mbps when forcing iperf to 40 Mbps for UDP throughput tests as follows:
iperf -fm -c192.168.10.142 -t30 -u -b40M
Jitter varies from 0.35 and 0.40 ms over the 30 second UDP test, with one datagram arriving out of order.
The average throughput on both tests does vary from test to test and I'm trying to determine whether this has something to do with ath9k automatic rate adaptation.
When doing these tests, I have only two or three devices connected via wifi to my router, non of them doing any kind of streaming and are just sitting idle.
I live in an area where there is little to no wifi interference from other APs.
The limelight android client on my Jolla phone (which connects via wifi to the same router) seems to work well and hardly has any audio stuttering, though it does occur occasionally and intermittently, maybe one tiny audio glitch every 4-8 seconds
Are the some other tests I can do to find the cause of the problem? What steps could I take next to troubleshoot? I'm thinking issues with the ALSA audio buffer, ALSA audio bitrate, libopus issues......