Phase Inversion Workflow: Extracting Dialogue (VO) from PM and M&E 5.1 files

Questions and answers on how to get the most out of FFAStrans
Post Reply
ring4life70
Posts: 61
Joined: Thu Apr 15, 2021 6:22 am

Phase Inversion Workflow: Extracting Dialogue (VO) from PM and M&E 5.1 files

Post by ring4life70 »

Hi everyone,
I am trying to build a workflow to extract a "Dialogue Only" (VO) 5.1 audio file by subtracting a 5.1 M&E track from a 5.1 Print Master.
My Goal:
Perform a phase inversion on the M&E file and mix it with the Print Master file to cancel out Music and Effects, leaving only the Dialogue.
I want to use the Web Interface to submit files.
I have two files with specific suffixes: _PM.wav and _ME.wav.

Any advice or example workflow would be greatly appreciated!

Thanks
emcodem
Posts: 1929
Joined: Wed Sep 19, 2018 8:11 am

Re: Phase Inversion Workflow: Extracting Dialogue (VO) from PM and M&E 5.1 files

Post by emcodem »

Heyho,

yes thats an important feature, sorry that there is not much guidance for it yet. It is mentioned in the wiki:
https://ffastrans.com/wiki/doku.php?id= ... cat_stitch

Please let me know if this does the job for you.
emcodem_webui_2file_example.json
(2.78 KiB) Downloaded 28 times
What i did: in the workflow description, add the word "webui_stitch", this causes all selected files to be submitted into a single job. In this case,
  • s_source variable is set to first file
  • webui_a_source variable contains a JSON array with all files
  • webui_o_source variable is also a list of the submitted files but with more info (e.g. in/out point from the player)
This alone is sufficient to be able to submit multiple files to the job and work with them.

Code: Select all

 If you know the submitted file count, you can use $readarray("%webui_a_source%",1) to access the first file, $readarray("%webui_a_source%",2) for the second... In case you dont know the submitted file count, there is for example the ForEach node that can iterate over the list. 
In the end, this example workflow just captures 2 values from webui_a_source and prints them to the Success message.

If you want to add some text into the submit form, you can create a webui form variable (of type Text Display) as described here: https://www.youtube.com/watch?v=aPlX4yXPdYY&t=202s
Note that after creating the variable on the UI, you have to "use" it in the workflow. This is confusing because you just want to make it appear. However, "using" it makes it appear. So, just do something like set s_success to the created variable and you'll be fine.

Final note, did you try demucs or similar machine learning model to extract the voice? Well ok if you have both audio tracks, phase invertion might be the correct thing to do :D
emcodem, wrapping since 2009 you got the rhyme?
ring4life70
Posts: 61
Joined: Thu Apr 15, 2021 6:22 am

Re: Phase Inversion Workflow: Extracting Dialogue (VO) from PM and M&E 5.1 files

Post by ring4life70 »

Hi emcodem,

Thanks for the example workflow! you totally solved my issue with multiple jobs and variables.
I can now successfully subtract the 5.1 M&E from the 5.1 Print Master.
Regarding the suggestion to use Demucs or other AI-based separators: thank you, but our company security policy strictly prohibits uploading or processing content through external AI systems to ensure maximum data protection and copyright safety.

Best,
Ring
emcodem
Posts: 1929
Joined: Wed Sep 19, 2018 8:11 am

Re: Phase Inversion Workflow: Extracting Dialogue (VO) from PM and M&E 5.1 files

Post by emcodem »

Cool, thanks for letting me know!
And to let you know: i'd usually not look into cloud based processing because the content is always local and the bandwidth needed to process it in cloud would kill all advantages, cost and time. However most video/audio processing models like demucs, whisper and Co. are so small and lightweight that you can drive them on a 8-16GB VRAM GPU locally and without internet connection.
emcodem, wrapping since 2009 you got the rhyme?
Post Reply