this post was submitted on 12 Aug 2024
46 points (81.9% liked)

Selfhosted

38707 readers
677 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

The toddler loves having Kodi full of all their faves but I haven’t been able to iron out all the buffering I’m getting streaming from my mini-pc NFS mounted shares to the pi4 libreelec hooked up via Ethernet in the living room. Everything is wired, so I wouldn’t think that would be an issue but here I am about to put down a couple hundred dollars for a Synology router that looks like the monolith from 2001. Is this going to do the trick, you think? Is there another router recommended to keep a distributed little homelab (any 10tb spread between various usb hdd, raspberry pi’s and mini PCs all hosting a variety of containers and services) running smoothly? Budget I’m hoping to keep under 300 and lower the better but happy toddler and buttery smooth streaming over lan is the priority.

top 37 comments
sorted by: hot top controversial new old
[–] [email protected] 35 points 1 month ago (2 children)

I'm not sure about how this works in kodi but in jellyfin the client might request a different resolution which causes the server to try and reencode the provided file on the fly. In my case my server isn't fast enough for this which leads to constant buffering

[–] [email protected] 10 points 1 month ago (2 children)

Likely, This is it. It transcodes and hence it has to buffer because the server isn't strong enough. Best is to use a gpu like intel a380 as described in jellyfin's doc.

[–] [email protected] 6 points 1 month ago (2 children)

No no transcoding happening on kodi, it’s just playing it straight over the lan. That said I do have jellyfin set up on a machine that can handle transcoding for a number of clients. I gave considered switching to Kodi +Jellyfin and seeing if that’s better.

[–] [email protected] 8 points 1 month ago* (last edited 1 month ago)

Installing the Jellyfin add on into kodi takes a few minutes. Nothing much to consider, just try it and see if that changes anything.

I have a similar setup (rpi with OSMC, media hosted on file server) and prefer using Jellyfin as the source for all clients, as it keeps track of watched status across everything. It's not perfect, but better than without Jellyfin.

[–] [email protected] 2 points 1 month ago

I havent used kodi in a long time, since swapping to jellyfin. I personally found kodi would always buffer sometimes, far more than it should ever need to. With jellyfin, same server, no buffer

[–] [email protected] 3 points 1 month ago

There's no backend server to do the transcoding in this case. Kodi can access raw NFS/SMB file shares the same as accessing local storage, so it's just reading the file over the network, the same as if you were playing it in VLC on your PC.

[–] [email protected] 7 points 1 month ago

Kodi doesn't do any transcoding. It just mounts the NFS share and plays the file.

[–] [email protected] 20 points 1 month ago (1 children)

Before you buy anything, put some of the same content that buffers on a USB stick or powered drive and play it directly from the pi4. Also connect via ethernet to your router from another PC and check your dl speed from the NFS share.

[–] [email protected] 10 points 1 month ago (1 children)

Oh brilliant. Thanks. Yes. This only tends to happen on larger files, 5gb mkvs or multi audio track deals etc. I was also concerned it’s just a pi4 bottleneck, but that’s fixable too with more hardware. Just need to figure out what to get.

[–] [email protected] 2 points 1 month ago* (last edited 1 month ago) (1 children)

I'd lean towards the pi being the problem, but you can test the network throughput with iperf, and would want to test the videos outside of Kodi on the pi, so you could also check top and see what the processing looks like.

If I remember my pi 4 hardware decoding specs correctly, I believe h.264, MPEG 2, and VC1, and some support for HEVC. If I had to guess, you may have some codecs that aren't handled by hardware acceleration, and instead just CPU.

My best rec would be to use either a dedicated stream box (like a fire stick, Nvidia shield, etc) which has better codec support, or pick up like a little Intel n100 based system, which will handle a drastically wider set of codecs with full acceleration support.

Right now I've got a Roku and a Google TV Chromecast, and I've been trying with various environments on an old Lenovo m910q so I can find my favorite fit of UI/distro. The Roku and Chromecast never stutter, and I don't do transcoding for inside the home. Works with 4K HDR HEVC no problem.

Edit: Autocorrect annoyances.

[–] [email protected] 2 points 1 month ago

Thanks, really appreciate the thoughtful response. I have an intel n100 NUC actually on the network. It used to be the jellyfin machine but has shifted to other duties. I probably should have tried to throw that in and reconfigure things but I just went with the OSMC Vero box which should tick all the necessary hardware boxes to at least free that from being the problem. Bonus: I get to add the pi4 back to the homelab stack.

[–] [email protected] 11 points 1 month ago (2 children)

Leave Kodi behind in 2010 and switch over to Jellyfin for better results.

[–] [email protected] 3 points 1 month ago (1 children)

FWIW I have jellyfin as well already, it’s also on the machine serving the nfs shares. I would expect streaming over lan to always be a lighter load then sending a transcoding request through the internet and back to the machine four feet away, but I could be wrong. I am always curious though what people are using as jellyfin clients for their TVs. How are you actually getting jellyfin into your living room? I had hoped to use a dedicated pi4, and I’ve already gone down the route of trying to boot to a light desktop with an auto loading chrome kiosk window to my jellyfin server, but those results were less than ideal too.

