Jellyfin Forum
Auto compress videos to AV1 in background - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Development (https://forum.jellyfin.org/f-development)
+--- Forum: Feature Requests (https://forum.jellyfin.org/f-feature-requests)
+--- Thread: Auto compress videos to AV1 in background (/t-auto-compress-videos-to-av1-in-background)



Auto compress videos to AV1 in background - Mr-Brightside - 2023-08-10

I've been searching a way to do this with my video library, as there are many videos I want to keep long-term but it's going to add up in the space I need.

So, I've been trying to find an "automated" solution that will take each h.264 and x.265 file and convert them automatically to AV1 at an appropriate ratio, replacing the original file, hopefully saving maybe more than 50% of space with the result.

My Jellyfin server is just sitting there doing not much most of the time. If it could passively compress my videos in the background, that would be perfect!

Any idea on how hard this would be to implement as a feature or plugin?


RE: Auto compress videos to AV1 in background - bitmap - 2023-08-10

I think this would fit better somewhere else, as it's not really something that fits into Jellyfin's feature set as I understand it. I won't speak for the devs, though.

Myriad other tools out there exist in the wild to accomplish this task. There's tdarr, Unmanic, Handbrake, shell scripts, etc...

I've been experimenting with ab-av1, which is a pretty cool project coded in Rust that has several modes, including an auto-encode feature that searches for a CRF that will meet your VMAF and size needs, then encode according to your profile and parameter specifications. So far it has done a fantastic job for me, but it's not a fully-automated solution and with only CPU cycles (no hardware acceleration), you're looking at a LOT of time spent on encoding. Currently working on my first 4K series and we're on day two, and we're on episode sixteen at six FPS.

This topic probably belongs in another spot, as I don't think it's a feature request; maybe the homelab/self-hosted area is a better location. There are a lot of options to do what you want, but I'd advise you to think carefully about repercussions of going this route before you embark on the journey. Size is only one aspect of it. If you make another topic, DM me or ping me or whatever would get my attention on here and I'll chime in with a few more thoughts.


RE: Auto compress videos to AV1 in background - Southpawz - 2023-08-31

Can't Tdarr do this?


RE: Auto compress videos to AV1 in background - bitmap - 2023-08-31

Yes. Tdarr, Unmanic, various scripts, I even started a thread in Self-Hosted/Homelabs (where this discussion probably should sit) where we're talking about encoding and @TheDreadPirate has essentially written what could be a standalone ffmpeg script to sift through folders and auto-encode with the settings of your choice. With AV1, the options are pretty specific to each type of content and particularly dependent upon the encoder that you choose. For instance, the QSV decoder I've heard is pretty lax about quality which I'm not excited about. I've had great luck with SVT-AV1, but refining film grain synthesis per show has been an art form. Even by episode for some shows it's difficult.

That's why I advised caution. I went this route previously and I regret it. I killed a lot of remux-quality content for some good-quality x265 encodes that I could've waited and thrown some AV1 encoding time at and had a pristine copy in my codec pairing of choice. I'm not saying don't do it, just be careful. Tools like Tdarr are a fully-automatic machine pistol with no safety.


RE: Auto compress videos to AV1 in background - Venson - 2023-08-31

Hey @Mr-Brightside

First things first:
There are some rules regarding posting feature request topics in this forum you can read here: https://forum.jellyfin.org/t-please-read-before-posting-please-send-new-feature-requests-to-fider

Next: From my pov its unlikely anyone will implement such feature and that it gets merged. There are already feature requests in that direction and the general consensus was that its not something jellyfin should do as jellyfin is just a media server and it should stay that way. As @bitmap already said, there is other software like Tdarr that does exactly this and adding such complex other function is not desirable for jellyfin as a project, to keep the code clear and better maintainable.