moonlight-stream / moonlight-android

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

Microstutter Problem - Testing and Results #214

Closed genmatrix closed 5 years ago

genmatrix commented 8 years ago

So the problem I'm seeing is Microstutters and my findings with testing on multiple devices.

I'm not a developer nor have experiencing developing applications and I thank the Dev of this app for all the hard work put into this app! I can perform additional testing as I love using Gamestream and being able to use it on non-NVIDIA devices.

Misc

Asus Hero VIII 6600K SLI 970 GTX 16GB RAM Windows 10 (10.0.10586)

NVIDIA Info

Geforce Experience V. 2.11.2.66 NVIDIA Display Drivers Tested - 362.00 and 364.72

Routers Tested

Netgear R8500- Native Latest Firmware and DDWRT 29200 (Kong) - Via Wireless to Tablets Netgear R8000 - Native Latest FIrmware and DDWRT 29440 (Kong) - Via Wireless to Tablets Netgear R7000 - DDWRT 28000M (Kong) - Set up as AP, Connected Via Powerline Ethernet, used by Shield TV also connect via Ethernet

Gear Tested

NVIDIA Shield TV X1 - Android Marshmellow, Update 3.1 (4/18/2016) NVIDIA Shield K1 Tablet - Android Marshmellow, Update 1.2 (4/13/2016) Google Pixel C (X1) - Andriod Marshmellow, 6.0.1 (MXB48J) Build. Sony Xperia Z4 Tablet (Snapdragon 810) - Andriod Marshmellow 6.0, 32.1.A.1.185 Build

Results

NVIDIA Shield TV X1 Native Gamestream 1080P 60FPS, H.264 WIFI 5GHZ, AC - No Microstutters Ethernet - No Microstutters

Moonlight 1080P 60FPS, H.264 WIFI 5GHZ, AC - Microstutters Visible, around every one second or so. Ethernet - Microstutters Visible, around every one second or so.

NVIDIA Shield K1 Tablet Native Gamestream 1080P 60FPS H.264 WIFI 5GHZ, N - No Microstutters

Moonlight 1080P 60FPS, H.264 WIFI 5GHZ, N - Microstutters Visible, visibility consistent with Shield TV results.

Google Pixel C (X1) Moonlight 1080P 60FPS, H.264 WIFI 5GHZ, AC - Microstuttering also present with the addition of massive lag spikes accompanied by "Poor Network Performance" messages, so I can't say for certain if it was consistent with other devices tested. Found that this tablet has buggy wifi, confirmed by google. https://productforums.google.com/forum/#!topic/nexus/CM9tv3pjTfQ. This tablet was returned.

Sony Xperia Z4 Tablet (Snapdragon 810) Moonlight 1080P 60FPS, H.264 and H.265 WIFI 5GHZ, AC - Same consistent microstutter seen in Shield TV and NVIDIA K1 while using Moonlight. H.264 had slightly higher ms processing than H.265 but exhibited the same microstutter observed in other devices.

cgutman commented 8 years ago

Thanks for the testing. Does the microstuttering happen in 720p60 or 1080p30 settings?

Can you try either the Chrome or the iOS port of Moonlight to see if it's an Android-specific issue?

Chrome port is here: http://forum.xda-developers.com/showpost.php?p=66415214&postcount=3434

genmatrix commented 8 years ago

I got an iPhone and decent laptop I can test with. I've experimented with the Chrome version but only briefly. Is there any option to turn off "Optimize Game Settings" in the Chrome version? Would it matter?

When I get out of work, I'll test both out and report back.

genmatrix commented 8 years ago

Using an iPhone 6s Plus at 1080P or 720P in 60 or 30 FPS exhibits the same behavior. It's actually a bit worse on my iPhone because the sound also cracks occasionally and stuttering was a bit more erratic. Something that didn't occur in my other devices.

For Chrome, I'm using my Lenovo Y50 (Haswell) with an 860M hardwired into my router. Since this thing uses Optimus graphics switching it freaked out because it decided to use the Intel Graphics for decoding rather than the 860M so it ran terribly but I got that resolved. The microstutters still persisted though in the same way as my other devices (excluding iPhone) regardless of resolution or frame rate.

Since I was hardwired I was looking at my desktop to make sure the microstutters were not happening on my PC but at a side by side comparison my desktop was silky smooth.

Let me know if you need any additional information and I appreciate you taking the time to look into this.

Edit: here's a screen capture from my Xperia Z4 Tablet that accurately captures what I'm seeing. I couldn't capture at 1080p because it exaggerated my problem. https://youtu.be/H-oX6VyzG-s

cgutman commented 8 years ago

Can you get ADB logcat logs while you're streaming?

Instructions here if you're not familar with logcat: https://android.stackexchange.com/questions/33216/how-can-i-get-a-logcat

genmatrix commented 8 years ago

https://drive.google.com/file/d/0B7aP6ykFh7PdV180ZC0xSER3bHM/view?usp=sharing

Wasn't sure how long to do it. I think I got like 40 seconds with Moonlight running at 720p 60FPS.

cmaeschig commented 8 years ago

Hi, did you make any progress? The stutter on an Iphone 6s is a bit different (more random) but also visible. On our android devices (including Samsung s6 edge) there is also a stutter about every second. Everything else if perfectly smooth. Looks like having keyframe issues. Thanks! Chris

cgutman commented 8 years ago

So this issue is complicated by the fact that there appears to be stuttering issues caused by drivers/GFE that several Shield users are also reporting. People are reporting better results with 365.10 drivers and GFE 2.11.3.5. Can you both try these versions?

https://forums.geforce.com/default/topic/885856/gamestream/dropped-frames-ethernet-and-shield-tv-/ https://forums.geforce.com/default/topic/934522/gamestream/gfe-2-11-3-5-beta-grd-365-10-gamestream-is-finally-fixed-/

