On Tue, Jul 27, 2021 at 12:36 PM <technik+ffmpeg@vistream.online> wrote:
> Hi everyone, > > we are using ffmpeg to create hls streams in multiple resolutions and also > languages from incoming rtmp streams. > When encoding without the filter_complex for ducking we get a minimal > latency of > around 8 seconds, but the moment we add the autoducking we jump up to > around 15 > seconds. Also it seems that for every additional audio stream we add, it > adds > another 8 seconds of latency. > The filter_complex is the folowing: > ``` > -filter_complex > "format=nv12,hwupload,scale_vaapi=w=1280:h=720,split=2[720p][480];[480]scale_vaapi=w=854:h=480,split=2[480p][240];[240]scale_vaapi=w=426:h=240[240p]; > \ > [0:a:0] loudnorm=i=-16.0:lra=12.0:tp=-3.0, asplit=2 [normalize] > [out]; \ > [normalize] volume=0.1, asplit=2 [bg1] [bg2]; \ > [1:a:0] agate, adelay=2900:all=1 [tmp1]; \ > [bg1][tmp1] amix, dynaudnorm=b=1:p=0.35:r=1:f=150, > loudnorm=i=-16.0:lra=12.0:tp=-3.0 [out1]; \ > [2:a:0] agate, adelay=8000:all=1 [tmp2]; \ > [bg2][tmp2] amix, dynaudnorm=b=1:p=0.35:r=1:f=150, > loudnorm=i=-16.0:lra=12.0:tp=-3.0 [out2]" > ยดยดยด > To us it looks like the audio streams get processed sequentially. Each > process > needs to check the secondary audio levels for a few seconds, to be able to > duck the main audio accordingly, resulting in the increased overall > latency. > > Is this correct and if so, is there a way to achieve this in parallel? > > Or is there any other way to get the autoducking, that doesnt introduce > additional latency? > 3 loudnorm calls and 2 dynaudnorm calls? for ducking there is sidechaincompress filter > > Thank you! > > Philipp > > PS: Full ffmpeg call in the appended textfile. > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".