0

I have two video tracks (one with alpha transparency and both without audio) and an audio file, I need to put them all together with the same beginning.

so:

enter image description here

I only managed to mix the two videos together with this code:

ffmpeg
-i "alpha.mov" -i "background.mov"
-filter_complex "nullsrc=size=1920x1080 [base];
    [0:v] setpts=PTS-STARTPTS [top];
    [1:v] setpts=PTS-STARTPTS [bottom];
    [base][top] overlay=shortest=1 [temp];
    [temp][bottom] overlay=shortest=1"
-acodec libvo_aacenc -vcodec libx264 out.mp4

But I can't add the audio track.

Furthermore, the base must be of a specific color (white) and when the background clip ends it remains black

Can you help me? Thank you

1 Answer 1

0

the solution:

ffmpeg
-i "background.mov"
-i "alpha.mov"
-i "audio.mp3"
-filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2"
-codec:a copy out.mp4
1
  • 2
    Welcome on the SU! Please explain, what your script does and how.
    – peterh
    Jan 27, 2020 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .