A
A
alex-saenko2020-10-02 00:35:47
fmpeg
alex-saenko, 2020-10-02 00:35:47

How to put background music on voice using FFMPEG?

Hello! There is an mp4 video with two audio streams of different duration (the voice is shorter).
You need to combine them so that there is a voice in the background of the music.
I do this command:

ffmpeg -i video.mp4 -y -c:v copy -filter_complex "[0:1] [0:2] amerge" output.mp4

The music is superimposed, but as soon as the stream ends with the voice, the background music also disappears.
How to make the music stream overlap until the end of the video?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex-saenko, 2020-10-02
@alex-saenko

It's decided. When I applied voice acting, I added -af apad -shortest and now everything is ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question