How to control file sizes

A while back, quite a few years probably, the quality feature was added to Sonarr. That worked well for a while but I found that if I tightened the limits too much I missed out on some episodes or entire seasons. Then if I loosened the limits I got all sorts of file sizes I’d prefer not to have.

I have varying preferences for file sizes. If its a really nice looking show I like larger files but if its a comedy I’m fine with a smaller size. So lets say tv show A gets released by a few groups (and its a 60 min/ep show, 1080p WEBDL):

group 1 file size = 1gb
group 2 file size = 3gb
group 3 file size = 5gb
group 4 file size = 6gb

In this case I’d like the 3gb and my limits are 1.28gb - 5.06gb. Sonarr then choses between the 3gb and the 5gb and with my luck usually its the larger file and then I sometimes go back and manually get the smaller files. Or sometimes I want the 5gb file but Sonarr gets the 3gb files. Sure I could tighten those limits, maybe 2gb - 4gb but what happens is then I start missing random episodes and/or seasons. It might work on this show, but not on the next one.

I find myself manually doing a lot of stuff in Sonarr and I think that goes against what its designed for. Any tips to solve my problem? Or am I just too picky? :slight_smile:

theres only one quality definition (for setting file size limits) for the whole system, much like theres only one RSS sync interval value used across all indexers

you could raise an enhancement request to (for example) make the quality definition part of the quality profile (i think thats a logical place to link it). they could leave the existing one as the default and if you want to change it for a quality profile tick a box to enable editing of the one in there, otherwise you get the default one.

edit: another option would be to turn them into quality definition profiles, that way you could tag them the same as your release profiles and have them apply to a series that way - this way would be more in tune with how you would want to use it, and its a bit more flexible so would cover a wider range of use cases

anyone who downloads hevc files would probably like/use something like that as the file size difference for that codec are considerable

I think that would be a perfect idea! I’m not exactly sure the details… High, medium, and low settings? If high, Sonarr would grab the largest file size within the range set in settings->quality. If medium, Sonarr would try to grab the file size closest to the midpoint of the range, and if low, grab the lowest file size within the set range.

There’s other ways to do it but this I think would be the least confusing.

tag based. tags are already in place so its “simpler” to re-use those than have a separate field just for a specific quality definition. it also lets you create as many quality definition profiles as you require and apply an appropriate tag to each one - you then apply that same tag to the series.

eg, for your situation/example, it could look something like this

  1. create a quality definition profile with the file sizes for group 1 and tag it with 1GB (or leave it untagged to make it the default)
  2. create a quality definition profile with the file sizes for group 2 and tag it with 2GB
  3. create a quality definition profile with the file sizes for group 3 and tag it with 3GB
  4. create a quality definition profile with the file sizes for group 4 and tag it with 4GB
  5. edit each series where you want non default sizes and apply the appropriate size tag

if you wanted a series only in hevc then;

  1. create a quality definition profile with the file sizes for hevc and tag it with HEVC-ONLY
  2. create a release profile with must contain for all the hevc text variants and tag it with HEVC-ONLY.
  3. edit the series you only want in hevc and set the tags to HEVC-ONLY to assign both the quality definition and the restriction to it

not quite sure I understand this. Am I using tags right now in version 2? Are the Quality Definitions the tags that you are taking about?

Let me know what part of this I’m not understanding…

You would propose making tags for the file ranges, for example the 2GB tag would mean 2GB - 2.99GB, 3GB would be 3GB - 3.99GB, etc, or something like that.

Then in the Profiles section where we create our own personalized profiles we can add the file size tags. So for example I have one called WebDL 1080p. I could rename it WebDL 1080p 2GB and add the 2GB tag and use this profile on shows I want to limit file sizes to 2-2.99GB range. I’m not sure if you meant to do this or rather inside each show add the size tag separately from the profile.

A few questions… What if I want 2GB but I’d accept 3GB or 1GB in that order if 2GB cant be found? We’d need to add prioritize multiple size tags. What about a profile that first grabs WebDL and then later Bluray? We’d need different sets of size tags for each quality in a profile.

right now theres only one system wide quality definition. im saying you could raise an enhancement to change that so you can have more than one

theres also a couple of way you could implement it depending on whats easier to code, support, and use

  1. you could move the quality definitions into the actual quality profile (possibly the simplest from a user perspective)
    a) as a full replacement so they no longer have their own page and have to be set in here


    b) leave the “default” quality definition in place and add the ability to override it within the quality profile for each quality (if not overridden would display a grayed out/locked version of the default values - too hard to draw at the moment)

    c) leave the “default” quality definition in place and add the ability to override it within the quality profile for the whole profile (so you have to set all of them, or none of them here)

  2. you could turn them into their own profile and then either of the below to assign it to the series
    a) tags
    b) have a specific field in the series to select it

i was outlining using tags (option 2 above), you seem to be thinking more option 1, maybe?

youre going to have to make a decision on what file sizes you want to accept. i would expect if a series was tagged with multiple quality definitions it would pick either the first or last (the developers would have to make a choice there)

