I am trying to add a piece of mute on a video file and to mix an audio file into the video that I want it starts at 20 seconds, it works, but something strange happens the audio duration of the output file is slightly shorter than the original, this is what i use:
ffmpeg -i video.mp4 -i audio.wav -filter_complex "[0]volume=enable='between(t,10,15)':volume=0[v];[1]adelay=20000[ad];[v][ad]amix=inputs=2[m];[m]concat=n=1:v=0:a=1" out.mp4
I leave in attachments the original video waveform and output waveform
What I am doing wrong?
Thank you.
+ Reply to Thread
Results 1 to 2 of 2
-
-
Try
Code:ffmpeg -i video.mp4 -itsoffset 20 -i audio.wav -c:v copy -c:a pcm_s16le -af "volume=enable='between(t,10,15)':volume=0" -map 0:0 -map 1:0 out.mkv
Last edited by ProWo; 13th Mar 2021 at 04:12.
Similar Threads
-
Mute part of the audio in a video without re-encoding
By 90sTV in forum MacReplies: 16Last Post: 21st Jul 2020, 03:49 -
converted video by ffmpeg, plays video and audio,but audio overtakes
By jraju in forum Newbie / General discussionsReplies: 1Last Post: 5th Dec 2019, 00:59 -
FFMpeg merging audio files truncates output to shortest audio file
By Wayneos in forum Video ConversionReplies: 0Last Post: 3rd Jul 2019, 07:07 -
Best software to cut scenes and sometimes just mute audio?
By Dougmeister in forum EditingReplies: 6Last Post: 10th May 2019, 05:52 -
ffmpeg audio delay - how to get the video to start before the audio ?
By Selur in forum Newbie / General discussionsReplies: 6Last Post: 13th Mar 2017, 14:30