I installed LibreELEC on a Raspberry Pi 4 yesterday and it’s working really well, except for AV1 playback. The thing is, it’s almost fast enough but the video stutters every few seconds and is a little slower than it should be. Is there a way to make it faster, by switching the decoder or enabling multi-core decode or something like that?

I found this decoder which might be what I’m searching for but I don’t know how to make it work in LibreELEC.

    • Fisch@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I tested it again and it actually works sometimes and then sometimes it gets slow again. When it gets slow, CPU usage is at around 330%-380% in top for Kodi. That’s the maximum, I think, since it has 4 cores.

      The Pi is already overclocked but overclocking it further is probably my only option. I don’t have active cooling so I’m not sure if that would be a good idea.

        • Fisch@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          1 year ago

          It’s the usage of all 4 cores added together, so the maximum is 400%

          • 0x4E4F@infosec.pub
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            1 year ago

            Oh, makes sense now 😂.

            Wow, that is a lot. All 4 cores are at almost max… and not even passive cooling… that can be a problem.

            Hm, have you tried compiling it natively? Like for best optmization. Maybe add some hardware switches to make/cmake/whatever-it-uses-for-building?

            • Fisch@lemmy.mlOP
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              I’ll probably buy the Flirc case so it has some passive cooling. Temperatures are fine tho, it’s at around 82-83°C.

              Does compiling natively with extra optimizations make a noticable difference? Might try that.

              • 0x4E4F@infosec.pub
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                Temperatures are fine tho, it’s at around 82-83°C.

                +80C is just asking for trouble if you ask me… I wouldn’t be comfortable with anything above 70C.

                But, than again, I don’t own a Pi, so I wouldn’t know. Maybe working in the middle of the second half of the 100C mark is normal for a Pi 🤷.

                Does compiling natively with extra optimizations make a noticable difference?

                In some cases, yes. Codecs are known to greatly increase performace if adequate CPU optimizations are used. Don’t know what ARM uses, but AVX, AVX2, SSE3, etc. on Intel CPUs does significantly increase performance in codecs. It’s mostly noticable when encoding, but it helps decoding as well (not to the extent that it helps in encoding though, but adequate switches when building can reduce CPU usage when decoding by about 10 to 20%… which should help a lot in your case).

                But, you have to compile the software with those switches, otherwise, it won’t use the optimizations 🤷.

                If you can, also have a look at the build scripts of the AV1 binary/library, see if they used CPU specific optimizations or not. Maybe they did, maybe they didn’t 🤷.

                • Fisch@lemmy.mlOP
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 year ago

                  I want to try compiling it with those optimizations and I found this Reddit post, which explains how to do it. I’m not sure if just compiling and installing it is enough to make LibreELEC use it tho.

  • RubberElectrons@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Get active cooling as this kinda sounds like thermal throttling.

    I added a 40mm Noctua fan blowing on the heatsinks of my pi3 to get it to play h265, otherwise I’d keep having issues like what you’re describing.

    • Fisch@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      That’s probably the cheapest option. I already have it overclocked and it’s running at about 82-83°C (But at 85°C it resets to the base clock so maybe the overclock isn’t even being used). Adding active cooling might also allow me to overclock it further.