Page 1 of 1
Waiting for multiple forks
Posted: Fri Aug 19, 2016 4:41 am
by dylanreeve
Hi, I have a workflow that splits twice giving me a total of three paths each leading to its own encode and output.
At the end of the workflow I want to delete the source file, but I don't know necessarily which path will complete last and obviously I can't delete the source before it's freed up.
How best do I approach this?
Here's is screenshot:
- ffastrans.PNG (25.32 KiB) Viewed 9990 times
Re: Waiting for multiple forks
Posted: Fri Aug 19, 2016 7:38 pm
by admin
Hi dylanreeve, thank you for using FFAStrans and welcome to the forum!
First, looking at your screenshot the workflow is invalid. In order to use filters you must place the "A/V Media"-decoder after the "Folder"-monitor. If not your workflow will fail.
Now to your question: Depending on your level of expertise when it comes to batch scripts, you can alway create one that checks if all your output files exists and if they do, delete the original. Or, you can use an undocumented function feature called '$exists("filename")' from within the "Conditional"-node:
- 2016-08-19.png (17.02 KiB) Viewed 9977 times
Use can use the "Populate variables"-node to contruct your output filenames or you can mimic the file name settings from your "Folder"-delivery node. Pipe all your output nodes to this one followed by a "Command executor" that performs the deletion of your original if the "Conditional"-node succeeds.
Note that the "$exists()"-function is NOT 100% tested but should work and will not cause any harm.
-steinar
Re: Waiting for multiple forks
Posted: Sat Aug 20, 2016 3:01 am
by dylanreeve
Thanks.
I realised I was missing the A/V Media decoder when I looked at the screenshot afterward... Oddly the workflow does actually work exactly as expected with the structure shown above, but I will amend it.
Some sort of Wait node would be handy... I could feed all three paths into is and wait for input on all of them, then continue out.
Thanks - I'll test out this conditional with the $exists function.
Re: Waiting for multiple forks
Posted: Sun Aug 21, 2016 9:04 am
by admin
I really don't see how that workflow would work as expected, unless the "A/V Media" is hidden beneath one of the other upper nodes...
-steinar
Re: Waiting for multiple forks
Posted: Tue Aug 30, 2016 2:15 pm
by kibi
The workflow can process without "A/V Media" node in case of *.AVS source files
Re: Waiting for multiple forks
Posted: Tue Aug 30, 2016 3:43 pm
by admin
Yes of course but that requires very specific conditions in the AVS-file picked up. I think dylanreeve would know this and not find it odd that it works
-steinar