Noise / artefacts when playing back 4K HEVC video on RPi4 + LE 9.2.1 (no problems on LE 9.2.0)

  • Hello,

    I am experiencing artefacts and noise when playing back a range of different HEVC 4K videos. I've been unable to identify what makes one video faulty, while another one is fine.

    This only occurs on LibreELEC 9.2.1. When running on LibreELEC 9.2.0 it's fine.

    I'm using the Plex addon. The client (RPi4 on LE) is configured to 'direct play' and is marked as 'HEVC' and '4K' capable. The Plex server confirms it's direct playing to the client when I playback.

    Sample 10sec clip that exhibits the problem (link should remain valid until May 28th): sample

    Some pictures of the issue (taken while playing the sample clip from above) can also be seen at: Imgur: The magic of the Internet

    Hope this helps to narrow down what's going on, and thanks for all your works.


    EDIT: Resolution has been found! Huge thanks to HiassofT and the RPi devs.

    Edited 2 times, last by rpistutters: RPi devs have released a fix (May 25, 2020 at 2:18 PM).

  • Hi, i have exact same problem as above poster on RPI4 LibreELEC 9.2.1.

    I get a white line above with white snowy artifacts coming down from the top, same as images from above poster.

    Its happens when i use the plex addon or just kodi.

    It fixes the issue when i uncheck 4K capable and leave the others checked such as HEVC and direct play etc.

    I'm guessing unchecking 4K reduces quality to 1080p though.

    Thanks.

  • I know this will not help debug the issue, however I am having the same issue with version LibreELEC 9.2.1.

    I've just purchased a Raspberry Pi 4B with 4GB RAM to replace my Intel Celeron NUC (to save Plex from having to transcode). I utilise Plex Kodi Connect Add-On to access my media library via the Kodi interface. The Add-On is using the default settings (i.e. Direct Play no transcode etc). I have checked on Plex dashboard to confirm that the client is in fact Direct Play'ing the video.

    Installed LibreELEC from the Pi imager application and the install tested fine with the following video:

    HEVC (3840x2160) (02:41:10) MLP FBA

    I then got the upgrade notice and dutifully upgraded to 9.2.1. The same video now tears and or is choppy / pixelated etc (not sure the best way to describe it). I have tried it with two other videos that exhibit the same problem:

    HEVC (3840x1604) (02:28:26) E-AC-3

    HEVC (3840x2160) (02:42:13) TrueHD

    Downgrading back to 9.2.0 sends me back to playback heaven.

  • I have this same issue playing x265 1080p 8-10bit content.

    if I drop the res of my 1080p files by half it disappears.

    if I change the codec from x265 to x264 it also fixes the problem.

    I have only seen the problem with NTSC. but have 4k NTSC that work fine...

    I have a pal 1080p 10bit video with much higher bitrates which does not suffer the same artifacts.

  • Thanks for reporting, I could reproduce the artefact issue with the sample file and narrow it down when that started. I've forwarded the info to the RPi devs (it's an RPi firmware issue) who'll look into it.

    so long,

    Hias

  • Thanks for reporting, I could reproduce the artefact issue with the sample file and narrow it down when that started. I've forwarded the info to the RPi devs (it's an RPi firmware issue) who'll look into it.

    so long,

    Hias

    Thanks for posting.

    Would you mind elaborating on the problem with the Rpi firmware and why the firmware would cause the behaviour in 9.2.1 of LE and not 9.2.0. What changed between versions?


    I assume the Rpi dev will get back to you direct. Would you confirm that when that occurs you will update this post?


    Until then, I guess those of us that require playback of such impacted video are stuck on 9.2.0. Surprised this was missed in testing.

  • Current theory is that the vc_image change to add 16 lines in the Jan 30 firmware is causing the issue. With the firmware before that (Jan 22) the video is rendered without artefacts.

    I regularly test with a couple of HEVC videos and all these played fine on 9.2.1 and also current 9.2 development versions with latest firmware/kernel. Could be that the issue is triggered by some video properties (10bit vs 8bit / height etc) so these things can easily be missed.

    One problem with the RPi video dirvers used in LE9.2 is that too many things are handled in the closed-source RPi firmware so only the RPi devs can really debug these things. As that's not ideal the current development effort is to move away from that to a fully open source video driver where everything is handled in the linux kernel. It's not finished yet but already working quite good and current LE10 test builds with it also don't have the artefact issue.

    I'll report back when we get something to test from the RPi devs, until then just keep using LE 9.2.0.

    so long,

    Hias

  • Good news, RPi devs found the issue and fixed it in the latest firmware. I've just confirmed that the sample plays without artefacts with it.

    Please switch to LE 9.2.1 again and run these commands to update to the latest firmware:

    Code
    mount -o remount,rw /flash
    wget -O /flash/start.elf https://github.com/raspberrypi/firmware/raw/a6c9b6b/boot/start4x.elf
    wget -O /flash/fixup.dat https://github.com/raspberrypi/firmware/raw/a6c9b6b/boot/fixup4x.dat 

    After rebooting the firmware version should be May 22 2020:

    Code
    xbmc:~ # vcgencmd version
    May 22 2020 21:12:25 
    Copyright (c) 2012 Broadcom
    version 4da3e1264076308eda90652cb98b553ae0586390 (clean) (release) (start_x)

    Please also check with your other problematic files that showed artefacts if they are fine, too.

    so long,

    Hias

  • You have to do that on the system booting and running LE not on separate install because old boot: files fixup.dat and start.elf have that bug and will be replaced with good new one.

    Tested and working 110%

  • I had the exact same issue and this resolved it. Thanks for posting!

  • You have to do that on the system booting and running LE not on separate install because old boot: files fixup.dat and start.elf have that bug and will be replaced with good new one.

    Tested and working 110%

    How did you do it? I could not get it up to date from 16 april tot 22 may

  • HiassofT

    1) Just curious, whenever LibreElec dev push new update for Kodi 18.7, the code you mention no longer needed?


    Now, I'm on 9.2.2 so I don't feel like downgrading. Is 9.2.2 work with the code you mentioned? I have RPi4 4gb

    Tried on 9.2.2 and it works.

    Quote

    May 22 2020 21:12:25

    Copyright (c) 2012 Broadcom

    version 4da3e1264076308eda90652cb98b553ae0586390 (clean) (release) (start_x)

    Thanks.

    Edited 2 times, last by cat2115 (May 25, 2020 at 4:31 PM).

  • Yes, 9.2.3 will contain the fixed firmware and the manual steps I posted are no longer needed.

    The changes aren't in our repo yet, we are currently working on it.

    so long,

    Hias