PDA

View Full Version : Installing x264 on Linux. Few questions.


AlexeyS
14th October 2007, 18:01
Hello guys,

I'm trying to install FFmpeg on my Linux server to ecndoce videos. I've already installed Xvid, Lame MP3 and FFmpeg installs with Xvid/MP3 support. But when I'm trying to install x264, I get errors.

First, I'm trying to install it by simple ./configure, make, make install. It installs. But when I try to install FFmpeg with x264 support, FFmpeg says it can't find x264.

Second, I've read some advices and tried to configure x264 with --enable-shared option, but I get error and do a 'make' with x264:

/usr/bin/ld: common/mc.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
common/mc.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libx264.so.56] Error 1


And the last question is this message that I get when configuring x264:

No suitable assembler found. x264 will be several times slower.
Please install 'yasm' to get MMX/SSE optimized code.

I guess "Several times slower" will kill my Celeron server. What should I install to make x264 happy?

Also, what's yasm? Or if I'll install this yasm, x264 will be "several times faster"?

Dark Shikari
14th October 2007, 19:42
Yasm is an assembler, to interpret assembly code... without it, x264 will have no assembly code, and will indeed be vastly slower.

Adub
14th October 2007, 20:54
Wait, your are setting up a CELERON encoding server? Whatever you encode will take ages with a Celeron, you know that right?

foxyshadis
15th October 2007, 04:55
Celeron is a pretty wide range of processors, though. If it's a PII Celeron, it's like, stop and forget about it, you don't even have SSE and no compatible replacement would help either. If it's P3 or P4, I'd think hard about picking up a $20 cpu replacement on ebay. Celeron D, M, and the Core2 Celerons are pretty respectable for a no-budget system though, and cooler than their Pentium cousins.

You should be able to emerge, apt, or yum yasm in, whichever your system uses. If not, it's easy to build.

Dark Shikari
15th October 2007, 05:06
Celeron is a pretty wide range of processors, though. If it's a PII Celeron, it's like, stop and forget about it, you don't even have SSE and no compatible replacement would help either. If it's P3 or P4, I'd think hard about picking up a $20 cpu replacement on ebay. Celeron D, M, and the Core2 Celerons are pretty respectable for a no-budget system though, and cooler than their Pentium cousins.

You should be able to emerge, apt, or yum yasm in, whichever your system uses. If not, it's easy to build.
The lack of cache and multiple cores should be pretty painful also.

Also note that before SSE2, SSE instructions took twice as many clocks as MMX, making them basically the same speed (rather than 2x the speed).

akupenguin
15th October 2007, 07:39
SSE1 instructions are floating-point, making them useless for a video codec.
SSE2 instructions took twice as many clocks as MMX. Core2 was the first architecture where SSE2 was consistently faster than MMX. SSE2 doesn't help on P4 or K8 except in certain special cases where the extra register width matters.
But a P2 (Celeron or otherwise) lacks MMX2 in addition to SSE1, and MMX2 has a bunch of useful instructions. I never bothered to optimize x264 for MMX1, because emulating those instructions would make all the asm more complicated.

Dark Shikari
15th October 2007, 07:49
But a P2 (Celeron or otherwise) lacks MMX2 in addition to SSE1, and MMX2 has a bunch of useful instructions. I never bothered to optimize x264 for MMX1, because emulating those instructions would make all the asm more complicated.Ah, so that's why P2s are so obscenely slow with x264.

AlexeyS
15th October 2007, 11:01
Wait, your are setting up a CELERON encoding server? Whatever you encode will take ages with a Celeron, you know that right?
Yes, I know. But I have no choice. If both ASP and AVC will be too slow, I will download videos and encode them on my home PC.

I have Celeron 2.8 right now which costs 60/mo. I can go with Core 2 Duo 1.8 which is 90/mo, but I don't think it will be much faster.


Can you guys tell me how can I install x264, so FFmpeg can use it?

Dark Shikari
15th October 2007, 11:07
Yes, I know. But I have no choice. If both ASP and AVC will be too slow, I will download videos and encode them on my home PC.

I have Celeron 2.8 right now which costs 60/mo. I can go with Core 2 Duo 1.8 which is 90/mo, but I don't think it will be much faster.

Can you guys tell me how can I install x264, so FFmpeg can use it?The Core 2 Duo 1.8 will be vastly faster.

Roughly 4 times faster, to be exact. (http://www.techarp.com/x264_Benchmark/gfx/results_intel_big.gif)

AlexeyS
15th October 2007, 18:07
The Core 2 Duo 1.8 will be vastly faster.

Roughly 4 times faster, to be exact. (http://www.techarp.com/x264_Benchmark/gfx/results_intel_big.gif)
OMG. :confused:

Does Xvid/ASP have same difference?

Dark Shikari
15th October 2007, 18:50
OMG. :confused:

Does Xvid/ASP have same difference?Not entirely, because Xvid is singlethreaded, so it can't take advantage of two cores (and the multithreaded version is pretty bad at this also).

However, in terms of performance per core, yes, the results will be similar as Xvid uses assembly just like x264.

fields_g
15th October 2007, 19:09
What are you encoding? (esp resolution)
What x264 settings were you thinking of using?
How many users would be using this server for encoding?
What other services and loads are on this server?
What are your time expectations?

Depending on these things, your celeron, although not the greatest technology for the job, may be sufficient.

Adub
15th October 2007, 19:11
Wait, are you renting your processor?
Or are you on a payment plan?

fields_g
15th October 2007, 19:14
I'm under the impression he is renting hosted server space.

AlexeyS
16th October 2007, 09:52
What are you encoding? (esp resolution)
Mostly, it will be DV (720x480/720x576). Maybe some HDV (MPEG2 720p,1080i)

What x264 settings were you thinking of using?
Don't know. I still can't install it to try (thread is about it). :)

How many users would be using this server for encoding?
Not much. If I get more visitors, I'm planning to rent server for encoding only.

What other services and loads are on this server?
PHP/MySQL.

Wait, are you renting your processor?
Or are you on a payment plan?
I'm renting dedicated server.