eg, it would be like preferring hevc - youd need to set the sizes to min at h265 but max at h264. if you only want hevc then you can set the sizes to min/max for h265

it should only end up picking one quality definition, then use the sizes in there for each quality. if it finds a better quality then it would be within the size range you set for that quality and thus an upgrade

yes, multiple tags could get messy so option 1 might be better to made it abundantly clear and remove the ability to end up with multiple definitions being applied

if you really want to prioritise file size youd have to have that included in the ranking/upgrade system. pretty sure theres something already there but i cant recall if it prefers higher or lower file sizes - and theres currently no way to “upgrade” based on file size - for that you’d need a lot more changes and youre starting to get into very small customer base territory

Your Sonarr looks different than mine, are you using version 3?

Probably your 1a or 1b is what I was thinking of. If for example we could make multiple WEB 1080p quality definitions, one each for 1GB, 2GB, 3GB, etc, and then we could rank those definitions when we make a profile. To me thats the easiest way to do it.

yes, the images are a mashup of two v3 pages

i was only suggesting a 1:1 mapping though. if you wanted different sizes (for different codecs/bitrates) youd assign a different quality profile to the series

if you want a 1:many link to be able to prefer the sizes thats going to need much more significant changes to the code

Can you explain why being able to rank multiple quality definitions of varying sizes would require significant changes to the code? This of course is assuming its possible to let us make our own quality definitions.

All I want to do is for random show A, use a profile that ranks like this:

WEBDL-1080p 2GB
WEBDL-1080p 3GB
WEBDL-1080p 1GB

and for random show B, use a different profile that ranks like this:

WEBDL-1080p 1GB
WEBDL-1080p 2GB
WEBDL-1080p 3GB

Yes I’d end up with quite a few profiles.

nothing exists in the code for anything like what you want yet which means large portions of the code would need to be re-written and/or written from scratch.

the options i’ve mentioned leverage existing code and usage, so while they arent simple changes/enhancements, you wouldnt have to build it from scratch, more move a lot of stuff around and tidy up (yes, thats oversimplified).

less effort means theyre more likely to implement it though, unless you can show a massive user need behind a significant change its going to be a hard slog to get them to look into it

since I dont understand your idea, I’m just going to ask for mine. :frowning:

so what about this… rather than let us make our own Quality Definitions, which in my case would probably be 5-10 different flavors of Web-DL’s, what if Sonarr simply came with more Quality Definitions than it does now. So lets say it comes with 2 or 3 WEBDL-1080p’s and we can change the title and size limit of each and then plug them into the appropriate profiles. I’d have small, medium, and large if there were 3, or just small and large if there’s 2.

I I totally agree with @cardboardbox, it’s a bit hard with nowadays options to get the best ration quality / size depending on the show.

I think that the idea of multiple Quality Definitions is the easiest way to implement a simple way to choose quality between tv shows

Would love to have that, but i’m not to good to do it myself :roll_eyes:

hi Dalko911, I’ve made a feature request here: More control over file sizes

Unfortunately no response from any of the Sonarr team yet. :frowning:

For now I think I will have two sonarr instances running. One for “Low file size” and another for “High file size”.
It’s probably not the best way to do it, but it’s the simpliest :slight_smile:

Or buy another hard drive and go to “High file size” for everything…

you can also run the shows you dont care about through something like handbrake to shrink them down, or convert them to x265, both would save space if you need it.

you dont even have to do it immediately, just run the previous seasons through it

Actually that may be my solution, i didn’t think of that !
I’ll try handbrake, do you have some advice for the source file that I can compress without to loss quality ?
Should I download a bigger file (like 1080p, 30MB by minutes) to compress it like 50%, or should I take a smaller file (like 720P, 20MB by minutes) and compress it less ?
The output file size will be the same, but which one should have the best quality in your opinion ?

That a good idea. How do you go about running two instances?

[quote=“Dalko911, post:17, topic:21075, full:true”]
Actually that may be my solution, i didn’t think of that !
I’ll try handbrake, do you have some advice for the source file that I can compress without to loss quality ?
Should I download a bigger file (like 1080p, 30MB by minutes) to compress it like 50%, or should I take a smaller file (like 720P, 20MB by minutes) and compress it less ?
The output file size will be the same, but which one should have the best quality in your opinion ?[/quote]

if you end up with the same file size, the quality is going to be very similar, really doesnt matter much what size you started with.

i know someone setup two instances, one for h264 and the other for h265 (for higher resolution but smaller files)

all video codecs we use are lossy but you can tweak them to not lose as much.

the more you want to keep typically the longer it takes to re-encode and the larger the resulting file gets.

not unless you specifically set an output file size

take the largest/best quality source you can get, then shrink/re-encode that.

if at all possible you download the x265 variant to begin with (but we all know how problematical that can be), or if you have v3 you can use preferred words to upgrade from 264 to 265 if they become available (and you manually convert the ones that dont later)