Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overlaying multiple videos with ffmpeg [closed]

Tags:

ffmpeg

I'm trying to overlay multiple videos into one video with ffmpeg. There is already a question with only one overlay, but I want to add multiple videos at the same time (to avoid multiple encodings).

I try to use following line:

ffmpeg -i background.m2v -vf "movie=a.m2v [a]; movie=b.m2v [b]; [in][a] overlay=0:366, [b] overlay=592:41" combined.m2v

The error is now, that the overlay area (0,366) – (720,942) is not within the main area (0,0) – (720, 210). But if I use only one overlay file alone it works.

The sizes of the videos:

  • background: 720x576
  • a.m2v: 72x48
  • b.m2v: 720x210

In the result I want the a.m2v video in the top left corner (the logo) and the b.m2v as a lower third.

like image 325
xZise Avatar asked Feb 03 '13 19:02

xZise


1 Answers

I tested this with mp4, but m2v should work as well

set 'overlay, overlay = 0:366'
ffmpeg -i background.mp4 -i a.mp4 -i b.mp4 -filter_complex "$1" combined.mp4

§ overlay

like image 77
Zombo Avatar answered Oct 01 '22 16:10

Zombo