Hi,
I'm trying to setup my first workflow in FFAStrans which will take in via watch folder:
Filename_1.wav
Filename_1.xml
It needs to process just the WAV file, convert it to MP3 (plus loudness) and put in a drop folder with a GUID appended to filename as Filename_1_GUID.wav
It also needs to process the XML file with the same filename and rename it to the Filename_1_GUID.xml
The GUIDs stamped to both files need to be the same, as the file names must match for further processing down the line by another application.
I've tried a few different ways of doing this, particularly by generating a GUID, storing it to a user variable, and trying to use that variable for both files via either two watch folders with the second watch folder filtered to accept only .XML files with the source file name without extension of the first .WAV file, or conditional statements "if .XML then" and "if .wav then" and then generating the variable after if WAV file and referencing that to both the "if XML" and the output folder blocks. However both methods result in the XML file with a file name that is literally "Filename_1_%s_guid%.xml". As in it's not putting in the stored variable, just the literal variable itself.
Here is the results of the output folder:
Any ideas a simple way to do this seemingly simple task?
Here's a pic of how I tried (but failed) to apply the variable. I originally applied the set variable output just to two places, but started hitting multiple places as it kept not working.
I seem to be missing how to get the variable to be applied properly.
Thanks everyone!
Same GUID to 2 different files types with same filename
Same GUID to 2 different files types with same filename
- Attachments
-
- 2019-01-16 11_22_29-FFAStrans Workflow Manager.png (44 KiB) Viewed 10397 times
Re: Same GUID to 2 different files types with same filename
hi, could you please upload your workflow xml?
cheers, emcodem
cheers, emcodem
emcodem, wrapping since 2009 you got the rhyme?
Re: Same GUID to 2 different files types with same filename
Hi,
I simplified the workflow but still seeing the same issue.
Not sure how to pass a variable onto a different branch of the tree.
Workflow attached.
I simplified the workflow but still seeing the same issue.
Not sure how to pass a variable onto a different branch of the tree.
Workflow attached.
- Attachments
-
- TO MP3 -16 LUFS w GUID.xml
- (21.43 KiB) Downloaded 445 times
Re: Same GUID to 2 different files types with same filename
OK, i got it.
Unfortunately currently (and most likely in future) you need to see each branch of the tree as a completely separate job, branches do not share any variables besides the ones from their common main branch. So you need to set your guid variable on the main branch, before you break up into branches.
If it was different, how could it work to set %s_original_ext% to xml in one and to wav in the other branch...
Typically as a developer, i recommend to set your static variables as first thing in your program(/worfklow) anyway... So in my head, you insert one populate vars after your watchfolder and after that you break into branches. This first populate variables sets variables for all the stuff you use later, e.g. guid, output directories etc... This way you have all the stuff a user can change at one point.
I guess you understood, but just to be sure, here an example: cheers,
emcodem
Unfortunately currently (and most likely in future) you need to see each branch of the tree as a completely separate job, branches do not share any variables besides the ones from their common main branch. So you need to set your guid variable on the main branch, before you break up into branches.
If it was different, how could it work to set %s_original_ext% to xml in one and to wav in the other branch...
Typically as a developer, i recommend to set your static variables as first thing in your program(/worfklow) anyway... So in my head, you insert one populate vars after your watchfolder and after that you break into branches. This first populate variables sets variables for all the stuff you use later, e.g. guid, output directories etc... This way you have all the stuff a user can change at one point.
I guess you understood, but just to be sure, here an example: cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
Re: Same GUID to 2 different files types with same filename
I get what you're saying, and it confirms what I suspected. However even if I generate a GUID before branching out I end up with two different GUIDs as the .xml and .wav are treated as two different files, I guess as they are two different files.
- Attachments
-
- TO MP3 -16 LUFS w GUID at top.xml
- (21.46 KiB) Downloaded 421 times
Re: Same GUID to 2 different files types with same filename
Well, you want to wait for wav and xml in the first branch. So just reconfigure your watchfolder to "*.wav" ONLY and wait until the *.xml exists by using a "Operations->Hold" node and wait for the other file to exist...
emcodem, wrapping since 2009 you got the rhyme?
Re: Same GUID to 2 different files types with same filename
Please forgive my lack of sophistication around this : ) And thank you for time and assistance!
However, when I tried this I get an error that the job timed out while waiting for files.
Perhaps I'm approaching this the wrong way, but essentially, I need to take two input files with same name, different extensions (.wav and .xml), convert one of them to .mp3 with custom FFMPEG loudnorm parameter, and then append a GUID to both the .mp3 and .xml file names and drop both into an output folder and/or FTP.
I had split into two branches with conditional "if .wav" and "if .xml" as I need the .xml NOT to be processed by the FFMPEG part but still moved along with the first file. Hence the two branches.
Could the core of the problem be that I'm trying to handle two files as one, effectively?
However, when I tried this I get an error that the job timed out while waiting for files.
Perhaps I'm approaching this the wrong way, but essentially, I need to take two input files with same name, different extensions (.wav and .xml), convert one of them to .mp3 with custom FFMPEG loudnorm parameter, and then append a GUID to both the .mp3 and .xml file names and drop both into an output folder and/or FTP.
I had split into two branches with conditional "if .wav" and "if .xml" as I need the .xml NOT to be processed by the FFMPEG part but still moved along with the first file. Hence the two branches.
Could the core of the problem be that I'm trying to handle two files as one, effectively?
Re: Same GUID to 2 different files types with same filename
Hmmm as you seem to be pretty familiar with the use of variables, and from your last sentences, unfortunally i was not able to get what's your remaining problem. Here is some example workflow that shows the usage of processors and variables in the way you need it:
P.S. you could/should maybe use the type "static" instead of "variable" for the outputfolders, in case multiple workflows need to deliver to the same folders "static" is like "super-global"... "statics" are read-only globally for all workflows. Instead "variables" are set per workflow, derived by a branch but as soon as the branch starts, they are private for the current branch.
It just looks odd in the GUI when multiple branches end up in one single processor again; actually this is kind of a display error as the processor will be executed once per branch, so in real, the branches do not merge into one again but execute separately.
My recommendation is that you build your workflows like this: do not connect multiple branches into one again but insert the processor in question multiple times. This way the GUI representation of a workflow actually shows you how it is executed in reality.
Cheers,
emcodem
P.S. you could/should maybe use the type "static" instead of "variable" for the outputfolders, in case multiple workflows need to deliver to the same folders "static" is like "super-global"... "statics" are read-only globally for all workflows. Instead "variables" are set per workflow, derived by a branch but as soon as the branch starts, they are private for the current branch.
It just looks odd in the GUI when multiple branches end up in one single processor again; actually this is kind of a display error as the processor will be executed once per branch, so in real, the branches do not merge into one again but execute separately.
My recommendation is that you build your workflows like this: do not connect multiple branches into one again but insert the processor in question multiple times. This way the GUI representation of a workflow actually shows you how it is executed in reality.
Cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
Re: Same GUID to 2 different files types with same filename
emcodem,
Thanks for all the tips. I've changed my representation and my workflow and have put the GUID labeling on the shelf for the moment. The important parts are of the workflow are working, and that's all that matters.
Take care,
-Jonathon
Thanks for all the tips. I've changed my representation and my workflow and have put the GUID labeling on the shelf for the moment. The important parts are of the workflow are working, and that's all that matters.
Take care,
-Jonathon