Page 1 of 1

Help Effectively Using %s_original_path~n% ?

Posted: Fri May 22, 2020 4:09 pm
by RussBlink
Hi All,

I'm new to FFAStrans and trying to build a simple Transcoder I can point to a watch folder on the network that'll transcode and output proxies to an adjacent folder like so:

X:/Transcode/Sample Shoot/Original (watch folder)
X:/Transcode/Sample Shoot/Proxy (ideal target)

I need the output to be relative to the original folder, not a defined file path. I tried setting my target as %s_original_path~n%/Proxy, but when I set n=1 or n=2, the proxies are outputted to a subfolder of Processors in the FFAStrans folder. When I try %s_original_drive%/%s_original_path~n%/Proxy, it creates X:/Sample Shoot/Proxy when n=2. I can't find where the files went when I set it to n=1.

Am I fundamentally misunderstanding the variable and how to use it? Is there a trick to using it I haven't picked up on? Is there a better tool for setting a variable target path?

Thanks!

Re: Help Effectively Using %s_original_path~n% ?

Posted: Fri May 22, 2020 5:55 pm
by RussBlink
I think I answered part of my own question via repeated testing: %s_original_path~n% will create the original file path back n number of levels in the FFAStrans Processors folder. Which is painfully counter-intuitive when %s_original_path% will drop the proxy in the original source folder.

Re: Help Effectively Using %s_original_path~n% ?

Posted: Fri May 22, 2020 6:23 pm
by admin
Hi RussBlink, thank you for using FFAStrans and welcome to the forum! :-)

I can see the %s_original_path~n% variable might be a little confusing in that it will just return the name of the folder n-steps backward. Luckily it's farily "easy" to get to what you want. Please look at the attached screen shot:
newpath.png
newpath.png (13.69 KiB) Viewed 5020 times
Here I have created two user variables; %i_lenght% and %s_new_path% and you can see how I have configured the "Populate variable" node. So in short it's:
%i_lenght% = $length("%s_original_path~1%")
%s_new_path% = $trimr("%s_original_path%", %i_length%) & "Proxy"

What happens here is that you extract the last path, in your case being the "Original". You then retrieve the length of that string and subtract the length from the full original path. Then the "Proxy" name is added and all is stored to %s_new_path% which now will be the variable you should use in the "Folder" delivery node.

The advanced features of FFAStrans dealing with variables and function might be a bit complex but will also give you much power and control of your workflows. So this is a kind of user friendly GUI meets basic programming or scripting. You need to know a little about the latter in order to make full use of FFAStrans.

Hope this helps! :-)

-steinar

Re: Help Effectively Using %s_original_path~n% ?

Posted: Fri May 22, 2020 9:40 pm
by RussBlink
That worked perfectly, thank you!