LE11 4k playback on RPi 4 via DLNA

  • Hi all,

    I'm new to LibreElec and Kodi. Managed to install 11.0 into a Raspberry Pi 4 model B and do some experiment with it. Mainly I want to use it as a streaming device opposed to play local media. I have a Jellyfin instance in LAN which would be the media source.

    After configuring MiniDLNA and Upnp on LibreElec, I'm able to stream SD content from LAN successfully. Though when it comes to 4k video, it fails to playback properly. Scenarios I've tried so far:

    1. [fail] I initiate the playback from the Jellyfin web client and select LibreElec as device to stream to. With the default configuration I can see the first few frames, but then playback freezes. After about 30-60 seconds I see a system notification saying "Source Too Slow For Continuous Playback". I checked the CPU usage via top command on both ends, but it was 90% idle all the time.
    2. [fail] I installed the JellyCon plugin on LibreElec and started the playback from within the plugin. Same as before (when streaming is started from Jellyfin web client).
    3. [fail] If I set hdmi_enable_4kp60=1 option, I only get a blank screen after pressing play. Furthermore wifi disconnects (First I thought it must be due to low power supply and switched to a 3A USB adapter as recommended, but no improvement).
    4. [success] I copied the sample mkv file of the same movie to the microsd card. When I play it from there, the playback is smooth as expected (so it's not that the HDMI cable or RPi4 not capable of sending data properly to the TV).

    Here is a debug log for scenario 1: http://ix.io/4qg7

    Also attached the output of ffprobe showing the exact video/audio codecs involved.

    If anyone managed to get a streaming setup like this working, please let me know how you did it.

    Or if someone could help me debug this further, that would be great.

  • Source too slow means a lack of bandwidth in the network or the NAS/Server device hosting files being unable to stream the file fast enough. I see this occasionally with very large ISO rips that I've made (70-80GB size) but it clears after 5-10 seconds. It can also show up if the server is trying to transcode content on the fly and not quite keeping up .. which I occasionally see when using Plex as the back-end server (with the Plex client add-on in Kodi).

    The "hdmi_enable_4kp60" option is rarely needed and causes much higher current draw on the PSU and will need an HDMI cable certified for 4K60. Cheap(er) cables will often give blank screens. Under-spec PSUs can do the same. Practically all media is [email protected] or 4K30, only GoPro files and content people have deliberately encoded in 4K60 requires it. Most users do not need it (which is why it's forced as a default).

    I don't use DLNA and have never used Jellyfin, but I occasionally use Plex and it works fine. If you are using WiFi .. that's probably the cause of all playback issues. Connect a cable and test again. WiFi is rubbish for streaming media and that's a near-universal rule and nothing specific to RPi4, although RPi4 having no external antenna and being often installed in a nice shiny metal case doesn't help.