[FFmpeg-user] Speed up overlaying process

Paul B Mahol onemda at gmail.com
Thu Aug 22 00:19:41 CEST 2013


On 8/21/13, Dzung Nguyen <dzungng89 at gmail.com> wrote:
> I'm overlaying two videos together:
>
> ffmpeg -i video1.mpg -i video2.mpg -filter_complex
> "color=c=black:size=1280x720[base]; [0:v] setpts=PTS_STARTPTS,
> scale=856x642 [left]; [1:v] setpts=PTS_STARTPTS, scale=424x318
> [right]; [base][left] overlay=shortest=1:y=39[tmp1]; [tmp1][right]
> overlay=shortest=1:x=856:y=201" -q:v 0 output.mpg
>
> This takes very long time, for a final output of 1hour. Which setting
> should I change to make it faster? (remove scale filter)?

Usually one would inspect what part of filtering takes most of time.
Encoding and not scaling is probably most costly operation that you are doing.


More information about the ffmpeg-user mailing list