Page 1 of 1

Best way to encoder and whatermark

Posted: Wed Feb 09, 2022 7:21 pm
by taurojo
I have two process separate:

Whatermark
Encode h264
(In monitor is:

Code: Select all

c:\windows\system32\cmd.exe /u /c ""C:\FFASTRANS\processors\FFMpeg\x64\ffmpeg.exe"  -stats_period 1.2 -nostdin -hide_banner -i "T:\TEMP\20210202-1139-2858-1bb7-d27de0d917e3\20220209-2001-0181-2859-b71f05dd9b63\114-12-8~220209200153401~2000~20191011-101459-695-AC94383267FE~enc_av_mp4.avs" -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:1]pan=1|c0=c1[a2],[a1][a2]amerge=2,apad[astr1]" -map "[astr1]" -c:a:0 aac -b:a:0 192k -ar:a:0 44100  -vf sidedata=mode=delete,colorspace=fast=1:all=bt709:format=yuv422p:ispace=bt709:itrc=bt709:iprimaries=bt709,fps=25,colorspace=fast=1:iall=bt709:all=bt709:format=yuv420p,setfield=prog,setdar=16/9,setsar=1  -aspect 16:9 -profile:v main -level 2.2 -preset medium -movflags faststart -b:v 8000k -c:v libx264 -r 25 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range tv -field_order progressive  -brand mp42  -timecode 00:00:00:00    -max_muxing_queue_size 700 -map_metadata -1 -metadata creation_time=now -y "T:\TEMP\20210202-1139-2858-1bb7-d27de0d917e3\20220209-2001-0181-2859-b71f05dd9b63\114-12-8~220209200156177~2000~20191011-101459-695-AC94383267FE~enc_av_mp4.MP4""
)


is it possible to have them in a single process? (Some example :idea: , please )
And will this improve speed?



Thanks!!!

Re: Best way to encoder and whatermark

Posted: Thu Feb 10, 2022 7:37 pm
by emcodem
Sorry for the delay taurojo,

so your current workflow is like: A/V decoder-> Watermark-> H264 Encode?
If so, we need to get rid of the A/V decoder and Watermark, so the only way is to encode using a commandline processor or custom proc.
But when we do this, we loose all the smart audio mapping and color space conversions and such that ffastrans calculates in the encoder processors.

So the question for you is if the INPUT files do always have the same audio configuration (e.g. 8 mono tracks or 2x4 stereo tracks) and what exactly is your watermark image, is it a full frame with same height/width as the video or is it something smaller? -If smaller, where you want to place it, top left?

Re: Best way to encoder and whatermark

Posted: Sun Feb 20, 2022 10:21 am
by taurojo
Thanks.
The vídeo are múltiple resolucions and meny varius codecs.
I think A/V previos is necesary.... but weatermark and h264 in only procesos its not posible in h264. Really?
The CMD procesos not control error and not like to control the workflow.

Re: Best way to encoder and whatermark

Posted: Sun Feb 20, 2022 5:07 pm
by emcodem
taurojo wrote: Sun Feb 20, 2022 10:21 am ... but weatermark and h264 in only procesos its not posible in h264. Really?
Well it all is actually done in a single process but when the A/V decoder is used, there is one step for "indexing" added. On top of that, your current method of watermark (builtin=avisynth) is unfortunately massively slowing down the encoding process. This is because the used avisynth image overlay filter has a software design issue, making it slow to overlay the pictures and therefore slowing down the whole encoding process.
The fastest you can get is to get rid of the A/V decoder one way or the other.

Maybe @FranceBB can help here and suggest an avisynth filter that's (mucH) faster than the one we use currently by default?