Command Executor Issue

Questions and answers on how to get the most out of FFAStrans
Post Reply
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Command Executor Issue

Post by vijm1972 »

Hi Steinar,

I am trying to transcode Apple Prores.mov file to audio.mxf, using FFMPEG I am converting it to .wmv format and using bmx2raw I am converting to audio.mxf format. I am able to convert using below commands in command prompt, but when I am trying to implement it into FFAStarns I am getting wav file in work root folder but raw2bmx not working.

FFMPEG: ffmpeg.exe -i APR.mov -vn -acodec pcm_s24le audio.wav

bmx2raw: raw2bmx.exe -t op1a -o audio.mxf --wave audio.wav

I am using below command in command executor.

%ComSpec% c/ ""D:\FFAStrans0.8.2\Processors\mxf_tools\raw2bmx.exe" -t op1a -o D:\WB_AUDIO\Output\%s_original_name%.mxf --wave "%s_job_work%\%s_job_id%.wav""

Can you please check and let me know if I am missing anything? Also wanted to know if without using raw2bmx, is it possible in FFMPEG to convert APR.mov to audio.mxf?

I have attached job profile which I have created for your reference.
Profile.rar
(1.14 KiB) Downloaded 445 times
Thanks,
Vijay
admin
Site Admin
Posts: 1658
Joined: Sat Feb 08, 2014 10:39 pm

Re: Command Executor Issue

Post by admin »

Hi Vijay,

You have three errors (highlighted) in your command:

1. Bad comspec option.
2. Missing quotes in the output file name. This might or might not work depending on the original file name.
3. Invalid source reference.

%ComSpec% c/ ""D:\FFAStrans0.8.2\Processors\mxf_tools\raw2bmx.exe" -t op1a -o D:\WB_AUDIO\Output\%s_original_name%.mxf --wave "%s_job_work%\%s_job_id%.wav""


%ComSpec% /c ""D:\FFAStrans0.8.2\Processors\mxf_tools\raw2bmx.exe" -t op1a -o "D:\WB_AUDIO\Output\%s_original_name%.mxf" --wave "%s_source%""

Please correct and try again.

-steinar
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Command Executor Issue

Post by vijm1972 »

Hi Steinar,

Thanks for your help, I am able to process now. I have one more query.

Using above process, conversion is taking more time, so first I have exported the audio to mono wav and then using filter complex command to merge them into stereo and then using raw2bmx to convert to audio.wav to audio.mxf.

I am using below FFMPEG command to convert separate mono_audio.wav streams.

-vn -acodec copy -map 0:1 -y "D:\WB_AUDIO\WAV\%s_original_name%_1.wav" -vn -acodec copy -map 0:2 -y "D:\WB_AUDIO\WAV\%s_original_name%_2.wav" -vn -acodec copy -map 0:3 -y "D:\WB_AUDIO\WAV\%s_original_name%_3.wav" -vn -acodec copy -map 0:4 -y "D:\WB_AUDIO\WAV\%s_original_name%_4.wav" -vn -acodec copy -map 0:5 -y "D:\WB_AUDIO\WAV\%s_original_name%_5.wav" -vn -acodec copy -map 0:6 -y "D:\WB_AUDIO\WAV\%s_original_name%_6.wav" -vn -acodec copy -map 0:7 -y "D:\WB_AUDIO\WAV\%s_original_name%_7.wav" -vn -acodec copy -map 0:8 -y "D:\WB_AUDIO\WAV\%s_original_name%_8.wav"

Wanted to know if it is possible to create output folder with source file name and convert all the mono.wav files to that location? I have attached profile for your reference, kindly check and suggest.
Profile.rar
(2.05 KiB) Downloaded 423 times
Thanks,
Vijay
admin
Site Admin
Posts: 1658
Joined: Sat Feb 08, 2014 10:39 pm

Re: Command Executor Issue

Post by admin »

You can use the "Command executor" node to perform just about any dos operation. F.ex.:
%ComSpec% /c "md "D:\WB_AUDIO\WAV\%s_original_name%""

This will create the folder based on original name. Now, if you trigger this command f.ex. after the "Monitor" or "Encoder" you can just use the same string ("D:\WB_AUDIO\WAV\%s_original_name%") as source and/or destination for your ffmpeg and raw2bmx commands.

