[Issue]: hevc black screen and av1 laggy Mi Box S 3rd
Describe the bug
Hi i recently got the new mi box s 3rd gen but with the Moonlight client on automatic codec or hevc i only get a black screen.
Av1 work but with micro lag even with great speed connection
H264 work
I see other one get this issue. Soc AMLOGIC S905XM5 Maybe too recent device need a update ? Thanks
Steps to reproduce
Launch the stream on automatic codex or hevc mode
Affected games
All source affected
Other Moonlight clients
PC
Moonlight adjusted settings
No
Moonlight adjusted settings (please complete the following information)
Normal settings
Moonlight default settings
Yes
Gamepad-related connection issue
Yes
Gamepad-related input issue
Yes
Gamepad-related streaming issue
Yes
Android version
14
Device model
Mi box s 3rd gen
Server PC OS version
Windows 11 24h2
Server PC GeForce Experience version
3.28.0.417
Server PC Nvidia GPU driver version
576.52
Server PC antivirus and firewall software
Windows Defender
Screenshots
No response
Relevant log output
Additional context
No response
I am having the same issue on the newly released Onn 4k Plus which uses the same SOC (Amlogic S905X5M)
I have an RTX 3080ti and am unable to test AV1, but H264 works fine (albeit with more latency and without HDR support), but HEVC is entirely unusable.
The decoder being used is c2.amlogic.hevc.decoder which should be able to handle 4k60 streams just fine, but instead we are left with either black screens or horrible latency with about one frame per second of any sort of motion.
Below is an image of what Moonlight reports in it's debugging.
I have the same issues with my 3rd gen Mi Box, AV1 and HEVC are completely unusable, I only get a few frames per second. H264 works but it's a bit laggy with like 50ms of response time between button press and visual response. I've been trying to use moonlight with sunshine on host PC at 1080@60fps setup, with wifi 6, Ethernet and a 2070rtx on my PC.
On my 3rd gen mi box and AMD 9070xt, only 264 encoding seems to work, I don't notice any lag on this codec compared to the other user.
Same problem with x88pro x5m with amlogic s905x5m
Hevc black screen or 1fps, and av1 black screen or 2fps. H264 smooth.
Same issue with Xiaomi TV Box 3rd gen on HEVC... eventually picture appears but is frozen. Cannot move mouse. Can't confirm about AV1 because 3080. On h264, it works but not optimal.
I think i will return the box. Anyone can suggest a better soc ?
Same problem here
Just to add to the list. Onn 4k Plus, 400 mbps Wi-Fi connection. HEVC is unplayable. h264 works at 1080 and 1440 but not at all at 4K, won't even connect.
On the same network, an old FireStick 4K works perfectly from the same host using HEVC.
Hoping this is something that can be fixed on the moonlight side
Hello, Same issue there with the xiaomi tv box 3gen If someone found something it's would be helpful Also with h.264 i got a lot of pixels and its note very good if you have some tips for that thanks
Hello, I am experiencing the same issue here. I bought the Xiaomi TV Box S 3rd Gen a few days ago and in AV1 the rendered frames are lower than those received, that is, streaming is constant at 60 frames (over Wi-Fi 6, RTX 4080), but in the rendered frames it is between 50-54 fps, which causes microstuttering and it is annoying not to be able to see the image smoothly.
If I switch to H265 or HEVC, I get a black screen and the TV box freezes.
When I switch to H264, it doesn't support 4K resolution, otherwise it won't connect, so I have to leave it at 1440p or less.
Note that the parameters indicated in AV1 are: Lost frames: 0% Average latency: less than 15 Decoding time: 6-8 ms
Is this a TV box error? Or a Moonlight/Artemis error?
I don’t know on which side the problem was, but since I saw I wasn’t going to be able to fix it, I sent the box back. I bought a Thomson 270 instead and I don’t have any issues… It’s not the same SoC (S905X4), and that’s exactly what I wanted to avoid running into the problem again.
Hello, I have some unfortunate news. I was debugging my Xiaomi TV Box S 3rd Gen Amlogic S905X5m with ADB to test for failure cases:
-
H.264 crashes when you select 4K resolution at 60fps Results: debugging shows that it is only possible to use the h.264 codec in 4k if it is below approximately 34 fps. It is possible that they will have to make a change in the kernel or an OS update to fix it. For now, it is only possible at 30fps. With the other resolutions, there are no problems, except that a higher bitrate is needed for better quality, which, if increased, becomes saturated and starts to have rendering problems.
-
h.265 hevc crash: it was impossible to get it to work. The only thing I managed to do was get an image, but it always freezes. I think this is because the codec is blocked or limited in the hardware.
-
AV1: several optimization settings were missing for it to work better on the Amlogic S905X5m and without so much microstuttering, getting very close to stable 60fps, which was fixed after a few adjustments. The problem I see here is that you can only achieve decent stability in 4k 60hz if you lower the bitrate a lot, which reduces quality and ultimately isn't very pleasant.
I've read in some places that Steam Link works well, which I haven't had time to test. If I get around to testing it, I'll leave comments to compare.
Summary: wait for an update to be released or go for another client option.
Hello again, i have good news, after extensive testing, I've achieved smooth 4K 60FPS AV1 streaming on the Xiaomi TV Box S 3rd Gen (Amlogic S905X5) using a custom build of Moonlight Android (Artemis project), install the version v20.3.0-experimental.x release. This works over a standard 5GHz WiFi connection (TP-Link Archer C6, non-WiFi 6).
⚙️ Configuration That Works
PC Setup
- GPU: RTX 4080 -> rtx 40 I think it is necessary for AV1 encoding
- CPU: Ryzen 7 7700X
- RAM: 32GB
- Streaming Software: Latest Apollo version
- Settings:
- Virtual screen enabled
- No FPS cap
- VSync disabled
- No RTSS frame capping
Moonlight Client for Android TV (Custom Build)
- using the v20.3.0-experimental.x release from Artemis fork
Stream Settings:
- Resolution: 4K (3840x2160)
- FPS: 60
- Bitrate: 80 Mbps
- Codec: AV1
- Frame Pacing: Balanced
- HDR: Enabled
🔍 Important Notes
- WiFi Network: Works reliably on 5GHz WiFi (tested with TP-Link Archer C6)
- Compatibility: Likely works with other Amlogic S905X5 devices like the Onn 4K Pro
- Performance: The Amlogic hardware decoder handles 4K AV1 at 60FPS with very low latency
IMPORTANT EDIT: Enable the LFR and Tight Vsync options, otherwise the fps will not synchronize and microstuttering will occur.
Does anyone know if this is a hardware or a firmware issue?
Can we expect an upade to fix the HEVC problem or should we switch to another device?
Moonlight Client for Android TV (Custom Build)
- using the v20.3.0-experimental.x release from Artemis fork
Stream Settings:
- Resolution: 4K (3840x2160)
- FPS: 60
- Bitrate: 80 Mbps
- Codec: AV1
- Frame Pacing: Balanced
- HDR: Enabled
🔍 Important Notes
- WiFi Network: Works reliably on 5GHz WiFi (tested with TP-Link Archer C6)
- Compatibility: Likely works with other Amlogic S905X5 devices like the Onn 4K Pro
- Performance: The Amlogic hardware decoder handles 4K AV1 at 60FPS with very low latency
IMPORTANT EDIT: Enable the LFR and Tight Vsync options, otherwise the fps will not synchronize and microstuttering will occur.
I guess my 3060 can Decode AV1 but not encode. Even though, where to find this LFR and Vsync option in Moonlight app? Tried to download artemis variants, but noone seems to install on mibox, it says the app is not compatible.
I've been trying thousands of configurations with my Mi Box S 3rd gen for several days to get smooth streaming.
My conclusions:
- h265 works at 4k 30fps, there is a block up to approximately 34fps, if it is higher than that, the connection fails.
- There is no way to make h265 work. I was debugging with adb and couldn't see the error. It always gives a black screen and the image freezes. We have to wait for an update.
- AV1 4K 60fps works well but with a specific version: https://github.com/qiin2333/moonlight-android/releases. Use the latest version; it has given me the best results.
The Moonlight settings on Xiaomi would be:
- Frame pacing set to balanced
- 80mbps bitrate
Important: use Apollo Fork Streaming.
- Limit the speed of captured frames -> disabled
- No RTSS or vsync, free fps, hopefully your PC runs games at over 60fps
- Always use virtual monitor settings (physical monitors must be turned on; strangely, I get an error if they are turned off)
- Use frame generation whenever possible. You may want to try Lossless Scaling (I haven't tested that yet)
Requires a graphics card that can do AV1 encoding
The only other option I see is to play at 1440p at 60fps in h264 for those who don't have the option to play in AV1.
Perhaps see if your TV has any possibility of improving image scaling. Xiaomi TV Box has scaling, but I prefer to disable it so that it doesn't overload (it has happened to me that it restarts on its own).
I've been trying thousands of configurations with my Mi Box S 3rd gen for several days to get smooth streaming.
My conclusions:
- h265 works at 4k 30fps, there is a block up to approximately 34fps, if it is higher than that, the connection fails.
- There is no way to make h265 work. I was debugging with adb and couldn't see the error. It always gives a black screen and the image freezes. We have to wait for an update.
- AV1 4K 60fps works well but with a specific version: https://github.com/qiin2333/moonlight-android/releases. Use the latest version; it has given me the best results.
The Moonlight settings on Xiaomi would be:
- Frame pacing set to balanced
- 80mbps bitrate
Important: use Apollo Fork Streaming.
- Limit the speed of captured frames -> disabled
- No RTSS or vsync, free fps, hopefully your PC runs games at over 60fps
- Always use virtual monitor settings (physical monitors must be turned on; strangely, I get an error if they are turned off)
- Use frame generation whenever possible. You may want to try Lossless Scaling (I haven't tested that yet)
Requires a graphics card that can do AV1 encoding
The only other option I see is to play at 1440p at 60fps in h264 for those who don't have the option to play in AV1.
Perhaps see if your TV has any possibility of improving image scaling. Xiaomi TV Box has scaling, but I prefer to disable it so that it doesn't overload (it has happened to me that it restarts on its own).
Thanks for the tips. How can I add games to the virtual desktop? No icons are being shown... trying to find this info H265 does not appear for me for some reason
Same issue here with my Onn4k box. Reddit has others in the same boat. Haven't done extensive testing as others in this thread, thank you PacificSilent! My only fix is disabling AV1 and HEVC and running h264. Hopefully this isn’t a hardware issue and can be fixed via software. Commenting to keep this issue alive so it can one day be fixed!
Hello everyone, I finally settled on Artemis. I managed to get it working really well and smoothly. If my settings have changed since the last time I reported this, I'll tell you what settings I used on my PC for the Xiaomi S 3rd gen
VERY IMPORTANT NOTE: on AMD or NVIDIA, cap the fps at 60fps and not through Rivatuner, as the latter does not synchronize at 16.6ms per frame, which causes juddering. I also noticed a problem with the Android TV box that, strangely, if we keep the statistics overlay running on top of the video, it forces the device's GPU to synchronize the frames. It's very strange. I left a pull request creating a smaller overlay and leaving an option to render something “invisible” to make the Android TV box believe that it's not just video but also has to render something over the video, which gave me good results.
If I have more updates, I will continue to report them in this issue.
Apollo Config: https://imgur.com/gallery/apollo-config-artemis-4k-60fps-av1-xiaomi-tv-box-s-3rd-gen-over-wifi-6-Tje7ek5
Artemis Config:
- 4k 60fps AV1
- frame pacing balance with limited fps
- bitrate 100-80mbps, but in apollo i set the max bitrate
I hope this helps. So far, I haven't needed to configure anything else because it works perfectly for me. You can continue exploring options and post them here if something else works for you.
Same issue here with my Onn4k box. Reddit has others in the same boat. Haven't done extensive testing as others in this thread, thank you PacificSilent! My only fix is disabling AV1 and HEVC and running h264. Hopefully this isn’t a hardware issue and can be fixed via software. Commenting to keep this issue alive so it can one day be fixed!
I also have the same issue on Onn 4K Pro. Hoping this gets resolved soon. Other services have no problem decoding HEVC/AV1 on this box.
Same issue with my Xiaomi Tv Stick 4k 2nd Gen (SoC Amlogic S905X5M), and my RX Vega 56 8gb (polaris) can't encode AV1, so i'm stuck at 1980x1080@60hz H.264
I too have the box model MiTV-AFMU0 and I just updated it's software. The issue I have is with casting I cast from my laptop. VP9 is good. AV1 shows black video, not related to moonlight, just putting information out there.
If it helps here are the params.
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,profile,level,bits_per_raw_sample,color_primaries,color_transfer,color_space -of default=noprint_wrappers=1:nokey=1 video.webm
av1
Main
8
unknown
unknown
unknown
N/A
The issue is possibly with Mi Box casting, even thoug it advertises AV1 support. not sure how that goes along with casting. Useless purchase for me.