mariotaku / moonlight-tv

Lightweight NVIDIA GameStream Client, for LG webOS TV and embedded devices like Raspberry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AV1 performance issue

Baarkszz opened this issue · comments

Moonlight Version

1.6.5

Device Type

webOS TV

Device Model

LG CS

Device OS

03.40.85

Host OS

Windows

Host Software

Sunshine

Host Setup

5800x3D, 7900XT, 16GB RAM, WIN 11

Bug Description

AV1 stream is choppy. Latency is good, image quality is good, but image quality is choppy as if it has extreme screen tearing.
LG CS does support AV1 properly for media playback, but maybe for streaming decoding it is not fast enough? I will post moonlight stats as soon as possible.

I'd like to know if there's any chance it might be solvable, because h.265 has great latency and performance, but image is sometimes very grainy even with 65MB bitrate @ 1440p 60fps.

Reproduction Steps

Streaming anything or any game using AV1 in Moonlight causes choppyness.

Expected Behavior

For it to provide a smooth image, like h.265.

Many users had reported performance issues when using AV1. So it's likely that webOS TVs in this generation are not powerful enough for smooth real time AV1 streaming. Did you try lower the bitrate when you use AV1?

First of all thank you for the prompt reply, and for your amazing work on this app.
I had tried to put the bitrate as low as it would go, yes. Any other way I could troubleshoot this?
Nevertheless I will perform a series of tests later after work to rule out any configuration in Sunshine or in the Moonlight app itself. Will also test using my iPhone which also supports AV1 decoding.

As far as I can tell, AV1 decoding performance issues are webOS TV specific. In that there's nothing we can do. BTW Did you try 1080p instead?

I have not tried 1080p, but I will.

I tried low bandwith, high bandwith, bunch of settings in Sunshine and it's the same issue that I've now seen reported by other people here. Some weird ghosting/blur that almost looks like screen tearing. It does seem that it's due to the decoding performance.
I tried with the iPhone and it works fine.

While we're here though, and I'm sorry if this is not proper form but I had some questions while testing yesterday, please let me know if I should open a new issue:

First, since 65mbps is the limit for webOS, why does SMP decoder support up to 100mbps?
Also, is there a reason why SMP has much better color accuracy and contrast than NDL? I was trying to fix the blurryness/image compression issue and I noticed that it's much less noticeable in SMP due to the "better" color quality and contrast. It has more latency and dropped frames though, but it is playable and looks much better, almost like NDL has washed out colors in comparison.

There's still alot of blurryness/image compression in both decoders in areas with lots of detail, so I'm guessing this is just Sunshine's constant bitrate just not working or something like that, I don't know honestly.

why does SMP decoder support up to 100mbps?

I suspect this is a bug. I'll check it out and fix if it has issues.

why SMP has much better color accuracy and contrast than NDL?

Fundamentally, NDL on webOS 5+ (which is what your TV has), uses SMP too. They have some differences but I don't know because it's a black box. The only thing I can say for sure is NDL will try its best to achieve low latency.

Tried 1080p@30fps AV1, still the same issue.

as far as the rest, I don’t know exactly what changed but NDL and SMP look virtually the same now with NDL having way lower latency. So both the washed out colors and compression is fixed.

What I did was: Increase the resolution to the native TV resolution (4K@120fps) increased bitrate to the Max 65000mbps, and in sunshine I’ve selected constant bitrate and all the quality settings available for AMD. I’ve also selected 2 CPU threads instead of just one, and an option to advertise support for HEVC MAIN and Main10 (HDR). This all with a local connection works brilliantly (Host LAN to Client Access Point-WiFi), although I have not tried outside connections.

So AV1 absolutely does not work with current 4K LG TV’s (should probably disable or put a warning but that’s up to you) and besides that the app is working amazing for now.

again, I really want to thank you for your support and all your work, and you can close this issue if you’d like.

I think using constant max bitrate would be bad for performance on the TV. I'd suggest using VBR and make sure it's not over 45mbps for current generations. And yes, prefer HEVC instead of AV1.

Although AV1 is marked as experimental, I'll probably add an extra explanation of why it's not always suggested.