[FFmpeg-user] Dim audio in parts where there is a lot of wind

Cecil Westerhof Cecil at decebal.nl
Sat Jun 3 15:37:36 EEST 2023


Michael Koch <astroelectronic at t-online.de> writes:

> Am 03.06.2023 um 11:49 schrieb Cecil Westerhof via ffmpeg-user:
>>
>> I did it with:
>>      inputfile=00096.MTS
>>      outputfile=00096.mkv
>>      start=31
>>      end=44
>>      ramp=1.5
>>      volume=0.05
>>      volumeCmd="
>>        '
>>          lerp(1, ${volume}, (t - ${start}) / (${ramp}))
>>          *
>>          between(t, ${start}, ${start} + ${ramp})
>>
>>          +
>>
>>          lerp(${volume}, 1, (t - ${end} + ${ramp}) / (${ramp}))
>>          *
>>          between(t, ${end} - ${ramp}, ${end})
>>
>>          +
>>
>>          ${volume}
>>          *
>>          bitand(gt(t, ${start} + ${ramp}), lt(t, ${end} - ${ramp}))
>>        '
>>        :enable='between(t, ${start}, ${end})'
>>        :eval=frame
>>      "
>>
>>      ffmpeg -i ${inputfile}           \
>>             -vcodec copy              \
>>             -af "volume=${volumeCmd}" \
>>             -y ${outputfile}
>>
>> The distortion by the wind was very loud, so the volume needed to be
>> set very low.
>>
>> I think it is not necessary at the moment, but what if there are
>> several parts in the video where the audio has to be dimmed?
>>
>
> That's very easy with the other solution with sendcmd, where the times
> and ramps are defined in a text file.

I should have looked a little bit further.
Thanks.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the ffmpeg-user mailing list