Raspberry 4B + rclone w/GDrive video glitches (green pixels at bottom) each 5 mins

  • Hi guys

    I have this issue:

    This is my setup:

    Raspberry Pi 4 B with 5v 3.5a power supply

    LibreElec 10.0.1

    Ethernet connection

    rclone accessing to a Google Drive

    LG OLED 65BX and Kodi at 3840 x 2160 resolution

    300MB DL Internet speed without packet loss (checked)

    Now I have some upgrades:

    -Instead of the microSD, I have SSD through a Sata USB 3.0 adapter with UASP support.

    -Fan 120m 12v (powered externally) Raspberry Pi is currently at 39º / 43º approx

    Note: All the upgrades were in order fix this issue.

    First I thought that the glitches were related to a bad microSD, but no.

    Later I thought that the glitches were due to the temp was at 73º, but no.

    I usually have this issue each 3 or 4 minutes, it's very annyoing.

    What I found:

    -Issue happens with Ethernet or Wifi, so it's not related to the Ethernet cable

    -Issue is not happening if the movie is stored in the SSD. But I don't want to download each movie from Google Drive to the SSD.

    -Issue has been happening with different versions of Kodi and LibreElec.

    -Issue is not related to the micro HDMI cable because as you can see in the second screenshot, when I pause the video, the issue is only over the movie, not the entire screen.

    -If I rewind a little the issue is not showed, it means that the "chunk" was redownloaded, I think.

    -0Issue happens with 4k, 1080p and 720p movies. Differents codecs also


    My theories:

    -This can be related to Google Drive API, but I'm not using the stream from there, I'm "downloading" chunks of the file with rclone.

    -The other theory can be related with the chunks of rclone, but issue is happening with rclone but also with Google Drive addon. I dont think that the addon use the same size of chunks.

    Do you have any idea? I have more samples if you are required.

    I made this same post in Kodi forum also.

    Thanks in advance.

  • You can try a current nightly to see if improvements fix anything. Plan B would be to re-rip from your original media.

    Sure, I can try with a nightly build.

    I think network is too slow from time to time. You're lucky, because you use SSD instead of microSD. So you can increase the video cache without killing your microSD: https://kodi.wiki/view/HOW-TO:Modify_the_video_cache

    I bought an SSD because I thought that those glitched were due to a bad microSD, but when I ran an surface test, the microSD was fine. Network is not slow, 300 MB download speed is enough, even I was monitoring that at the moment of the glitches. This should be something else.

    i pasted the logs in https://paste.kodi.tv/loxuribugo.kodi

    At 2022-01-13 03:31:12.080 T:809 I saw a movie with x265 enconde without any issues for 21:36 mins
    At 2022-01-13 03:55:13.696 T:809 to the end. I saw a documentary with h264 encode with issues multiples times

    But when I saw that documentary from SMB or directly from the SDD I had not issues. (you will not see this in the logs)

    Every time that I experienced these glitches in the logs appears:

    Custom AVIOContext makes no sense and will be ignored with AVFMT_NOFILE format

    At the end of the logs you can see that I installed ffmpeg-tools v10.0.0.117 installed and ffmpegdirect v19.0.1.1

    and so far the issue is not happening. I will let you know

  • Code
    2022-01-13 00:45:08.869 T:1137  WARNING <general>: OutputPicture - timeout waiting for buffer

    I guess this is a proof of my theory. Please try a higher video cache to guarantee a filled buffer.

  • Code
    2022-01-13 00:45:08.869 T:1137  WARNING <general>: OutputPicture - timeout waiting for buffer

    I guess this is a proof of my theory. Please try a higher video cache to guarantee a filled buffer.

    Ok. I will test it. Thanks for spent time checking the logs. ;)

    At that specific moment I was not experiencing the issues.

    I started watching the movie with issues at 2022-01-13 03:31:12.080

  • I found the "fix":

    I had to disable: "Allow hardware acceleration with DRM PRIME"

    I know that hardware can't decode all the codecs, but, is my Raspberry Pi faulty? Because I notice that this issue is very random, I mean, if I notice the issue and I rewind some seconds the issue is not visible, but in 5 minutes appears again in other part.

  • I know that hardware can't decode all the codecs, but, is my Raspberry Pi faulty? Because I notice that this issue is very random, I mean, if I notice the issue and I rewind some seconds the issue is not visible, but in 5 minutes appears again in other part.

    Do you have access to another Pi4? The usual way to provide evidence of a hardware fault is to swap the Pi over (leave sdcard, power supply, display, cables etc unswapped). If problem no longer occurs it is likely hardware. If it still occurs it is software (or located within the unswapped parts).