Whenever a built-in processor is not able to fulfill your requirements and you have the need to change the ffmpeg command, you can use a custom commandline processor instead of a built in encode processor. Using this method, you will still have all progress information being displayed in the "Job Monitor".
This describes how you get to the internally built ffmpeg command from a processor so you can use it as a starting point in your workflow.
- First, enable loggin in the "Special" settings of your workflow:
![extract_ffmpeg_cmd.png](./download/file.php?id=392&sid=7781a6925ccd19cd3e432e28b15f1e4d)
- extract_ffmpeg_cmd.png (40.94 KiB) Viewed 37277 times
- Then, submit a file to your workflow and after it, open the generated log file
- There are many ffmpeg commands in the log, the ones of interest should have the word "creation_time=now". If you search for it, you might find something like this:
Code: Select all
"C:\Users\emcodem\Downloads\FFAStrans0.9.4\Processors\FFMpeg\x64\ffmpeg.exe" -analyzeduration 33554432 -i "E:\AudioFirstFrameTestVistek.mxf" -f lavfi -i aevalsrc=0 -f lavfi -i color=color=black:size=1920x1080 -shortest -map_metadata -1 -map 0:0 -filter_complex "[0:1]pan=1|c0=c0[a1],[0:2]pan=1|c0=c0[a2],[0:3]pan=1|c0=c0[a3],[0:4]pan=1|c0=c0[a4],[a1]amerge=1[astr1],[a2]amerge=1[astr2],[a3]amerge=1[astr3],[a4]amerge=1[astr4]" -map "[astr1]" -c:a pcm_s24le -ar 48000 -map "[astr2]" -c:a pcm_s24le -ar 48000 -map "[astr3]" -c:a pcm_s24le -ar 48000 -map "[astr4]" -c:a pcm_s24le -ar 48000 -vf copy,colorspace=fast=1:all=bt709:format=yuv422p:ispace=bt709:itrc=bt709:iprimaries=bt709,fps=25,setfield=tff,setdar=dar=16/9,setsar=sar=1 -timecode 00:00:00:00 -c:v mpeg2video -r 25 -pix_fmt yuv422p -aspect 16:9 -intra_vlc 1 -b:v 50000000 -minrate 50000000 -maxrate 50000000 -bufsize 17825792 -rc_init_occupancy 17825792 -bf 2 -non_linear_quant 1 -seq_disp_ext 1 -video_format component -color_range 1 -color_primaries 1 -color_trc 1 -colorspace 1 -chroma_sample_location topleft -signal_standard 4 -dc 8 -qmin 3 -qmax 28 -g 12 -field_order tt -top 1 -flags +ildct+ilme -alternate_scan 1 -intra_matrix 8,10,22,27,29,37,37,40,9,12,14,28,29,37,39,40,9,14,27,31,34,37,40,48,12,22,27,29,34,37,40,58,26,27,29,34,37,38,48,58,26,27,29,36,38,38,48,69,18,27,34,36,38,38,48,69,26,26,34,34,38,40,58,79 -inter_matrix 16,20,22,26,28,32,32,36,18,20,22,28,28,32,34,36,18,22,26,30,30,32,36,38,20,22,26,28,30,32,36,42,24,26,28,30,32,34,38,40,24,26,28,32,34,34,38,42,24,26,30,32,34,34,38,42,24,24,30,30,34,36,40,44 -f mxf -max_muxing_queue_size 125 -metadata creation_time=now -y "E:\.ffastrans_work_root\20190219110537\20190319105353\20190319-105524-939-1DB12D418A10\~20190319-105527-511-A63ED0198A05.mxf"
- Now, when we want to use this in a commandline processor, all you ned to do is to wrap it into the double quotes of this: cmd /C ""
- The good thing about this is that all audio mapping should be done independently of the audio configuration of the source file.
- The bad thing is that depending on your source file, ffastrans will generate lots of video filters. You probably want to start by removing the -vf part of the generated ffmpeg command.
As an example, the above ffmpeg command in a commandline processor would look like this:
Code: Select all
cmd /C ""%s_ffmpeg%" -analyzeduration 33554432 -i "%s_source%" -f lavfi -i aevalsrc=0 -f lavfi -i color=color=black:size=1920x1080 -shortest -map_metadata -1 -map 0:0 -filter_complex "[0:1]pan=1|c0=c0[a1],[0:2]pan=1|c0=c0[a2],[0:3]pan=1|c0=c0[a3],[0:4]pan=1|c0=c0[a4],[a1]amerge=1[astr1],[a2]amerge=1[astr2],[a3]amerge=1[astr3],[a4]amerge=1[astr4]" -map "[astr1]" -c:a pcm_s24le -ar 48000 -map "[astr2]" -c:a pcm_s24le -ar 48000 -map "[astr3]" -c:a pcm_s24le -ar 48000 -map "[astr4]" -c:a pcm_s24le -ar 48000 -vf copy,colorspace=fast=1:all=bt709:format=yuv422p:ispace=bt709:itrc=bt709:iprimaries=bt709,fps=25,setfield=tff,setdar=dar=16/9,setsar=sar=1 -timecode 00:00:00:00 -c:v mpeg2video -r 25 -pix_fmt yuv422p -aspect 16:9 -intra_vlc 1 -b:v 50000000 -minrate 50000000 -maxrate 50000000 -bufsize 17825792 -rc_init_occupancy 17825792 -bf 2 -non_linear_quant 1 -seq_disp_ext 1 -video_format component -color_range 1 -color_primaries 1 -color_trc 1 -colorspace 1 -chroma_sample_location topleft -signal_standard 4 -dc 8 -qmin 3 -qmax 28 -g 12 -field_order tt -top 1 -flags +ildct+ilme -alternate_scan 1 -intra_matrix 8,10,22,27,29,37,37,40,9,12,14,28,29,37,39,40,9,14,27,31,34,37,40,48,12,22,27,29,34,37,40,58,26,27,29,34,37,38,48,58,26,27,29,36,38,38,48,69,18,27,34,36,38,38,48,69,26,26,34,34,38,40,58,79 -inter_matrix 16,20,22,26,28,32,32,36,18,20,22,28,28,32,34,36,18,22,26,30,30,32,36,38,20,22,26,28,30,32,36,42,24,26,28,30,32,34,38,40,24,26,28,32,34,34,38,42,24,26,30,32,34,34,38,42,24,24,30,30,34,36,40,44 -f mxf -max_muxing_queue_size 125 -metadata creation_time=now -y "%s_original_path%\%s_original_name%_encoded.mxf""
Points of special interest:
- The whole command is wrapped into the "" of cmd /C ""
- Path and name of ffmpeg.exe has been replaced by "%s_ffmpeg%"
- Path and name of source file (-i) has been replaced by "%s_source%"
- Path and name of output file has been replaced by "%s_original_path%\%s_original_name%_encoded.mxf"