Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

Tip: mount Jellyfin transcode directory to hard drive!

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!

stuckgum ,

Why not write to ram instead?

matcha_addict ,

How much RAM would this consume?

dataprolet OP ,
@dataprolet@lemmy.dbzer0.com avatar

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.

ErwinLottemann ,

that does not matter you can just download more ram

Novi ,

I transcode to ramdisk.

agent_flounder ,
@agent_flounder@lemmy.world avatar

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

Novi ,

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

agent_flounder ,
@agent_flounder@lemmy.world avatar

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

LunchEnjoyer ,

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

Shadow , (edited )
@Shadow@lemmy.ca avatar

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

Otherwise you'd mount a tmpfs disk.

Novi ,

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

dataprolet OP ,
@dataprolet@lemmy.dbzer0.com avatar

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.

domi ,
@domi@lemmy.secnd.me avatar

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

passepartout ,

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

dataprolet OP ,
@dataprolet@lemmy.dbzer0.com avatar

Version 10.9 is not even released, right?

domi ,
@domi@lemmy.secnd.me avatar

Nope, release target is mid-April currently.

entropicdrift ,
@entropicdrift@lemmy.sdf.org avatar

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.

dataprolet OP ,
@dataprolet@lemmy.dbzer0.com avatar

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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • selfhosted@lemmy.world
  • incremental_games
  • meta
  • All magazines