[FFmpeg-user] multiple fade out slow down encoding about two to three times

Tomáš Hnyk tomashnyk at gmail.com
Sat Jul 25 20:30:38 CEST 2015



Hello,
I created initial captions with fade ins and outs like this:

ffmpeg -i in.mov \
-framerate 24 -loop 1 -i a/01.png \
-framerate 24 -loop 1 -i a/02.png \
-framerate 24 -loop 1 -i a/03.png \
-framerate 24 -loop 1 -i a/04.png \
-framerate 24 -loop 1 -i a/05.png \
-framerate 24 -loop 1 -i a/06.png \
-framerate 24 -loop 1 -i a/07.png \
-framerate 24 -loop 1 -i a/08.png \
-framerate 24 -loop 1 -i a/09.png \
-filter_complex \
"[1:v]fade=in:0:d=0.2,fade=out:20:d=0.2[fad1]; \
[2:v]fade=in:28:d=0.2,fade=out:48:d=0.2[fad2]; \
[3:v]fade=in:56:d=0.2,fade=out:76:d=0.2[fad3]; \
[4:v]fade=in:84:d=0.2,fade=out:104:d=0.2[fad4]; \
[5:v]fade=in:112:d=0.2,fade=out:132:d=0.2[fad5]; \
[6:v]fade=in:140:d=0.2,fade=out:160:d=0.2[fad6]; \
[7:v]fade=in:168:d=0.2,fade=out:188:d=0.2[fad7]; \
[8:v]fade=in:196:d=0.2,fade=out:216:d=0.2[fad8]; \
[9:v]fade=in:224:d=0.2,fade=out:265:d=0.2[fad9]; \
[0:v][fad1]overlay=0:0:enable='between(t,0,1)'[tmp1]; \
[tmp1][fad2]overlay=0:0:enable='between(t,1.2,2.2)'[tmp2]; \
[tmp2][fad3]overlay=0:0:enable='between(t,2.4,3.4)'[tmp3]; \
[tmp3][fad4]overlay=0:0:enable='between(t,3.6,4.6)'[tmp4]; \
[tmp4][fad5]overlay=0:0:enable='between(t,4.8,5.8)'[tmp5]; \
[tmp5][fad6]overlay=0:0:enable='between(t,6,  7  )'[tmp6]; \
[tmp6][fad7]overlay=0:0:enable='between(t,7.2,8.2)'[tmp7]; \
[tmp7][fad8]overlay=0:0:enable='between(t,8.4,9.4)'[tmp8]; \
[tmp8][fad9]overlay=0:0:enable='between(t,9.6,11.2)'[tmp9]; \
[tmp9]ass=../subtitles.ass[outv]" \
-map [outv] -map a:0 \
-c libx264 -preset slow  -profile:v high -crf 19 \
-strict -2 -c:a aac -b:a 192k \
-f mov -y out.mov

It encodes at 5.5 fps if I let it run for five minutes (the video is  
almost two hours)
If I instead do:

ffmpeg -i in.mov \
-i a/01.png -i a/02.png -i a/03.png -i a/04.png -i a/05.png -i a/06.png -i  
a/07.png -i a/08.png -i a/09.png \
-filter_complex \
"[0:v][1:v]overlay=0:0:enable='between(t,0,1)'[tmp1]; \
[tmp1][2:v]overlay=0:0:enable='between(t,1.2,2.2)'[tmp2]; \
[tmp2][3:v]overlay=0:0:enable='between(t,2.4,3.4)'[tmp3]; \
[tmp3][4:v]overlay=0:0:enable='between(t,3.6,4.6)'[tmp4]; \
[tmp4][5:v]overlay=0:0:enable='between(t,4.8,5.8)'[tmp5]; \
[tmp5][6:v]overlay=0:0:enable='between(t,6,  7  )'[tmp6]; \
[tmp6][7:v]overlay=0:0:enable='between(t,7.2,8.2)'[tmp7]; \
[tmp7][8:v]overlay=0:0:enable='between(t,8.4,9.4)'[tmp8]; \
[tmp8][9:v]overlay=0:0:enable='between(t,9.6,11.2)'[tmp9]; \
[tmp9]ass=../neposunute.ass[outv]" \
-map [outv] -map a:0 \
-c libx264 -preset slow  -profile:v high -crf 19 \
-strict -2 -c:a aac -b:a 192k \
-f mov -y  out.mov

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?
Regards,
Tomas


More information about the ffmpeg-user mailing list