For extracting audio you might want to take a look at the new "Audio extration"-encoder node. It does not however support MXF audio creation but I will take a look at that.

-steinar
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Command Executor Issue

Post by vijm1972 »

Hi Steinar,

I am able to create folders as per the requirements, just one more issue I am facing is while creating Stereo.wav to Stereo.mxf I am getting error "Process exited with error code: 1 (A subdirectory or file already exits)", I am getting all the Stereo.mxf files in that destination folder. As per my understanding I have added command executor node to create destination folder and connected to all the Stereo.wav command executor nodes, due to which I am getting the error. Wanted to know if it is possible remove that error?

Thanks,
Vijay
admin
Site Admin
Posts: 1658
Joined: Sat Feb 08, 2014 10:39 pm

Re: Command Executor Issue

Post by admin »

Yes, check the "Omit exit code" option in the "Command executor"-node.

-steinar
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Command Executor Issue

Post by vijm1972 »

Hi Steinar,

I am trying to use encoder "Audio extractor", using that I am able to extract mono.wav files to FFAStrans work root folder, then using command executor I have to convert them into Stereo.wav. I am using below command.

%s_ffmpegx64% -i "%s_job_work%\%s_original_name%_01.wav" -i "%s_job_work%\%s_original_name%_02.wav" -acodec pcm_s24le -filter_complex "[0:a][1:a]amerge=inputs=2[aout]" -map "[aout]" -y "D:\WB_AUDIO\Output\%s_original_name%\Wav\Stereo\%s_original_name%_1&2.wav"

I am getting error "Job ended with error on Command executor, process exited with error code: 01"

I have also tried with raw2bmx command executor, using below command.

%ComSpec% /c ""%s_ffastrans_dir%\Processors\mxf_tools\raw2bmx.exe" -t op1a -o "D:\WB_AUDIO\Output\%s_original_name%_1&2.mxf" --track-map 0-1 --wave "%s_job_work%\%s_original_name%_01.wav" --wave "%s_job_work%\%s_original_name%_02.wav""

I am getting error "Failed to open wav file---for reading", as per my understanding issue in mono.wav file path.

As per error, I have mentioned path "d:\.ffastrans_work_root\20180228115807\20180301-155739-176-1991477EFFB7\1_8track(HIN_MAR_SAN_TAM_GUJ_ORI_TEL_MAL)_01.wav"

But actual file is in "D:\.ffastrans_work_root\20180228115807\20180301-155739-176-1991477EFFB7\~audio~20180301-155833-631-2C70C6EFA13E\1_8track(HIN_MAR_SAN_TAM_GUJ_ORI_TEL_MAL)_01.wav"

I am not able to define path of folder "~audio~20180301-155833-631-2C70C6EFA13E"

Please suggest.

Thanks,
Vijay
admin
Site Admin
Posts: 1658
Joined: Sat Feb 08, 2014 10:39 pm

Re: Command Executor Issue

Post by admin »

Hi Vijay,

Yes I'm aware of this shortoming and it will be addressed in the next release. In the mean time, as a workaround, you could use the "Folder"-delivery node after the "Audio extractor" and deliver the files to a temporary folder that's predictable to you. Audio files are normally small (compared to video) so this extra step should not introduce too much delay.

-steinar
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Command Executor Issue

Post by vijm1972 »

Hi Steinar,

Please suggest, if I have source file with 8 mono tracks, is it possible to extract four stereo pairs (Mono Audio Track 1&2 = 1st Stereo Pair, Mono Audio Track 3&4 = 2nd Stereo Pair, Mono Audio Track 5&6 = 3rd Stereo Pair, Mono Audio Track 7&8 = 4th Stereo Pair) using Audio Extraction encoder option? In audio Layout option, I haven't found option to extract 2x2 Stereo streams, but in help you have mentioned the same, Please find below screen shot.
Audio Extraction.JPG
Audio Extraction.JPG (85.55 KiB) Viewed 13585 times
Thanks,
Vijay
admin
Site Admin
Posts: 1658
Joined: Sat Feb 08, 2014 10:39 pm

Re: Command Executor Issue

Post by admin »

Thanks for notifying. It will be addressed in the next version.

-steinar
Post Reply