moonlight-stream / moonlight-android

GameStream client for Android
GNU General Public License v3.0
3.53k stars 540 forks source link

Latency with T95Q box with some test #667

Closed MasterMCif closed 4 years ago

MasterMCif commented 5 years ago

Hello everyone, first of all, sorry for this wall of text, but it's driving me insane.

I had a T9 Android Box with Rockchip RK3328 that worked for about 2-3 weeks before dying, which I used to stream games likes AC:Origins or Tekken 7 with no problems with this settings:

1080p 60fps with a bitrate of 14-15000 kbps with latency of 12-13ms FORCED H265 720P 60fps with a bitrate of 6-7000 kbps with latency of 7-8ms FORCED H265 ( for lowest input lag)

Here's box specs (OS:Android 8.1 - CPU:RK3328 Quad-Core A53 Frequency:1.5 - GPU:Mali-450MP2 - 4gb ram ddr3 / 32 gb rom - Ethernet 10/100M rj45) Decoders supported (H.265 HEVC MP-10 L5.1 up to 4Kx2K 60fps)

Thinking it was a good idea, I bought another box instead of the same replacement, the T95Q which I'm actually using, it's faster in menu and other things than T9, but I've only problems with Moonligh:

1080p 60fps with a bitrate of 14-15000 kbps with latency of 40+ms FORCED H265 720p 60fps with a bitrate of 4-5000 kbps with latency of 26ms FORCED H265 (never goes under that value, it's the setting i'm actually using for everything)

Here's box specs (OS:Android 8.1 - CPU: Amlogic S905X2 Quadcore cortex-A53 Frequency:1.8 - GPU: Mali G-31 MP2 - 4gb ram ddr4 / 64 gb rom - Ethernet 10/100/1000M rj45) Decoders supported (H.265 HEVC MP-10@L5.1 up to 4Kx2K @ 60fp)

I have a 1080ti and have done everything listed below: -Latest w10 / android update app -Reinstalled all latest gpu drivers + geforce experience with DDU in safe mode -Client side 360p + 500kbps bitrate + optimize game = always 26 ms hardware decode, with h264 its like 30-31ms (I don't bother with h264 at this point) -Reinstalled app many time -100mb duplex option in ethernet cable -Connected with 2.4 and 5ghz wifi mode -Tried different times of the day to play -Reset my router (all ports are opened for Moonlight, used tester and it's all ok) -Tried streaming to my Samsung Galaxy S3 and Galaxy Tab, achieving 14ms with h264 (only option avaible) at 720p60 5k bitrate -Turned off all geolocation and other stuff like this -Turned off all my bluetooth dongles -Turned off Remote Desktop on my w10 pc like in wiki

And a friend of mine also has a Bqeel Y5 with same specs Amlogic s905x2, tried Moonlight there and same exact 26ms latency!

So now, I'm not an expert, but is Amlogic s905x2 the real problem? Looking at benchmarks theoretically and if I'm not wrong specs should be better than T9 rockchip. So why can't I lower latency under those 26ms like the old T9? Should I expect an update for the app to support this box better or it's T95Q fault? Don't know what to do anymore, for me it's unplayable at this state, even for non fast paced games. I'm sorry if this issue could be inappropriate, if you know anything that could help me it would be very helpful!

cgutman commented 5 years ago

It seems to just be something with the Amlogic's decoder that causes it to be higher latency than many others. Benchmarks don't cover video decoding latency. I've seen the issue on my Amlogic boxes and haven't found a consistent tweak to reduce it.

You can try using 90 or 120 FPS mode which may help.

MasterMCif commented 5 years ago

@cgutman First of all, thank you for the response.

I've done some other test with T95Q, maybe it's not usefull but I wanted to share them, maybe it could be usefull to someone with the same SoC.

Nvidia Driver 418.81 Geforce Experience 3.16.0.140 Moonlight 0.8.1 on PC host Game tested: AC Origins, low settings uncapped framerate (90-170fps), fullscreen mode, v-sync off

**Moonlight 6.2 on Android 8.1 client settings:** -Stretch video to fullscreen = Enabled -Enable 5.1 surround sound = Disabled -Optimize game setting = Enabled -Never drop frames = Disabled

360p h264: 2mb 24ms(60fps) 19ms(90fps) 19ms(120fps) 360p h265: 2mb 22ms(60fps) 19ms(90fps) **16ms(120fps)**

480p h264: 2mb 26ms(60fps) 22ms(90fps) 20ms(120fps) 480p h265: 2mb 24ms(60fps) 20ms(90fps) 20ms(120fps)

720p h264: 2mb 28ms(60fps) 26ms(90fps) 24ms(120fps) 720p h265: 2mb 26ms(60fps) 22ms(90fps) 21ms(120fps)

1080p h264: 2mb 36ms(60fps) 36ms(90fps) 44ms(120fps) 1080p h265: 2mb 30ms(60fps) 27ms(90fps) 27ms(120fps)

1440p h264: 2mb 36ms(60fps) 510ms(90fps) 410ms(120fps) 1440p h265: 2mb 21ms(60fps) 17ms(90fps) 16ms(120fps)

2160p h264: 2mb 267ms(60fps) 177ms(90fps) 155ms(120fps) 2160p h265: 2mb 22ms(60fps) 21ms(90fps) 20ms(120fps)

Aida64 codec list found: OMX.amlogic.avc.decoder.awesome video/avc OMX.google.h264.decoder video/avc OMX.amlogic.hevc.decoder.awesome video/hevc OMX.amlogic.vp9.decoder.awesome video/x-vnd.on2.vp9 OMX.google.vp9.decoder video/x-vnd.on2.vp9 OMX.amlogic.video.encoder.avc video/avc OMX.amlogic.video.encoder.hevc video/hevc

From what I've tested, lowest ms scored are with 360p and 1440p with like 1 frame lag with 16-17ms in h265. So, could I hope in a future update latency tweak with this specific SoC, or could we say that's Box limit? (I don't hope in future firmware updates for this Android box specifically) I could try test some other stuff but I really don't know what to test anymore lol Thanks anyway for all the work putted in this, I'm extremely thankfull for what Moonlight team is doing.

thehunterofshadows commented 5 years ago

Wonder why it would be lower with 1440p. But I just got a T95Q myself, and my 1080 scores are same as yours. My PC and T95Q are hardwired into a Highhawk router with cat6.

My PC: GTX 1070, 8700k GFE: 3.17.0.126

MasterMCif commented 5 years ago

Well, It's reassuring to know we have like the same performance. Also latest update just broke the warning message for decoding latency, I can't even track those datas anymore. I think I will live with it no matter how inexplicabile, playing 2k at 120fps with 17 ms since I can't go down from there in anyway..

cgutman commented 5 years ago

@MasterMCif can you elaborate on why you think the latency messages are broken? They're working fine for me on my devices.

MasterMCif commented 5 years ago

Maybe it is not related to this problem but since you asked I've taken a screenshot that happen everytime I exit every game (hardware decode latency is the only factor that change by a small number). This happen since I've updated to the latest version this week, before it was fine (as shown from the data I've displayed months ago)

Screenshot_20190429-140033

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.