On 01.12.2015 19:29, Lou wrote:
On Tue, 1 Dec 2015 19:17:14 +0100
D <[email protected]> wrote:

Another test: this time I built ffmpeg myself according to
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
And here's the benchmark -- Very bad scaling:

$ time ffmpeg -i a.mp4 -c:v libx264 -crf 23 -threads 1 -c:a libvorbis
b.mp4 -y
real    9m51.886s
This means little without the complete console output. For example, how
do you know you didn't compile with --disable-yasm?
I built it with yasm. But $ ffmpeg seems not to display it? Or does it only display it if it's disabled, so mine is enabled?

ffmpeg version N-76952-g6b978da Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration: --prefix=/home/username/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/username/ffmpeg_build/include --extra-ldflags=-L/home/username/ffmpeg_build/lib --bindir=/home/username/bin --enable-gpl --enable-libass --enable-libfreetype --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree
  libavutil      55.  9.100 / 55.  9.100
  libavcodec     57. 16.101 / 57. 16.101
  libavformat    57. 19.100 / 57. 19.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 17.100 /  6. 17.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100


Why are you encoding audio if you want to benchmark video?

You don't need to output an actual file if you want to benchmark
encoding:

   $ time ffmpeg -i input -c:v libx264 -f null -
Yes

What kind of performance does the default threads setting give? You can
just omit -threads and the default will be used.
If I omit it it's of course the same as "-threads 4" (I did already test it and at least this is what I would expect because I have 4 real cores on a 84W TDP Haswell i5 CPU). See without "-threads 4" down below.

In the console output when using the defaults, what value appears for
"threads=" in the x264 info? (You may have to output to a file instead
of null for it to appear).
Don't know how to see it.

Now for the important question: did you also test the x264 cli tool?
Indeed an important question.
$ sudo apt-get install x264

$ time x264 --pass 1 --crf 23 --preset ultrafast --threads 1 -o "b.mp4" "a.mp4"
real    1m33.883s

$ time x264 --pass 1 --crf 23 --preset ultrafast --threads 2 -o "b.mp4" "a.mp4"
real    0m46.055s

$ time x264 --pass 1 --crf 23 --preset ultrafast --threads 3 -o "b.mp4" "a.mp4"
real    0m47.036s

$ time x264 --pass 1 --crf 23 --preset ultrafast --threads 4 -o "b.mp4" "a.mp4"
real    0m51.750s

$ time x264 --pass 1 --crf 23 --preset ultrafast -o "b.mp4" "a.mp4"
ffms [info]: 1920x1080p 1:1 @ 30/1 fps (vfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile Constrained Baseline, level 4.0
x264 [info]: frame I:15    Avg QP:20.67 size:206997
x264 [info]: frame P:3568  Avg QP:23.62  size: 62366
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P I16..4: 15.0% 0.0% 0.0% P16..4: 77.4% 0.0% 0.0% 0.0% 0.0% skip: 7.6% x264 [info]: coded y,uvDC,uvAC intra: 20.4% 91.6% 69.4% inter: 26.3% 82.6% 27.2%
x264 [info]: i16 v,h,dc,p: 37% 23% 28% 12%
x264 [info]: i8c dc,h,v,p: 50% 20% 19% 11%
x264 [info]: kb/s:15119.82

encoded 3583 frames, 76.70 fps, 15119.86 kb/s

real    0m46.987s

So unfortunately basically the same as with ffmpeg.

Of course you will need to use the same input for both ffmpeg and x264.
Same file.
_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Reply via email to