HaveAGitGat / Tdarr

Tdarr - Distributed transcode automation using FFmpeg/HandBrake + Audio/Video library analytics + video health checking (Windows, macOS, Linux & Docker)
Other
3.07k stars 96 forks source link

Compare file size ratio of working file A / B #1013

Closed davidry closed 6 months ago

davidry commented 6 months ago

[[Feature Request - Permit Comparisons of Working Files]]

Is your feature request related to a problem? Please describe. This is an attempt to Reduce Processing time of unnecessary files [Files that will get larger / stay the same]

Describe the solution you'd like I'm looking for a plugin that would allow me to compare size ratios of working file A with working file B - perhaps an enhancement of the current "compare file size ratio" flow step [adding the ability to select source file ], or the ability to continue from a "Go to Flow" Transcoding large media files can take quite some time depending on hardware

My hope is to get a solution that allows a 15 minute clip to be extracted, transcoded and compared .

This would allow me to breakout the transcode should I not see space benefits against the sample working files.

If the transcode shows savings, I can "set original file" and re-run my flow against the full file

Describe alternatives you've considered

image HVEC_Tdarr_Plugin_075a_Transcode_Customisable.js.txt FlowExport.json

HaveAGitGat commented 6 months ago

Hi, duplicate of https://github.com/HaveAGitGat/Tdarr/issues/571, will handle there ty

HaveAGitGat commented 5 months ago

Added with flow plugin Compare File Size Ratio Live. Click Update community plugins on the classic plugins tab or will auto update within an hour or so.

image image

Can compare between either the estimated file size or the current file size of the output file.

  Compare either the estimated final size or current output size to the input size and 
  give an error if estimated final size or current size surpasses the threshold %.

  Works with 'FfmpegCommand', 'HandBrake Custom Arguments', 'Run Classic Transcode' and other flow plugins 
  that output a file.

  Can be placed anywhere before a plugin which outputs a new file.
davidry commented 5 months ago

Thanks for that, I've updated my flows and its working great!

Would it be possible to get an error based off the live flow? the unfortunate side effect of this plugin is it cancels on the transcoding step. I am unable to determine if this failed due to file size or due to issues with the hardware filters for this particular stream

to workaround this at current, I am needing a second flow.

"Copy to Directory First" will transcode 20 seconds of Video.

This workaround catches 80% of the errors and queues the files appropriately. the issue is when a hardware transcode fails after XX minutes of running. this still looks identical to the cancellation due to the live file size comparision

HaveAGitGat commented 5 months ago

@davidry made this change here so can now use Check Flow Error to see if error was caused by the live size compare: https://github.com/HaveAGitGat/Tdarr_Plugins/pull/669/files

  You can check if this plugin caused an error by using 'Check Flow Variable' and checking if 
  {{{args.variables.liveSizeCompare.error}}} is true.

image

image