cmaeschig commented 8 years ago

I've tested both versions. Same issue in both cases. The stutter is visible from the first second on. It's occurs every second for about maybe 5 frames. In the other GFE Versions it's exactly the same. :(

genmatrix commented 8 years ago

Thanks for the update! I've recently tried the most recently posted Chrome build (on XDA v3 I think?) on a 2015 Macbook Pro 13 inch and while the effect is still there, it's no where as bad as it was when I was testing previously. I haven't had an opportunity to test with my android devices but once I do I will report back.

Tysonbell commented 7 years ago

I can confirm there is massive stuttering with Moonlight. I have no stuttering at all using official Nvidia GameStream on my Shield Tablet and Shield TV. With Moonlight, same settings as GameStream (1080p60), I have stuttering every half second or so. Besides my 2 Shield devices, I have tested using iPhone 6s, iPad Air 2, Sony Xperia Z3, Xperia T2 Ultra and Xperia Z3 tablet and PS Vita. All of them have the same stuttering. I am using the latest Geforce Experience (I just updated). But even on older Geforce Experience versions, stuttering was always present using moonlight. Changing resolution and bitrate doesn't fix stuttering.

zeruth commented 7 years ago

Yes this is a very real problem and it virtually makes moonlight as an idea useless.

cgutman commented 7 years ago

There's clearly something going on in the setups where you experience significant stuttering. I don't see that it affects most users (including myself). There are several thousand active installations of Moonlight on Shield devices. I doubt that would be the case if stuttering was widely experienced in that user-base (especially given that every one of those users has Shield Hub to test against).

So all of you who do see the stutter, if you haven't already, please report:

zeruth commented 7 years ago

Running on S6 Edge+ Every single game and Desktop

PC: i7 4770k GTX 960 20GB RAM

Ive tried everything as far as networking. Hardwired. Wireless AC, 2.4. It just doesnt matter.

It streams perfectly fine at 1080p60 20mbps except for the hiccups every couple seconds or so. And its just as bad at 720p30 at 1mbps. Ill record a video and repost

zeruth commented 7 years ago

Here is a cap of 1080p60-20 then 720p60-1: https://youtu.be/u2HMTGQ_nPo

cgutman commented 7 years ago

@zeruth This is definitely a packet loss issue. Can you explain more about your network setup? How is your PC connected to your router? How is your S6e connected to your router? Is your wireless network 5 GHz?

zeruth commented 7 years ago

Yes the computer is hardwired and the s6 is on 5ghz and distance from the router doesnt change the stuttering. No matter what ive tried it still has hiccups. Ive tried various devices foo. I get this problem on two different routers and on moonlight across all platforms (android chrome and java). Ive also tried three NICs (ethernet, built in wifi, and PCI-e AC) its frustrating.

MagCat commented 7 years ago

I'm using regular S7 and the microstutter has been insane for the last 3 days. I don't know what caused the problem but I had very pleasant experience without any problem before. For some reasons moonlight keeps saying bad connection environment and giving me insane microstutter.

-Running on 4.3 non root version on android -Every game I run has insane micro-stutter every few seconds. Call of Duty: Infinite Warfare, Witcher 3, DOOM, Skyrim and more -My PC is i7 4790k GTX 970 16GB DDR3 RAM -I tested on both 2.5 Ghz and 5.0 Ghz channel. While 2.5 Ghz has more severe issues, I have zero packet loss on my 5.0 Ghz and the microstutters still happen.

Note that I tried to set Speed&Duplex's value to 100Mbps Full Duplex + turning off Location, but the problem still persists.

Tysonbell commented 7 years ago

@cgutman I tried to make a video, but it's pointless because the screen recoding feature of my Shield Tablet only supports 30fps, so you wouldn't be able to notice the stuttering. My phone camera also doesn't support 60fps.

Nonetheless here are the other specs:

About the ADB logcat logs, how does this work?

SensualCarrots commented 7 years ago

@cgutman First of all, thank you so much for the hard work you've put into this. It really is an amazing product! I am using the Moonlight Streamer with both a Samsung Tab S and a Samsung Note 5. I've tried every combination of the resolution and bitrate, from super low to crazy high, all the same results. Micro stuttering, especially noticeable when panning and the images are changing quickly. I was wondering, is there a way in the android version to look at the stats like in the Nvidia Gamestream? This would help me identify if it is indeed packet loss or not. I've searched the net for this but haven't found anything yet, so sorry if this is common knowledge that has eluded me. I really don't think it is, as I get the similar results on my Shield TV Pro. The exception is that if I get over 100 FPS on my PC, then it smooths out on the Shield, but not moonlight.

btw PC Specs: i7 6700k @ 4.6 GHz GTX 1080 16 GB DDR4 1 TB SSD

I also have a 144 Hz monitor which I don't think would matter, but always set it to 60 when gamestreaming. Not sure if this is necessary, but it doesn't seem to make a difference either way, I just figured it should match the client. I also read something about changing the encoder on the PC side, but not really sure how to go about doing so.

jackjt8 commented 7 years ago

i7-6700hq 2.6GHz, 16GB 2133MHz ddr4, GTX 960m 2G

Notebook has just been serviced and Windows 10 has been reinstalled and updated fresh.

Belkin AC1200 Dual-Band Gigabit Router F9K1113 v4 - Tested with both host and client on the same 5GHz network.

720p30 - 5mbps.

Getting the same issue. I've attached the latest nvstreamercurrent.log.

NvStreamerCurrent.txt

stale[bot] commented 5 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.

lfuelling commented 3 years ago

Why was this closed, this is still an issue.