Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video_file_under_size_plugin #355

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

lbenedetto
Copy link

@lbenedetto lbenedetto commented Oct 10, 2023

I've only tested this out locally by manually running the script. Haven't tested using it in Unmanic

Specify your minimum file size as Size/Time, eg. 3.2GB/h.

Resolution scaling

The plugin will assume your setting is for a 1080p video and will scale the threshold up or down depending on the actual resolution of your video.

For example, if you put 1GB/h the plugin will calculate and use the following as the actual threshold:

  • 640*480 == 148.1 MB/hour
  • 1280*720 == 444.4 MB/hour
  • 1920*1080 == 1 GB/hour
  • 3840*2160 == 4 GB/hour

actual_threshold = your_threshold * (actual_resolution/1080p)

Note that this is not limited to these specific resolutions, it will scale accurately no matter the size or shape of your video.

Size format

Sizes can be written as:

  • Bytes (Eg. '50' or '800 B')
  • Kilobytes (Eg. '100KB' or '23 K')
  • Megabytes (Eg. '9M' or '34 MB')
  • Gigabytes (Eg. '4GB')
  • Terabytes (Eg. '1 TB')
  • Petabytes (Eg. '0.5PB')
  • etc...

Time Format

Accepted time units are:

  • s, second
  • m, minute
  • h, hour

@Josh5 Josh5 merged commit 751c24c into Unmanic:official Oct 12, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants