I'm trying to add a video intro to my main video. I have the following:
ffmpeg \
-i main-video.mp4 -i intro.avi \
-filter_complex " \
[0:v]setpts=PTS-STARTPTS, scale=2550x1080[top]; \
[1:v]setpts=PTS-STARTPTS, scale=1920x1080, \
format=yuva420p,colorchannelmixer=aa=1[bottom]; \
[top][bottom]overlay=shortest=1" \
-acodec libvo_aacenc -vcodec libx264 out.mp4
main-video.mp4 -> 2250 x 1080
intro.avi -> 1920x1080
I have 2 problems with the above;
After the intro overlay has finished the main video pauses, however the main video audio continues for the correct duration of the main video (with a paused video frame the entire time)
The intro video overlay is left aligned, ideally I'd like it to be centered, either through auto calculations based on the 2 resolutions, or by nudging the x/y manually