Converting and Processing Audio

Questions and answers on how to get the most out of FFAStrans
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Converting and Processing Audio

Post by emcodem »

Up in front, you really should try to learn about how the variable s_source works, https://ffastrans.com/wiki/doku.php?id= ... _variables
Also, if you dont have it already, please install the webinterface so you can investigate error messages from the commandline processor easily in the job details view.

OK, here is what i would do.
VST Host Test_emcodem.json
(3.9 KiB) Downloaded 250 times
You dont need the ffmpeg step at all, ffastrans does that already in the Audio extraction Processor.

My changes:
1) set the audio extraction node to extract the first track of the input file into a stereo wav file (note that the resulting wav file will be written to ffastrans work folder automatically=

2) in the commandline processor, changed the path to mrswatson, you might need to change that back to wherever you have mrswatson.

Code: Select all

%s_ffastrans_dir%\MrsWatson-0.9.8\Windows\mrswatson64.exe

If you have troubles with that variable stuff, i suggest you just insert the path to mrswatson .exe file directly without "%s_ffastrans_dir%". E.g. C:\MrsWatson-0.9.8\Windows\mrswatson64.exe

3) in the commandline processor, changed the output path to

Code: Select all

%s_original_path%\..\OUT\%s_original_name%_WATSON.wav
This way, the output file will be written to wherever the source file is, but ..\OUT folder (one folder up and then the OUT folder). It should effectively do what you want, say your watchfolder is C:\temp\IN, then the output file will be written to c:\temp\OUT. This allows you to copy the commandline to another workflow without need to worry about the path.

4) changed the plugin to "--plugin mrs_silence" for make the testing as simple as possible. We first need to get SOMETHING to work and after that, we can play with filters and presets.
emcodem, wrapping since 2009 you got the rhyme?
PA79
Posts: 20
Joined: Wed Feb 23, 2022 2:37 pm

Re: Converting and Processing Audio

Post by PA79 »

Hi there, me again :-)
Up in front, you really should try to learn about how the variable s_source works, https://ffastrans.com/wiki/doku.php?id= ... _variables
You´re so right. I realy try to understand.
Also, if you dont have it already, please install the webinterface so you can investigate error messages from the commandline processor easily in the job details view.
Done.
If you have troubles with that variable stuff, i suggest you just insert the path to mrswatson .exe file directly without "%s_ffastrans_dir%". E.g. C:\MrsWatson-0.9.8\Windows\mrswatson64.exe
when I did this it works :D even with Stereo Tool with round about 8000 Parameter Points :shock:
(Getting a valid .fxp was a own big Project)

But now it works and the Command looks like this:
"C:\FFAStrans\MrsWatson-0.9.8\Windows\64\mrswatson64.exe" -i "%s_source%" --output "C:\Users\USERNAME\Desktop\VST Host Test\TEMP\%s_original_name%_WATSON.wav" --plugin LUveler64,"C:\Users\USERNAME\luveler_-14LUFS.fxp";vst_stereo_tool_64,"C:\Users\USERNAME\ST-Allgemein.fxp"
Is there a Way to execute additionally the "Make MP3" Command in one Node like
"MrsWatson64MakeSomeVSTSound" after that make "ffmpegMakeAmp3"
(and delete the generated WAV file from Mrswatson) :?
...or a complete different Way?

I made this with a second Watchfolder but this takes to much time for Processing - first with MrsWatson Watchfolder and then waiting for FFAStrans to check the second Watchfolder for the ffmpeg Command

My "Make MP3" ffmpeg Command looks like this: (variable Stuff trouble again here when using this Command in the same node as MrsWatson ?)
"%s_ffmpeg%" -i "%s_source%" -b:a 320k -codec:a libmp3lame -y "C:\Users\USERNAME\Desktop\VST Host Test\OUT\%s_original_name%_EDIT_%i_hour%_%i_min%_%i_sec%.mp3"
i figured out that i- "%s_source%" is not the Source i want. this Variable takes my Original File and not the MrsWatson processed File.
(I learned a little bit 8-) )

PA
Attachments
VST Host Test_emcodem_PA_EDIT.json
(4.93 KiB) Downloaded 249 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Converting and Processing Audio

Post by emcodem »

Sorry for the delay and congrats on getting it to work finally :D

Up in front, as mrswatson .wav output is a temporary file, you can change the output path like that:
BEFORE:

Code: Select all

