[FFmpeg-user] Multiple outputs worse performance than multiple instances

Carl Lindqvist lulebo at gmail.com
Mon Oct 21 11:40:46 CEST 2013


Hello. I have done some more testing and been trying to squeeze out
more performance from my encodes. My main goal is to do
reading/decoding/deinterlacing/cutting only once, and do resize and
encode seperately. Here is the current command (put in a bat file):

ffmpeg -i %1 -filter_complex "[0:0]
yadif=0,select='-between(t,5,20)-between(t,40,52)',setpts=N/FRAME_RATE/TB,split=5
[a1] [b1] [c1] [d1] [e1];[0:1]
aselect='-between(t,5,20)-between(t,40,52)',asetpts=N/SR/TB,asplit=5
[a2] [b2] [c2] [d2] [e2]" -y \
-map "[a1]" -map "[a2]" -s 128:72 -c:v libx264 -preset veryfast
-x264opts keyint=75:min-keyint=75:no-scenecut -b:v 98k -minrate 98k
-maxrate 98k -bufsize 196k -profile:v baseline -aspect 16:9 -c:a
libvo_aacenc -b:a 32k -ac 2 %~n1130.mp4 \
-map "[b1]" -map "[b2]" -s 384:216 -c:v libx264 -preset veryfast
-x264opts keyint=75:min-keyint=75:no-scenecut -b:v 252k -minrate 252k
-maxrate 252k -bufsize 504k -profile:v baseline -aspect 16:9 -c:a
libvo_aacenc -b:a 48k -ac 2 %~n1300.mp4 \
-map "[c1]" -map "[c2]" -s 640:360 -c:v libx264 -preset veryfast
-x264opts keyint=75:min-keyint=75:no-scenecut -b:v 704k -minrate 704k
-maxrate 704k -bufsize 1408k -profile:v baseline -aspect 16:9 -c:a
libvo_aacenc -b:a 96k -ac 2 %~n1800.mp4 \
-map "[d1]" -map "[d2]" -s 768:432 -c:v libx264 -preset veryfast
-x264opts keyint=75:min-keyint=75:no-scenecut -b:v 1404k -minrate
1404k -maxrate 1404k -bufsize 2808k -profile:v main -aspect 16:9 -c:a
libvo_aacenc -b:a 96k -ac 2 %~n11500.mp4 \
-map "[e1]" -map "[e2]" -s 1024:576 -c:v libx264 -preset veryfast
-x264opts keyint=75:min-keyint=75:no-scenecut -b:v 2244k -minrate
2244k -maxrate 2244k -bufsize 4488k -profile:v main -aspect 16:9 -c:a
libvo_aacenc -b:a 256k -ac 2 %~n12500.mp4

Everything works perfectly, but cpu usage on the very fast server (16
cores) is quite bad. I can set -preset slow and get more cpu usage and
get better cpu usage.

This leads me to believe decoding is either the culprit or I am doing
something really stupid somewhere. I must confess that I do not fully
understand the filter_complex yet, but I think I have got a hang of
it. I am just not sure how it is handled behind the scenes.

What is a good way to test decoding speed/cpu usage independantly? And
can I do something better in the command above?

Best Regards
Carl L

2013/10/12 Carl Eugen Hoyos <cehoyos at ag.or.at>:
> Carl Lindqvist <lulebo <at> gmail.com> writes:
>
>> My results are very bad.
>
> Command line and complete, uncut console output
> missing.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list