PDA

View Full Version : The compression to x264 in linux.


pasta03
26th July 2007, 17:33
Yet I compressed the video to codeca x264 only in XP.
I use codec x264 from http://x264.nl/ , I compressed from the line of commands.
My question this whether under linux I also one can the quality compress to codec x264 also with lini of commands , if so as to create codeca x264 from sources (across normal compilations from the source).

Tack
26th July 2007, 17:47
I understand English isn't your native language, but I'm having a very difficult time parsing your question.

I'm gathering you're asking if you can encode using x264 in Linux and achieve the same quality as you would under Windows. The answer is yes.

Although I think not too many people use x264 directly from the command line in Linux, but rather indirectly using mencoder, since mencoder will handle decoding and filtering the source, and muxing the output.

Atak_Snajpera
26th July 2007, 18:20
Ooo pasta jak zwykle nie wiadomo o co ci chodzi ;)

pasta03
26th July 2007, 18:37
So How I can install mencoder and how use in linux.

Tack
26th July 2007, 18:57
So How I can install mencoder and how use in linux.

Depends on the distro. If you're using Ubuntu, install the mencoder package. (Or "sudo aptitude install mencoder" from the command line.)

As for using it, search doom9 as there are many examples. MPlayer also has online documentation that covers use of mencoder.

pasta03
26th July 2007, 19:03
ok thx!

pasta03
26th July 2007, 19:50
One question moer if already I will install mencoder package what version x264 is in this pack (from http://x264.nl/)
If yes can I installation always the latest versions x264 from source

nm
26th July 2007, 20:51
I'd suggest compiling the latest SVN revisions of both x264 and MEncoder. The Ubuntu Feisty x264 packages are from January and MEncoder is 1.0rc1, which I consider too old because there have been many improvements since then.

pasta03
26th July 2007, 21:26
Also I attend that compiling from the latest SVN revisions of both x264 and MEncoder will be best but I not yet compiled anything straight from SVN only from the file .tar.bz2 downloaded on the disk.
You would be able to to write in several steps as yourself compiling x264 and MEncoder straight with SVN revisions.

nm
27th July 2007, 10:58
Building x264 from SVN:

svn co svn://svn.videolan.org/x264/trunk x264
cd x264
./configure
make
sudo make install
cd ..


Building MPlayer and MEncoder from SVN:

svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd mplayer
./configure --enable-largefiles
make
sudo make install
cd ..


You should keep the source directories so that when you need to update the tools, you don't need to download the entire source trees again.
Updating to the latest revisions:

cd x264
make clean
svn update
./configure
make
sudo make install
cd ..

cd mplayer
make clean
svn update
./configure --enable-largefiles
make
sudo make install
cd ..



NOTE:

1. On distributions that don't use sudo, you'll need to login as root (with su) to run the make install commands.

2. By default, x264 libraries are installed to /usr/local/lib, so you may need to add that location to /etc/ld.so.conf and run ldconfig as root before compiling MEncoder. Also MEncoder is installed to /usr/local/bin.

3. To customize compiler optimization flags for x264, run the configure script like this (change i686 to your CPU type, like pentium4 or athlon64): ./configure --extra-cflags="-O3 -ffast-math -fomit-frame-pointer -funroll-loops -march=i686"


Edit: Removed bad configure options (a leftover from the past) according to akupenguin's advice.

akupenguin
27th July 2007, 11:13
Never pass --enable flags relating to libraries to MPlayer's configure (largefiles is ok though). --enable-x264 doesn't actually enable anything. MPlayer autodetects all the optional libs, and includes them if you have them. So all the --enable does is postpone detection from configure-time (look at the summary of enabled stuff at the end of configure's output) to compile-time (compilation of ve_x264.c will fail if you don't have x264).

pasta03
27th July 2007, 15:58
Ok thx!
So After the compilation x264 from svn I will be able to to compress to x264 from the line of commands so as in windows eg.

x264.exe --pass 1 --bitrate 6000 --stats stats.a --bframes 3 --b-pyramid --direct auto --deblock -2,-1 --subme 1 --partitions none --vbv-maxrate 25000 --me dia --thread-input --cqmfile matrices.M4G_HRM_V1 --progress --no-psnr --output NUL input.avs

or I will be able to to use only some graphic GUI as eg. MEncoder.

nm
27th July 2007, 16:57
Not quite. The AVISynth input in x264 is Windows-only and MEncoder is not an encoding GUI (it's a command-line driven encoding application that includes many video and audio filters and codecs). There are GUI's for MEncoder, but you'll still need to learn the command-line syntax to use some filters. Luckily the documentation is pretty good.

As for AVISynth 2.x.x, it is possible to run it on Linux with Wine, but I don't know much more. Perhaps a search in the Doom9 Linux forum (http://forum.doom9.org/forumdisplay.php?f=63) would help.