C:\Users\USERNAME\Desktop\VST Host Test\TEMP\%s_original_name%_WATSON.wav
AFTER:

Code: Select all

%s_job_work%\%s_original_name%_WATSON.wav
The s_job_work folder is what you configure as ffastrans_Cache dir and it will be deleted automatically at job end, unless you set it to be kept in Workflow Properties->Maintenance tab (which i always do for workflow development and only uncheck for production).


There are multiple ways to get to your goal for generating the mp3 out of the wav that mrswatson created.

1) FFAStrans style:
You can use the audio extraction processor to encode to mp3. In order to continue working in a workflow with a file you generated in a cmd processor, all you need to do is to set the "s_source" variable to the exact filename that you generated, e.g. in the cmd processor, check "set s_source" at the bottom and in the textbox, insert
%s_job_work%\%s_original_name%_WATSON.wav

This will cause any following processor to work with the wav file (all standard processors assume that the path to file of interest is stored in s_source variable).

Another alternative way to set s_source variable to a custom path is to use a populate variables processor and set s_source to the path of interest.

2) wild style:
You could also just insert another commandline processor and execute an ffmpeg command, like that

Code: Select all

"%s_ffmpeg%" -i "%s_job_work%\%s_original_name%_WATSON.wav"  -codec:a libmp3lame -qscale:a 2 "C:\Users\USERNAME\Desktop\VST Host Test\TEMP\%s_original_name%_WATSON.mp3"
Instead of s_ffmpeg you could also just write the full path to some ffmpeg.exe but we usually don't do that in order to keep ffastrans installation files portable which enables us to use it as processing farm with multiple servers.

Last but not least, 2 small tipps:

1) when working with variables, i always use the populate vars processor in order to "investigate" the actual content of the variable. Just set s_success to the value of interest, open the "status monitor" and you can see what would be the actual value of your variable combination in the "outcome" column on the right side.

2) when working with s_job_work variable, it is useful to set workflow properties->Maintenance to "always keep work folders" for development. You can open the current working directory in the job monitor->rightclick a job -> open work dir
emcodem, wrapping since 2009 you got the rhyme?
ThomasM
Site Admin
Posts: 231
Joined: Wed Feb 22, 2017 6:36 am

Re: Converting and Processing Audio

Post by ThomasM »

Hey PA,

try the attached workflow. I added the OUT-Filename as the new source in the watson-Node.

Hope this helps...

tom
Attachments
VST Host Test_emcodem_tom25mar2022.json
(5.15 KiB) Downloaded 265 times
ThomasM
Site Admin
Posts: 231
Joined: Wed Feb 22, 2017 6:36 am

Re: Converting and Processing Audio

Post by ThomasM »

ooops... emcodem was faster....
PA79
Posts: 20
Joined: Wed Feb 23, 2022 2:37 pm

Re: Converting and Processing Audio

Post by PA79 »

Sorry for the delay and congrats on getting it to work finally :D
no Problem - I´m thankfull for every advice...Also to Tom
%s_job_work%\%s_original_name%_WATSON.wav
Booom - it works! Nice!

I did it "Wild Style" 8-)

