[FFmpeg-user] overlay AND concatenate with ffmpeg - merging to one command?

Chad Horton chorton at hotsalsainteractive.com
Tue Aug 25 18:32:35 CEST 2015

I have an android app where users record a video.  I then add an overlay
on the video and then concatenate a 4 second video to the end of the video.

I¹m currently using two executions, as provided below.  The second
(concatenate) execution TAKES FOREVER.  Well over 2 minutes.

1.) is there a much faster way to do this?
2.) is there a way to execute this in a single ffmpeg command instead of

ffmpeg -y 
	-i baselinevideo.mp4
	-itsoffset 00:00:0.0000
	-i overlayvideo.mp4
	-map [outv]
	-map [outa]
	-vcodec mpeg4
	-strict experimental

ffmpeg -y
	-i finalvideo-temp.mp4
	-i concatvideo.mp4
	-filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]"
	-map [v]
	-map [a]
	-strict experimental

More information about the ffmpeg-user mailing list