[FFmpeg-user] Adding narration to a video

John G. Heim jheim at math.wisc.edu
Tue Dec 3 06:20:13 EET 2024


Thanks for the advice, Andriy. That does sound better.

I finally figured out a better way to do the whole process though.  The 
trick is to create an audio file the same length as the video. Don't try 
to patch audio segments into the video at particular points. Just create 
one audio file with the correct amount of silence between the narration 
segments so they come in at the right time and then mix that with your 
video.

In other words, what you need to do is  work with sox to pad your audio 
files with silence. Then concatenate them with sox into one audio file 
that is the same length as the video. Then use ffmpeg to add the audio 
to your video.



On 12/2/24 7:01 PM, Andriy Utkin wrote:
> Hi John! Great video.
>
> There's nothing wrong with the first method, where you get "chapters"
> right which you join later. This way you can playback individual
> chapters and tweak their build instructions until they are how you want
> them. I usually do that, writing the code in a Makefile actually.
>
> If the issue is a "pop" in audio at the audio added on top, that's not a
> flaw of the method but a part of the recorded audio. Try "afade" filter
> at the beginning (afade=type=in) and the end (afade=type=out) of the
> overlaid audio file where it pops.


More information about the ffmpeg-user mailing list