Sorry for the Offtopic :( (Shame on me)
Because it gets boring when everything works, there are now more problems, but they affect MrsWatson and NOT FFAStrans.
Mrs Watson got a Problem with latency Compensation. There is a bugfix at github but this doesnt solve the issue. (for me)
https://github.com/teragonaudio/MrsWatson/issues/201

The big latency is not the Problem. I know that Stereo Tool needs a lot of Latency to work fine.
It shifts the Audio startpoint - ok with that

Here You can see how the Audio looks like through the Processor Nodes step by step
STARTPOINT
Track 1: Original File
Track 2: FFAStrans Audio Extracion Node (copied from Cache Folder)
Track 3: MrsWatson File
Image

The bigger Problem is that MrsWatson shorten the Audiofile in a wondrous way.
In ths case of Audio example there is no Problem. But if you have an audio that ends exactly with the endpoint it cuts in the end of the Audio.
ENDPOINT
Track 1: Original File
Track 2: FFAStrans Audio Extracion Node (copied from Cache Folder)
Track 3: MrsWatson File
Image

I know I can not change this MrsWatson issue.
Now I´m looking for a workaround like:

Watchfolder (known)
Audio Extraction (known)
Add X-seconds of Silence to the end of the audio (unknown but I´m investigating every single free minute)
MrsWatson (known)
ffmpeg Make MP3 (known)

I´m afraid to "destroy" the Variable Structure in the actual working Workflow :? :|

PA
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Converting and Processing Audio

Post by emcodem »

Aye PA!
PA79 wrote: Mon Mar 28, 2022 12:31 pm I´m afraid to "destroy" the Variable Structure in the actual working Workflow :? :|
I am sure it will not take a very long time until you understand every aspect of the variables in the current workflow, its pretty straight forward :D
Here is another resource for learning about workflows and variables, maybe you can check it out if you find the time:
https://www.ffastrans.com/frm/forum/vie ... ners#p3565
PA79 wrote: Mon Mar 28, 2022 12:31 pm
%s_job_work%\%s_original_name%_WATSON.wav
Booom - it works! Nice!

I did it "Wild Style" 8-)
The problem with wild style is that it is harder to keep track about whats going on, it makes the workflow less maintainable on the long run ;-) But for start of course it is good to do whatever works for you ;-)
PA79 wrote: Mon Mar 28, 2022 12:31 pm ...There is a bugfix at github but this doesnt solve the issue. (for me)
https://github.com/teragonaudio/MrsWatson/issues/201
How did you try if that fixes the issue? As far as i understand one would need to download and compile "fefantos" version of mrswatson, did you do that?
https://github.com/fefanto/MrsWatson
emcodem, wrapping since 2009 you got the rhyme?
PA79
Posts: 20
Joined: Wed Feb 23, 2022 2:37 pm

Re: Converting and Processing Audio

Post by PA79 »

I am sure it will not take a very long time until you understand every aspect of the variables in the current workflow, its pretty straight forward :D
Here is another resource for learning about workflows and variables, maybe you can check it out if you find the time:
https://www.ffastrans.com/frm/forum/vie ... ners#p3565
I will keep on dive deeper in the Variable stuff :-)
The problem with wild style is that it is harder to keep track about whats going on, it makes the workflow less maintainable on the long run ;-) But for start of course it is good to do whatever works for you ;-)
i noticed. My goal is to change all the "Wild Style" to Variables wherever it makes sense.
How did you try if that fixes the issue? As far as i understand one would need to download and compile "fefantos" version of mrswatson, did you do that?
https://github.com/fefanto/MrsWatson
If I type "mrswatson --version" in the CMD it shows me: (Because of that Info I think i did it right?)

Code: Select all

C:\Users\USERNAME>mrswatson --version
BEWARE! --------------------------------------------------

        this mrswatson version is based on mrswatson 0.9.8.
        by teragon audio
        the code for this version is available at :
        https://github.com/fefanto/MrsWatson
        the purpose of this version is :
                - to restore the latency compensation feature
                - to have an output file exactly the same size as the input file
                - (this means that this won't play well with reverbs/delays etc.)
----------------------------------------------------------

MrsWatson version 0.9.8, build 20170705
Copyright (c) 2017, Teragon Audio. All rights reserved.

...

Code: Select all

- to have an output file exactly the same size as the input file
It´s a lie :lol:

Of course i tried at first - as i learned from you - to run in the CMD before FFAStrans. 8-)

I found the ffmpeg filter "apad"

Code: Select all

ffmpeg -i input.wav -af "apad=pad_dur=1" output.m4a
(https://superuser.com/questions/579008/ ... ugh-ffmpeg)

I think this could be the way to go. Set this ffmpeg after the audio extracion node
Here is another resource for learning about workflows and variables, maybe you can check it out if you find the time:
https://www.ffastrans.com/frm/forum/vie ... ners#p3565
I will. Thank you!
PA79
Posts: 20
Joined: Wed Feb 23, 2022 2:37 pm

Re: Converting and Processing Audio

Post by PA79 »

I can´t believe it. I think i made it!!!! :shock: :shock: :shock: :o :o :o
Attachments
VST Host Test_emcodem+apad.json
(8.35 KiB) Downloaded 246 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Converting and Processing Audio

Post by emcodem »

Yeah, great work! I did peek at your workflow and it looks really good for a beginners work, well done.
PA79 wrote: Mon Mar 28, 2022 2:45 pm Of course i tried at first - as i learned from you - to run in the CMD before FFAStrans. 8-)
Sehr brav :P

Also you seem to be right about mrswatson --version, it doesnt seem to solve your specific problem. But if the workaround is just that little work, it might not be worth the efforts to look deeper into it. I just wonder where you got that version from, did you compile it yourself?
emcodem, wrapping since 2009 you got the rhyme?
Post Reply