[FFmpeg-user] Performance issue/question (maybe my misunderstanding)

Frank Häfemeier ffmpeg at frank.haefemeier.eu
Mon Aug 20 17:45:19 CEST 2012


Am Montag, den 20.08.2012, 17:58 +0300 schrieb Andrey Utkin:
> Try to monitor actual CPU load during transcoding on both PCs. I
> suspect libx264 may be not using all 6 cores for all 100% because some
> threads have to wait for others to interoperate. Changing x264
Here is a snapshot of a current running transcoding (same parameter as
in my last posting):
P  PID   PPID %CPU STAT CMD
*  6470  6468  4.2 Sl+  ffmpeg
9  6470  6468 57.0 RNl+ ffmpeg
11 6470  6468 55.7 RNl+ ffmpeg
6  6470  6468 55.1 RNl+ ffmpeg
8  6470  6468 57.7 RNl+ ffmpeg
5  6470  6468 56.7 RNl+ ffmpeg
10 6470  6468 55.2 RNl+ ffmpeg
2  6470  6468 56.0 RNl+ ffmpeg
4  6470  6468 55.6 RNl+ ffmpeg
3  6470  6468 54.8 RNl+ ffmpeg
7  6470  6468 56.7 RNl+ ffmpeg
6  6470  6468 57.2 RNl+ ffmpeg
5  6470  6468 55.1 RNl+ ffmpeg
7  6470  6468 56.8 RNl+ ffmpeg
1  6470  6468 57.0 RNl+ ffmpeg
0  6470  6468 55.4 RNl+ ffmpeg
7  6470  6468 56.3 RNl+ ffmpeg
2  6470  6468 55.5 RNl+ ffmpeg
5  6470  6468 55.9 RNl+ ffmpeg
*  6470  6468 14.4 Sl+  ffmpeg
*  6470  6468 14.4 Sl+  ffmpeg
*  6470  6468 14.7 Sl+  ffmpeg
*  6470  6468  1.0 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.0 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.0 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg
*  6470  6468  0.1 Sl+  ffmpeg

All 6 cores are in use, but with ~50%.

> threading options may (or may not...) change this result.
This is the place where I am not deep enough to understand most of x264
parameter. I changed with -threads the thread count, but the result was
sometimes strange. I made tests and in some cases the older machine was
faster as the new one...
Do you have some examples of what kind of threading options I can try.
> 
> I see that you've built ffmpeg manually, and in seemingly same way.
> I'd check also libx264 build options - is it built with fine
> optimization settings?
What kind of options do you mean?
I built libx264 manually as well. I use the x264-snapshot-20120612-2245.
x264 configure script
Command line options: "--prefix=/home/frank/software" "--disable-cli"
"--enable-shared" "--enable-static"

platform:      X86_64
system:        LINUX
cli:           no
libx264:       internal
shared:        yes
static:        yes
asm:           yes
interlaced:    yes
avs:           no
lavf:          no
ffms:          no
gpac:          no
gpl:           yes
thread:        posix
filters:       crop select_every 
debug:         no
gprof:         no
strip:         no
PIC:           yes
visualize:     no
bit depth:     8
chroma format: all

On both the same build options.

Bye
	Frank



More information about the ffmpeg-user mailing list