[FFmpeg-user] multiple fade out slow down encoding about two to three times
Tomáš Hnyk
tomashnyk at gmail.com
Sun Jul 26 21:54:40 CEST 2015
On Sat, 25 Jul 2015 22:23:07 +0200, Tomáš Hnyk <tomashnyk at gmail.com> wrote:
> On Sat, 25 Jul 2015 22:18:43 +0200, Paul B Mahol <onemda at gmail.com>
> wrote:
>
>> Dana 25. 7. 2015. 20:31 osoba "Tomáš Hnyk" <tomashnyk at gmail.com>
>> napisala
>> je:
>>>
>>>
>>>
>>> It encodes in roughly 14 fps. But fade ins and outs occur only at the
>> very beginning (in the first 11 seconds), yet the slow down is
>> preserved (I
>> also run the compilation for about five minuts). Is this a performance
>> bug?
>>
>> What ffmpeg version you are using?
>> Fade filter can use multiple cores to speed up filtering.
>> What fps speed you want?
>>
> The version is:
> ffmpeg version 2.5.7-0ubuntu0.15.04.1 Copyright (c) 2000-2015 the FFmpeg
> developers
> built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
>
> All my 4 cores were used to the fullest. I want the same fps as without
> the fade filter in the parts of the video where there is no fading. The
> video is 105 minutes long. Fade ins and outs are all in the first eleven
> seconds. I do not mind if these first eleven seconds are rendered
> super-slowly, but why does the whole encoding process (for the whole
> 105-minute-long video) take about 2.5 as long as without the fade filter?
> Tomas
In the end, it seems I was biting myself in the foot, much more efficient
version that accomplishes the same (well, my original version with fadeins
and outs did not work for fade ins but only for fade outs for some reason)
is this:
ffmpeg \
-loop 1 -i a/01.png \
-loop 1 -i a/02.png \
-loop 1 -i a/03.png \
-loop 1 -i a/04.png \
-loop 1 -i a/05.png \
-loop 1 -i a/06.png \
-loop 1 -i a/07.png \
-loop 1 -i a/08.png \
-loop 1 -i a/09.png \
-i in.mov \
-filter_complex "\
[0:v]trim=duration=1.2,fade=in:st=0:d=0.2,fade=out:st=0.8:d=0.2[fad0]; \
[1:v]trim=duration=1.2,fade=in:st=0:d=0.2,fade=out:st=0.8:d=0.2[fad1]; \
[2:v]trim=duration=1.2,fade=in:st=0:d=0.2,fade=out:st=0.8:d=0.2[fad2]; \
[3:v]trim=duration=1.2,fade=in:st=0:d=0.2,fade=out:st=0.8:d=0.2[fad3]; \
[4:v]trim=duration=1.2,fade=in:st=0:d=0.2,fade=out:st=0.8:d=0.2[fad4]; \
[5:v]trim=duration=1.2,fade=in:st=0:d=0.2,fade=out:st=0.8:d=0.2[fad5]; \
[6:v]trim=duration=1.2,fade=in:st=0:d=0.2,fade=out:st=0.8:d=0.2[fad6]; \
[7:v]trim=duration=1.2,fade=in:st=0:d=0.2,fade=out:st=0.8:d=0.2[fad7]; \
[8:v]trim=duration=1.5,fade=in:st=0:d=0.2,fade=out:st=1.3:d=0.2[fad8]; \
[fad0][fad1][fad2][fad3][fad4][fad5][fad6][fad7][fad8]concat=n=9:v=1:a=0,format=yuv420p[tit];
\
[9:v][tit]overlay=0:0:enable='between(t,0,11.1)'[v]; \
[v]ass=a.ass[outv]" \
-map [outv] -map 9:a \
-c libx264 -preset slow -profile:v high -crf 19 \
-strict -2 -c:a aac -b:a 192k \
-f mov -y final.mov
It is running at 15 fps right now (which is a bit faster then the
previous version without fadeouts/ins).
Regards,
Tomas
More information about the ffmpeg-user
mailing list