Tdarr icon indicating copy to clipboard operation
Tdarr copied to clipboard

Allow Auto-Cancelling when soucerfileSizeInGbytes < outputFileSizeInGbytes by a chosen ratio

Open xFaultx opened this issue 2 years ago • 10 comments

Is your feature request related to a problem? Please describe. When doing transcoding, sometimes an outputted file is larger than the input. If my goal is to just save space, this is creating more space, time, and power (energy bill) of having my CPU or gpu work on a task that I am going to cancel or delete. Currently I just have to check it manually, but if I am seeing the outputFileSizeinGbytes is significantly larger, like 150-200% the size of the original file, I cancel the task manually.

Describe the solution you'd like Instead of manually monitoring the input vs output, have a threshold that once the output exceeds a defined %, like the outputFileSizeInGbytes is 150% of the sourcefileSizeInGbytes, the task is canceled, and the node can move onto the next task.

Describe alternatives you've considered Currently I have 2 friends looking at the API and seeing what they can sus out, there was a similar quesion related to pausing the work through the API. I dont think what I need is there, but I think it would help.

Additional context I feel like between 'get-nodes' and other api functions this shouldnt be impossible, but I know very little about this to know where to go.

xFaultx avatar Mar 01 '22 18:03 xFaultx

Hi, please see this issue which is a more efficient solution: https://github.com/HaveAGitGat/Tdarr/issues/568

HaveAGitGat avatar Mar 02 '22 04:03 HaveAGitGat

https://github.com/HaveAGitGat/Tdarr/issues/573

This isn't really a fix for the issue however. What you're describing would only really work when writing with media that has either the same/similar source quality, and/or similar end file size. I have some things that the source bitrate is lower because I don't need it to be higher quality. An example would be maybe some holiday movie that is something we throw on in the background once a year. But in the same library I have movies that I want to have very little quality loss, and sold naintIn that very high bitrate. The goal is to have lower quality movies stay low quality, and higher quality stay high.

HaveAGitGat avatar Mar 03 '22 07:03 HaveAGitGat

FYI you can use this plugin to automatically error files that are not within the required boundaries: Tdarr_Plugin_a9he_New_file_size_check

HaveAGitGat avatar Mar 04 '22 05:03 HaveAGitGat

FYI you can use this plugin to automatically error files that are not within the required boundaries: Tdarr_Plugin_a9he_New_file_size_check

I am using it . The issue is that does it at the end of the transcode and a script capable of checking the outputsize vs sourcefilesize would catch that way earlier, possibly an hour or two before a cpu transcode was finished. So it would not only save time by stopping it before the render was over, but save electricity and money by preventing it from running unnecessarily

xFaultx avatar Mar 04 '22 10:03 xFaultx

I guess one of the big things is apart from manually clicking the buttons for the info then the cancel, I don't of a way to issue a cancel command, such as through a command line in either the server or node protocols

xFaultx avatar Mar 04 '22 10:03 xFaultx

Did you get anywhere with using the API to do this? The info in there has the live output file size, so you could use that and kill the worker when needed. Else I can add this in a future version.

HaveAGitGat avatar Apr 09 '22 15:04 HaveAGitGat

Did you get anywhere with using the API to do this? The info in there has the live output file size, so you could use that and kill the worker when needed. Else I can add this in a future version.

No I didn't, started down the rabbit hole and got a bit lost. If your are able to add it that would be monumental. Hate having my pc running some big transcode only to find out that it could have been stopped an hour ago.

I think what would be best is if it gave you the option to either completely cancel the transcode, or send it to a different folder rather than replacing the original file so that you could approve if it falls within certain size parameters whether it's too big or too small. So just the same as if the file is too big, if the files too small, you can decide to go and visually see it to see if actually it still maintained its quality. In most cases I'd want it to cancel, but still options are nice

xFaultx avatar Apr 09 '22 15:04 xFaultx

Did you get anywhere with using the API to do this? The info in there has the live output file size, so you could use that and kill the worker when needed. Else I can add this in a future version.

Just verifying because I was having issues updating my setup - was this ever added. I didnt see it in the changelog, but havent fully explored the update

xFaultx avatar May 02 '22 23:05 xFaultx

an advice Switch to Flows there is a plugin that does exactly that.

Kedryn avatar Oct 11 '23 09:10 Kedryn

an advice Switch to Flows there is a plugin that does exactly that.

@Kedryn Do you know what plugin helps with that? I'm trying to find it and only finding ways to compare after the file is transcoded. We are looking for a way to not transcode if it results in a larger file.

samssausages avatar Feb 12 '24 19:02 samssausages