Tip: mount Jellyfin transcode directory to hard drive!

3 years ago by Dataprolet to c/selfhosted

I noticed my home servers SSD running out of space and it ended up being my Jellyfin Docker container which wasn't clearing the directory for transcodes in /var/lib/jellyfin/transcodes correctly.

I simply created a new directory on my media hard drive and bind mounted the above mentioned directory to it. Now Jellyfin got over 1 TB of free space to theoretically clutter. To prevent this I simply created a cronjob to delete old files in case Jellyfin isn't.

@daily /usr/bin/find /path/to/transcodes -mtime +1 -delete

Easy!

Novi 36 points 3 years ago

I transcode to ramdisk.

path: 0 8279172, hotness: undefined, score: 36, children: 11
LunchEnjoyer 3 points 3 years ago

How is this done? If you don't mind sharing 🤗

path: 0 8279172 8287308, hotness: undefined, score: 3, children: 2
Novi 5 points 3 years ago

tmpfs is the filesystem you are looking for. You can mount it like any other filesystem in /etc/fstab.

tmpfs /path/to/transcode/dir tmpfs defaults 0 0

path: 0 8279172 8287308 8292274, hotness: undefined, score: 5, children: 0
Shadow 4 points 3 years ago

Can just point it to /dev/shm as a transcoding folder, for a quick and dirty way.

Otherwise you'd mount a tmpfs disk.

path: 0 8279172 8287308 8292075, hotness: undefined, score: 4, children: 0
dataprolet 2 points 3 years ago

I have like a dozen people using my Jellyfin and sometimes 3-4 people watch something at the same time which results in a lot of transcoding data. At the moment my transcoding directory (which is cleaned every 24 hours) is almost 8 GB big. I don't have the RAM to do this.

path: 0 8279172 8306329, hotness: undefined, score: 2, children: 4
domi 9 points 3 years ago

Starting with 10.9 you can enable segment deletion so files are cleaned up while still transcoding.

path: 0 8279172 8306329 8311142, hotness: undefined, score: 9, children: 3
passepartout 3 points 3 years ago

Im so looking forward to this. When i tried to use tmpfs / ramdisk, the transcoding would simply stop because there was no space left.

path: 0 8279172 8306329 8311142 8316671, hotness: undefined, score: 3, children: 0
dataprolet 0 points 3 years ago

Version 10.9 is not even released, right?

path: 0 8279172 8306329 8311142 8318485, hotness: undefined, score: 0, children: 1
domi 3 points 3 years ago

Nope, release target is mid-April currently.

path: 0 8279172 8306329 8311142 8318485 8319071, hotness: undefined, score: 3, children: 0
agent_flounder 1 point 3 years ago

I will have to try that once my ram upgrade gets here.

path: 0 8279172 8282341, hotness: undefined, score: 1, children: 2
Novi 3 points 3 years ago

You can restrict the size of the ramdisk so you do not end up killing processes. A large amount of ram is not mandatory.

path: 0 8279172 8282341 8292371, hotness: undefined, score: 3, children: 1
agent_flounder 1 point 3 years ago

Good to know. Well I have 16G now that should give me plenty to spare.

path: 0 8279172 8282341 8292371 8315280, hotness: undefined, score: 1, children: 0
entropicdrift 23 points 3 years ago

Personally I have a secondary external SSD I use for my cache and transcode directories so that my transcodes aren't throttled by being read from and written to the same disk.

Also of note is that Jellyfin does have a cron job built into it to clear the transcodes directory. You can see it under Dashboard -> Scheduled Tasks -> Clean Transcode Directory. I have mine set to run every 24 hours.

path: 0 8278840, hotness: undefined, score: 23, children: 1
dataprolet 2 points 3 years ago

Yeah, but the cleanup job doesn't seem to work reliably. I noticed because my home server ran out of disk space because the transcoding directory was over 30 GB in size.

path: 0 8278840 8306369, hotness: undefined, score: 2, children: 0
stuckgum 1 point 3 years ago

Why not write to ram instead?

path: 0 8281623, hotness: undefined, score: 1, children: 3
matcha_addict 2 points 3 years ago

How much RAM would this consume?

path: 0 8281623 8290887, hotness: undefined, score: 2, children: 2
ErwinLottemann 11 points 3 years ago

that does not matter you can just download more ram

path: 0 8281623 8290887 8312931, hotness: undefined, score: 11, children: 0
dataprolet 1 point 3 years ago

Every transcode could need as much disk space as the size of the file you're playing. If you have a media file that's bigger than your available RAM the transcode will propably cause problems because you will run out of RAM.

path: 0 8281623 8290887 8306416, hotness: undefined, score: 1, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
62910
6789
5408

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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

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

Questions? DM the mods!

go to feed...