-
Notifications
You must be signed in to change notification settings - Fork 210
feat(flows): add arithmeticFlowVariable plugin #871
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
feat(flows): add arithmeticFlowVariable plugin #871
Conversation
A plugin to do simple arithmetic to a user variable.
|
I've updated this so we can use it on any variable on the Using |
|
@HaveAGitGat Thank you for improving my code, appreciate it. I tested this and it works, can you merge it if you're also satisfied with it? |
FlowPluginsTs/CommunityFlowPlugins/tools/arithmeticFlowVariable/1.0.0/index.ts
Outdated
Show resolved
Hide resolved
|
I have already done literally the same thing about 6 months ago, the code is almost identical 😂Great minds code alike.. You are more than welcome to port over the other plugins for this repository into the main plugins channel, as some of them are essential for doing more advanced loops, and with them, I found, you can literally achieve anything: GreaterLessThan - If variable is greater or less than ListJoin - Compile a list They allow you to do for each and also run maths calculations on filters.. I managed to create a loop where the flow encoded a 2-second snippet of video, |
|
@digitalassassins oh that's cool! Do you mind adding them to this repo? @HaveAGitGat has been great at accepting/improving my submissions and they automatically help everyone using flows; I wish I had found your repo as opposed to have coded this myself from scratch. |
|
@kalbasit Yeah i updated the HDR flow plugin to include Dolby Vision detection and @HaveAGitGat was very helpful. I just coded them in JS for quickness so i could hit the ground running.. I'm extremely busy with work at the moment, but soon as I get a few minuites to spare I'll modify the code to TypeScript and submit them into the repository, that is if @HaveAGitGat thinks they would be suitible to be included as Standard with the community plugins ? I was trying to write a userguide on how to use the flow plugins to achieve different things, Hopefully i could get that finished so it could be included in the official documentation, so its not to taxing on the brain trying to work out what they are for.
Ive created examples like above, that one is to work out how long a video is and take snapshots at certain intervals through the video using calculations and the loops, aswell as creating a list. So it works out how many screenshots you want, gets the length of the video, works out what the times would be, then uses a loop to move ffmpeg to each specific time in the array and take a screenshot.. Useful to create preview screenshots for each video you encode, so you dont have to lauch each video to view the quality, you can just encode the video then get Tdarr to enter that loop at the end and boom.. you have a screenshots folder filled with the number of screenshots you want. Tdarr can then end the flow and move on to the next video.. These are just some of the advanced stuff you can do with loops, array lists and mathematics plugins 😁 |
* upstream/master: docs: add more info to relative path tooltip (HaveAGitGat#884) feat(flows): add calculateFileHash plugin (HaveAGitGat#878) feat(flows): add arithmeticFlowVariable plugin (HaveAGitGat#871) chore: skip file access checks on unmapped node (HaveAGitGat#877) chore: add codeEditor inputUI type (HaveAGitGat#875) chore: add apiKey to header if available (HaveAGitGat#874) chore: add x-api-key to header (HaveAGitGat#873) fix: Tdarr_Plugin_NIfPZuCLU_2_Pass_Loudnorm_Audio_Normalisation keep all streams from original (HaveAGitGat#872) Fix Tdarr_Plugin_078d to support MPEG-4 Timed Text (MP4TT / tx3g) subtitles (HaveAGitGat#842)

A plugin to do simple arithmetic to a user variable.