this post was submitted on 01 Oct 2025
91 points (100.0% liked)

Selfhosted

51895 readers
752 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 2 years ago
MODERATORS
 

This is something that has been increasingly prevalent with my server, for the longest time I could torrent, have two people watching and everything's fine, but lately, especially with specific shows, it will take upwards of a minute for a show to start.

I've looked into it and the culprit is ffmpeg most of the time, I assume this has something to do with the specific files not having transcoding "baked in" but I don't know enough to know if that's the case. Can anyone help me optimize my pipeline at all?

top 33 comments
sorted by: hot top controversial new old
[–] possiblylinux127@lemmy.zip 7 points 20 hours ago* (last edited 20 hours ago) (1 children)

Is it Intel?

If so I would use GPU acceleration

Edit: I see it is a N100. Definitely use hardware acceleration. I would also make sure that you run your media though Handbrake if it is in raw form.

[–] Chewy7324@discuss.tchncs.de -2 points 12 hours ago* (last edited 12 hours ago) (1 children)

Given they use a N100, I'd suggest redownloading instead of transcoding for time, energy and quality savings (i.e cost).

[–] possiblylinux127@lemmy.zip 1 points 11 hours ago (1 children)

Downloading from where?

You get the content from blurays typically (you surely aren't talking about piracy)

[–] Chewy7324@discuss.tchncs.de 2 points 6 hours ago* (last edited 6 hours ago) (1 children)

Given OP mentioned torrent and watching media in the same sentence I assume they didn't rip their own media, and pirated it instead.

If my assumption is wrong, I apologize.

Piracy and MoralityWhether they own a physical edition of that media I don't know. In my opinion owning a physical medium of the media is a big part in the morality discussion of piracy.

But in my juriscition I'm legally not allowed to break the encryption used for CD/DVD/Blu-ray, so I'm technically pirating even if I rip my own discs. There's obviously no way for copyright owners to find out if their discs were ripped for a private copy, but that's also (nearly) the case for Usenet/Torrent with proper precautions.

Anyway, if you read until this point, thank you!

[–] StarvingMartist@sh.itjust.works 1 points 6 hours ago* (last edited 6 hours ago)

Yes, I did, I do not apologize. Fuck big streaming. I only redownload if the size is too big however, finding the "exact" correct codec is just kind of a pain in the ass.

[–] lka1988@lemmy.dbzer0.com 1 points 14 hours ago* (last edited 14 hours ago)

Mini PCs have more than enough oomph to handle what you're doing. Almost my entire home lab runs on 7th/8th gen mini PCs, which includes Plex and Jellyfin (working on migrating everything over to JF). Plex only ever threw a fit when my wifi started getting crowded with wifi cameras and zigbee devices. I fiddled with the channels, removed one of my 2.4 SSIDs entirely, and now everything is happy again.

[–] empireOfLove2@lemmy.dbzer0.com 31 points 1 day ago* (last edited 1 day ago) (1 children)

A. Run a batch transcode with Handbrake and make all your stored files compatible with your end players.
It sounds like the more recent things you are downloading are in a codec that is not compatible with your playback devices. E.g, older torrents are frequently an H.264 stream in an MP4 container, which practically every device can play now. Many modern releases are being distributed in H.265 or AV1, as they have significant size and quality benefits, but many older devices don't support them natively. so it is forcing Jellyfin to live transcode to h.264. Find out what older titles play without any buffer or playback lag/high CPU usage and check what codec those files are in. That is what you'll need to batch encode everything over to.

B. Sounds like you are still relying on CPU transcoding which is absolute dog. What mini pc specs do you have? If it's an AMD or Intel CPU/APU then it should have hardware encode/decode included in it's integrated GPU. When using hardware transcoding the CPU load is generally minimal for 1 to 2 streams. See the Jellyfin docs on hardware acceleration here.

[–] StarvingMartist@sh.itjust.works 12 points 1 day ago* (last edited 11 hours ago) (3 children)

I've tried handbrake before, unfortunately the system DOES NOT have the horsepower to handle it, as in a batch of 30 episodes if I recall would have taken about 3 days

As for the system itself here's the spec sheet !

[–] WhyJiffie@sh.itjust.works 1 points 13 hours ago (1 children)

I just wanted to let you know in case you didn't that your screenshot includes a profile picture

[–] StarvingMartist@sh.itjust.works 1 points 11 hours ago

Fixed thanks

[–] DaGeek247@fedia.io 28 points 1 day ago

You should not be having transcode issues with anything less than four concurrent streams on that server. https://www.reddit.com/r/PleX/comments/1ae6683/intel_n100_vs_ryzen_7_1700_1st_gen_an_interesting/

It's likely that you have hardware transcoding disabled. Enable it, and these issues should go away. This forum post has good settings in jellyfin for an n100, https://forum.jellyfin.org/t-solved-correct-transcoding-settings-for-the-n100-processor

You should be able to find instructions for enabling hardware encoding in your bios by searching for it with your specific device model.

*edit

Handbrake does a bad job of explaining the difference between software encoding and hardware encoding. Or at least, it felt that way to me when I last used it. You likely were trying to software encode your videos, which, while theoretically makes the end result better quality, definitely won't be quick on an n100. You'll want to pick the option that has intel quicksync/qsv in it in order to get the most speed out of your handbrake encodes. https://www.reddit.com/r/handbrake/comments/z2m814/comment/kxu2a8x/

[–] surph_ninja@lemmy.world 3 points 1 day ago

Do you have another system you can use? Maybe with a video card on it that can help with pre-transcoding files?

This is what I ended up doing on mine. Was a big hit to my electric bill to pre-transcode the entire library (only for files that needed it), but now everything serves up in a flash. And the script runs as a nightly cron to catch any new stuff.

If you have to, maybe just dedicate the system you have here to transcode certain problematic content. Other than finding another download in a different format, I’m not sure there’s anything else you can practically do.

[–] glitching@lemmy.ml 1 points 16 hours ago (2 children)

why are you transcoding at all? it's the first thing I turn off on jellyfin (and previously plex) installs. negligible cpu usage on both server and client when directplaying content.

[–] JustEnoughDucks@feddit.nl 5 points 14 hours ago* (last edited 14 hours ago) (1 children)

So you have absolutely no devices that are a different resolution than you download? You don't direct play 4k on a 1080p screen for example.

[–] glitching@lemmy.ml 1 points 12 hours ago

I am asking the dude doing the transcoding why he's doing it. I am not waging a crusade against all dudes doing transcodings.

to answer your question, no, I don't, all media I got is 1080p and all my devices can display it.

[–] StarvingMartist@sh.itjust.works 1 points 15 hours ago (2 children)

Is that an option? It was my understanding anime stuff typically comes with several subtitles and in my case dual audio for each episode

[–] Chewy7324@discuss.tchncs.de 1 points 12 hours ago

Especially anime often use the superior .ass subtitle format, which many devices don't support. Sadly Crunchyroll is switching to .srt which has broader support, so it likely won't require burning them in the video (transcoding), which is the only positive thing (still a shame imo).

https://www.reddit.com/r/anime/comments/1nuxuzs/crunchyroll_has_downgraded_their_subtitles

[–] glitching@lemmy.ml 1 points 15 hours ago

not knowledgeable about them things but normal movies and shows with multiple audio streams and subtitles play just fine with directplay, selecting them from the client works fine, etc.

the only reasons I know of for transcoding would be if you have ancient clients that can't play e.g HEVC or something, or if you're on shitty broadband and it ain't feasible to stream 4K to a phone.

[–] rumba@lemmy.zip 10 points 1 day ago

If everything is working correctly, whether or not you transcode is basically whether or not the end device can play the file without changes.

For example, my old Roku can play a raw 4K File under H264 with no problem. But if I throw an H265 at it, it requires the server to transcode. It also has problems with AAC audio. And my server is so old that just trying to rip the 4k apart entrance to the audio is often too much for it.

So to start, make sure your client device can play the files directly. If it can't, you're going to need to handbrake it before you put it on your server.

[–] Harbinger01173430@lemmy.world -2 points 15 hours ago

How are resources everything in a mini PC?

Just upgrade the components, well, except the GPU or cpu

[–] wesker@lemmy.sdf.org 7 points 1 day ago (1 children)

Jellyfin Dashboard will tell you what's causing a streaming session to have to be transcoded. I believe it's the little info "I" circle on the session thumnail. Logs should also tell you. I'd suggest starting there and identifying the cause, in order to then find the proper prescription.

[–] StarvingMartist@sh.itjust.works 4 points 1 day ago (4 children)

It says direct playing the source file is entirely compatible with this client and is receiving the file without modifications, this is as I look over to the hanging episode

[–] Bronzie@sh.itjust.works 1 points 16 hours ago

Are you streaming to a Chromecast, by any chance? Or a older Galaxy device?
The 4k Chromecast with Google TV does not support AV1, but the 1080p version does. Jellyfin tried Direct Playing AV1 files, which obviously went poorly.

I run the same CPU in my NUC as you do, and all data is on a NAS shared with NFS. It's been absolutely bulletproof for about a year, so I'm confident you should be able to make this work.

Any other containers running at the same time?
No cooling issues?

Just asking because mine dropped massively in temp when repasted.

[–] DaGeek247@fedia.io 5 points 1 day ago

If you aren't transcoding, and the player is taking too long to cache the video before starting, you might be having some sort of storage issue. You would need to try a couple of different things to figure out what, specifically, is taking so long to send the video out.

The first thing that comes to mind is that your storage is on an SSD, and it is nearly full. An SSD that is nearly full will usually perform much much worse than it would if it had more space to work with. https://pureinfotech.com/why-solid-state-drive-ssd-performance-slows-down/

The next thing that comes to mind is that your files are stored on the same drive that jellyfin transcodes onto, and it is not using an SSD. If you have jellyfin reading from a single drive, jellyfin encoding to that same drive, and also everything else also running, you might be causing your hard drive to seek a lot in order to get everything up and running. You could test this by changing the jellyfin transcode location to a different storage device.

I've also found that page and video loading times tend to be directly affected by the storage medium's seek times. If you had jellyfin installed on the same hard drive as your videos, it will be slower than if you had installed jellyfin on a ssd separate from the drive you store your videos on. This one wouldn't likely result in minute loading times though.

[–] frongt@lemmy.zip 1 points 1 day ago

Check the log then, it'll tell you the speed. 1x speed is exactly realtime. 0.5x is unable to keep up, and playing at half speed. 2.0x is streaming at double playback speed.

Do any videos play well? What's the difference between those and others?

[–] bdonvr@thelemmy.club 1 points 1 day ago (1 children)

Check your disk access usage maybe? Like if you store things on an external drive with USB2 or something you're gonna have a bad time with multiple videos/high bitrate stuff because you're saturating the bandwidth of the connection

Disk usage is actually alright, but CPU usage hovers at a straight 100

[–] ragebutt@lemmy.dbzer0.com 4 points 1 day ago* (last edited 1 day ago) (1 children)

What is the client situation?

The easiest fix is to find a client that can direct play all of your files and take transcoding out of the equation. Ugoos am6b+ as an example but if you don’t need Dolby vision there are cheaper options that are easier to configure with native jellyfin clients (instead of coreelec/kodi). Or if you need av1. But this needs to be done per user and costs money

Alternatively what is your hardware? Do you have intel quick sync video? If so do you have hardware transcoding setup? Like if you have Jellyfin setup in a docker are you passing through the igpu to the container? And if you’ve done that have you set up the hardware transcoding in Jellyfin? What gen cpu and what kind of files?

If you have the transcoding happening on the CPU and not the iGPU (assuming you don’t have a discrete gpu in a mini pc and frankly with quick sync you don’t need one unless your cpu is ancient, save the power usage) transcoding will crawl. But if you have quick sync video it should be fine with <4-5 users

[–] StarvingMartist@sh.itjust.works 5 points 1 day ago (1 children)

So I did actually find and turn on quick sync, there's still a bit of a delay on the problem show, but it's like 30 seconds rather than a minute, weirdly though where it was saying "playing directly" earlier, it's now giving a subtitle error, it's fine since I'm not using subtitles but still was something I noticed

[–] ragebutt@lemmy.dbzer0.com 2 points 1 day ago (1 children)

Subtitles force transcoding a lot of the time depending on playback situation and media. A lot of compatibility issues there - downloaded movies often will have the PGS subs from a bluray, anime can often have ass/ssa, ibx subs, etc plus they all tend to be embedded in the media (and in anime’s case often with extra fonts and attachments).

all of these (basically anything but external srt) can interrupt direct playback depending on users Jellyfin client. Some have better sub support than others, android vs apple vs some esoteric client like webos all have their own niche weirdness. You need to search what the best option is for each users scenario. Like for my users that have apple devices checking this box in settings>playback allows direct streaming of a lot of content:

But for “the problem show” what do logs say? How is it encoded? Quick sync can’t transcode everything. The older your processor the less it can do and niche formats it definitely can’t do at all. Like unless you have a real new cpu (13th or 14th gen) it’s not doing av1 or vp9 content and that’s still getting offloaded to cpu for transcoding. And if it’s some ogg vorbis thing or whatever it won’t work. And do logs verify igpu is being utilized for transcoding/mapped correctly? It can be a bit of a pain in the ass (unless they improved the process, it’s been a while since I’ve had to do it)

[–] puck@lemmy.world 0 points 20 hours ago (1 children)

Does turning off subtitles at the settings level avoid this? Like if I turn subs off for all users will it stop it?

[–] ragebutt@lemmy.dbzer0.com 1 points 17 hours ago

Until users turn them back on

AFAIK there’s no setting to outright disable subs. Maybe there is one somewhere, or you could strip them from media, but that’s terrible because subs in is always the correct choice. What can help is running the extract subtitles plugin though that won’t help for format.

[–] paequ2@lemmy.today 2 points 1 day ago