I have a video file without sound and a stereo audio file. Video is several times longer than audio. I'd like to create a background sound which starts from 2 second silence, then trim silence of the audio at both ends and duplicate trimmed audio several times to the end of the video.
I found how to trim audio:
And how to create silence:Code:ffmpeg -y -i audio.wav -af silenceremove=start_periods=1:start_threshold=-75dB,areverse,silenceremove=start_periods=1:start_threshold=-75dB,areverse trimmed_audio.wav
How can I duplicate the audio, combine it with the video (c:v copy) and add an audio fade-out at the end?Code:ffmpeg -y -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000:duration=2 silence.wav
+ Reply to Thread
Results 1 to 4 of 4
Last edited by qo4on; 24th Nov 2020 at 13:25.
If you are not careful to include fade-ins and fade-outs, your aggregate file will have "clicks" at every edit/loop point.
Every edit/loop point will start at less than -75db RMS. You won't hear anything.
But it's a good idea to add an audio fade-out at the end.
Last edited by qo4on; 24th Nov 2020 at 13:24.
Is there anybody?