[–] [email protected] 3 points 1 month ago

There are dedicated Jellyfin clients but I mainly just use the web client that is part of the server 90% of the time.

[–] [email protected] 2 points 1 month ago* (last edited 1 month ago)

EASY KILLER

I DON'T SEE ANY JELLYFIN DISTROS

"JUST ENOUGH OS FOR JELLYFIN?" no

Though jellyfin/emby as the back end works really well

Kodi/LibreELEC is awesome for all the different stuff you can add in

EDIT for typos

[–] [email protected] 10 points 1 month ago (1 children)

I gave up on kodi. Jellyfin works better, presumably because it transcodes better.

[–] [email protected] 2 points 1 month ago

Haven't used Kodi but am running Jellyfin via the official docker image on a Raspberry Pi 4. Even there transcoding works reasonably well for one user at a time, admittedly didn't try with several users at the same time so far.

Just mentioning the docker image because I used to install it without docker directly via the repository and I never got transcoding to work on the same hardware.

[–] [email protected] 10 points 1 month ago

can you run something like iperf3 or openspeedtest between the server and client to prove its a network throughput issue?

do you have a network switch you can add to avoid switching through your router (if it is indeed bad?)

Have you ensured you arent unknowingly using wifi at either end?

[–] [email protected] 7 points 1 month ago

What quality is the content? I have a pi4 running OSMC, kode front end and things are buttery smooth. All content is 1080p or lower as the pi can't handle 4k

Network is a 1gb switch from the mini pc running NFS and homeplugs to get the network from a bedroom to the living room.

[–] [email protected] 5 points 1 month ago* (last edited 1 month ago) (3 children)

To me it looks like you don't have enough power, either on the Pi4 side to decode, or the mini-pc to encode.

[–] [email protected] 8 points 1 month ago

Appreciate the solicited technical advice, less so the unsolicited parenting advice, thanks! You’ll be shocked to hear that hyperbole exists, I’m sure. I’m just trying to watch the Aristocats with the kiddo without them wondering why the screen stops mid song, stranger.

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago) (1 children)

There are very few things more obnoxious than an asshole with unsolicited parenting advice

[–] [email protected] -1 points 1 month ago (1 children)
[–] [email protected] 5 points 1 month ago (1 children)

Removed the parental advice part. I didn't want to be an asshole, believe me.

[–] [email protected] 2 points 1 month ago
[–] [email protected] -3 points 1 month ago* (last edited 1 month ago)

ADHD diagnostic in 3, 2, 1..

[–] [email protected] 5 points 1 month ago (1 children)

Do you experience buffering if you watch on a pc / laptop on VLC via network? This will tell you if it’s network speed related or hardware power related. I would assume the pi is not quite powerful enough. I am using a device called a Vero 4k+ and it works wonderfully. But my network setup sounds similar to yours, I just have an smb share on my pc and I added it as a source in kodi.

[–] [email protected] 4 points 1 month ago

I don’t, super helpful. So I’m guessing this is a pi bottleneck. Just ordered the Vera V so we’ll see! Fingers crossed for happy toddler.

[–] [email protected] 3 points 1 month ago* (last edited 1 month ago) (1 children)

Kodi on my 2015 Nvidia Shield doesn't stutter for me playing back 30GB+ 4k files on a 1Gb network from an ancient (2012) AMD Athlon TrueNAS box. It could be network related, but you can test this from another machine (laptop, desktop, etc) or by using local playback on the pi. I have cheap network hardware, and have never needed better. All this is to say Kodi mounting NFS shouldn't need much bandwidth or high end gear. Perhaps the issue is on the playback side. Good luck!

Edit: ~~and~~ an

[–] [email protected] 4 points 1 month ago

Thanks! Super helpful data point. I don’t have the same buffering issues streaming the same video to my desktop over nfs, so I’m leaning towards it being a pi4 bottleneck. Just plopped down for a Vera V so fingers crossed that’s the issue.

[–] [email protected] 1 points 1 month ago

The Pi4 USB controller and network adapter share bandwidth. Do you have any devices on the USB port that could be causing collisions? I really can’t think of anything in that kind of scenario that would cause that sort of issue unless somehow you were using USB for video out…

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
NFS Network File System, a Unix-based file-sharing protocol known for performance and efficiency
NUC Next Unit of Computing brand of Intel small computers
SMB Server Message Block protocol for file and printer sharing; Windows-native

3 acronyms in this thread; the most compressed thread commented on today has 11 acronyms.

[Thread #918 for this sub, first seen 12th Aug 2024, 12:35] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] -1 points 1 month ago

In my living room, buffering happens when the connection is only WiFi, but you are on ethernet already (which solves that for me).

pi4 libreelec

Have you considered getting one of these small Chinese "Android TV" boxes?