30. dubna 2009 (09:00)
Vyšla jarní verze distribuce Mandriva Linux 2009.1. Nově nasazené graficke prostředí KDE 4 je na rozdíl od předchozí verze mnohem dál, posunulo se od hezkého experimentu k plně použitelnému systému. Česká knižní edice k této verzi nebude, takže nezbývá, než stahovat a s problémy se obrátit na fórum.
[Všechny informace v češtině]
[Představení hlavních novinek]
[Poznámky k vydání]
[Download]
[Errata] [Errata česky]
TIP: Jestli hledáte popis nastavení kodeku XviD, podívejte se na článek "Nastavujeme XviD".
Kompilace XviD není žádná věda a trvá jen chvilku. Nebudete muset čekat, až někdo udělá balíček a budete mít kodek přeložený pro svůj vlastní procesor.
Postup byl vyzkoušen na Mandrakelinuxu 10.
Pokud máme nainstalován rpm balíček libxvid4, odinstalujeme ho. Ale než to uděláme, podíváme se, co je jeho obsahem. Zjistíme, že jsou to jen 2 soubory: /usr/lib/libxvidcore.so.4 a /usr/lib/libxvidcore.so.4.0. A to ještě jeden z nich je jen symbolický odkaz (symlink). Z toho můžeme usoudit, že i když program přeložíme a pomocí make install nakopírujeme na správné místo, budeme později schopni provést "odinstalaci" prostým smazáním. Ukážeme si oba způsoby, ale k finální instalaci stejně raději použijeme checkinstall, ať na to nemusíme myslet.
Ze stránek xvid.org stáhneme soubor xvidcore-číslo_verze.tar.gz, rozbalíme (tar -xvzf jméno_souboru) a přečteme pokyny v souboru doc/INSTALL. Dozvíme se, že kromě překladače musíme mít nainstalovaný nasm (Netwide Assembler). Jestli ho nemáme, nainstalujeme ho z ovládacího centra nebo z konzole urpmi nasm [Enter] (je v distribuci). Potom v adresáři, kam jsme rozbalili zdrojové kódy přejdeme do podadresáře xvidcore/build/generic a postupně zadáme příkazy: ./configure, make a make install. Poslední příkaz jako root. Vypíše se, co se kam nainstalovalo:
# make install
D: /usr/local/lib
I: /usr/local/lib/libxvidcore.so.4.0
I: /usr/local/lib/libxvidcore.a
D: /usr/local/include
I: /usr/local/include/xvid.h
Jak vidíme, knihovny jsou jinde, než je chceme mít. Nebudeme nikam nic kopírovat, protože pro takové případy tu máme symbolické odkazy. Za pomoci Krusaderu, mc nebo pomocí konzolových příkazů je vyrobíme (všechno jako root, obyčejný uživatel do /usr/lib nic zapisovat nesmí):
ln -s /usr/local/lib/libxvidcore.so.4.0 /usr/lib/ [Enter]
ln -s /usr/local/lib/libxvidcore.so.4.0 /usr/lib/libxvidcore.so.4 [Enter]
ln -s /usr/local/lib/libxvidcore.a /usr/lib/ [Enter]
ln -s /usr/local/include/xvid.h /usr/include/ [Enter].
Tomuto žonglování se symlinky se můžeme vyhnout, pokud scriptu configure předáme parametr, kterým mu sdělíme kam se má instalovat. Takto: ./configure --prefix=/usr [Enter]. Zvažte, co je pro vás lepší.
Všechno uděláme jako v předchozím případě, jen namísto make install použijeme checkinstall. Takže:
Na konci procesu máme regulérně nainstalovaný XviD kodek, který můžeme kdykoliv upgradovat pomocí urpmi nebo odinstalovat s urpme.
[ales@sancho xvidcore-1.0.1]$ ls AUTHORS build/ CodingStyle doc/ dshow/ examples/
ChangeLog LICENSE README src/ TODO vfw/ [ales@sancho xvidcore-1.0.1]$ cd build/generic/ [ales@sancho generic]$ ./configure --prefix=/usr checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking whether to use default CFLAGS... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a BSD-compatible install... /usr/bin/install -c checking for ranlib... ranlib checking for whether to use assembly code... yes checking for architecture type... ia32 checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for int *... yes checking size of int *... 4 checking whether byte ordering is bigendian... no checking for build extensions... .so .a .o checking for platform specific LDFLAGS/CFLAGS... ok checking for nasm... yes checking for nasm patch version... 38 checking for nasm object format... elf checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking assert.h usability... yes checking assert.h presence... yes checking for assert.h... yes checking math.h usability... yes checking math.h presence... yes checking for math.h... yes configure: creating ./config.status config.status: creating platform.inc [ales@sancho generic]$ make D: =build C: ./decoder.c C: ./encoder.c C: ./xvid.c C: bitstream/bitstream.c C: bitstream/cbp.c C: bitstream/mbcoding.c C: dct/fdct.c C: dct/idct.c C: dct/simple_idct.c C: image/colorspace.c C: image/image.c C: image/interpolate8x8.c C: image/font.c C: image/postprocessing.c C: image/qpel.c C: image/reduced.c C: motion/estimation_bvop.c C: motion/estimation_common.c C: motion/estimation_gmc.c C: motion/estimation_pvop.c C: motion/estimation_rd_based.c C: motion/gmc.c C: motion/motion_comp.c C: motion/vop_type_decision.c C: motion/sad.c C: prediction/mbprediction.c C: plugins/plugin_single.c C: plugins/plugin_2pass1.c C: plugins/plugin_2pass2.c C: plugins/plugin_lumimasking.c C: plugins/plugin_dump.c C: plugins/plugin_psnr.c C: quant/quant_h263.c C: quant/quant_matrix.c C: quant/quant_mpeg.c C: utils/emms.c C: utils/mbtransquant.c C: utils/mem_align.c C: utils/mem_transfer.c C: utils/timer.c A: bitstream/x86_asm/cbp_3dne.asm A: bitstream/x86_asm/cbp_mmx.asm A: bitstream/x86_asm/cbp_sse2.asm A: dct/x86_asm/fdct_mmx_ffmpeg.asm A: dct/x86_asm/fdct_mmx_skal.asm A: dct/x86_asm/fdct_sse2_skal.asm A: dct/x86_asm/idct_3dne.asm A: dct/x86_asm/idct_mmx.asm A: dct/x86_asm/idct_sse2_dmitry.asm A: dct/x86_asm/simple_idct_mmx.asm A: image/x86_asm/colorspace_rgb_mmx.asm A: image/x86_asm/colorspace_yuv_mmx.asm A: image/x86_asm/colorspace_yuyv_mmx.asm A: image/x86_asm/interpolate8x8_3dn.asm A: image/x86_asm/interpolate8x8_3dne.asm A: image/x86_asm/interpolate8x8_mmx.asm A: image/x86_asm/interpolate8x8_xmm.asm A: image/x86_asm/reduced_mmx.asm A: image/x86_asm/qpel_mmx.asm A: motion/x86_asm/sad_xmm.asm A: motion/x86_asm/sad_sse2.asm A: motion/x86_asm/sad_mmx.asm A: motion/x86_asm/sad_3dne.asm A: motion/x86_asm/sad_3dn.asm A: quant/x86_asm/quantize_h263_mmx.asm A: quant/x86_asm/quantize_h263_3dne.asm A: quant/x86_asm/quantize_mpeg_xmm.asm A: quant/x86_asm/quantize_mpeg_mmx.asm A: utils/x86_asm/mem_transfer_mmx.asm A: utils/x86_asm/mem_transfer_3dne.asm A: utils/x86_asm/interlacing_mmx.asm A: utils/x86_asm/cpuid.asm L: libxvidcore.a L: libxvidcore.so.4.0 --------------------------------------------------------------- XviD has been successfully built. * Binaries are currently located in the '=build' directory * To install them on your system, you can run '# make install' as root. --------------------------------------------------------------- [ales@sancho generic]$ su Password: [root@sancho generic]# checkinstall checkinstall 1.6.0beta3, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: y Preparing package documentation...OK *** No known documentation files were found. The new package *** won't include a documentation directory. Please choose the packaging method you want to use. Slackware [S], RPM [R] or Debian [D]? r Please write a description for the package. End your description with an empty line or EOF. >> This is a video codec based on the original OpenDivX codec. >> It's compatible with DivX and MPEG 4. >> This package will be built according to these values: 1 - Summary: [ This is a video codec based on the original OpenDivX codec. It's compatible with DivX and MPEG 4. ] 2 - Name: [ generic ] 3 - Version: [ ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ Applications/System ] 7 - Architecture: [ i386 ] 8 - Source location: [ generic ] 9 - Alternate source location: [ ] 10 - Provides: [ ] 11 - Requires: [ ] Enter a number to change any of them or press ENTER to continue: 2 Enter new name: >> libxvid4 This package will be built according to these values: 1 - Summary: [ This is a video codec based on the original OpenDivX codec. It's compatible with DivX and MPEG 4. ] 2 - Name: [ libxvid4 ] 3 - Version: [ ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ Applications/System ] 7 - Architecture: [ i386 ] 8 - Source location: [ generic ] 9 - Alternate source location: [ ] 10 - Provides: [ ] 11 - Requires: [ ] Enter a number to change any of them or press ENTER to continue: 3 Enter new version: >> 1.0.1 This package will be built according to these values: 1 - Summary: [ This is a video codec based on the original OpenDivX codec. It's compatible with DivX and MPEG 4. ] 2 - Name: [ libxvid4 ] 3 - Version: [ 1.0.1 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ Applications/System ] 7 - Architecture: [ i386 ] 8 - Source location: [ generic ] 9 - Alternate source location: [ ] 10 - Provides: [ ] 11 - Requires: [ ] Enter a number to change any of them or press ENTER to continue: 7 Enter the architecture type: >> i686 This package will be built according to these values: 1 - Summary: [ This is a video codec based on the original OpenDivX codec. It's compatible with DivX and MPEG 4. ] 2 - Name: [ libxvid4 ] 3 - Version: [ 1.0.1 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ Applications/System ] 7 - Architecture: [ i686 ] 8 - Source location: [ generic ] 9 - Alternate source location: [ ] 10 - Provides: [ ] 11 - Requires: [ ] Enter a number to change any of them or press ENTER to continue: Installing with make install... ========================= Installation results =========================== D: /usr/lib I: /usr/lib/libxvidcore.so.4.0 I: /usr/lib/libxvidcore.a D: /usr/include I: /usr/include/xvid.h ======================== Installation successful ========================== Copying files to the temporary directory...OK Striping ELF binaries and libraries...OK Compressing man pages...OK Building file list...OK ************************************** **** RPM package creation selected *** ************************************** Building RPM package...OK NOTE: The package will not be installed Erasing temporary files...OK Deleting doc-pak directory...OK Writing backup package...OK Deleting temp dir...OK ********************************************************************** Done. The new package has been saved to /usr/src/RPM/RPMS/i686/libxvid4-1.0.1-1.i686.rpm You can install it in your system anytime using: rpm -i libxvid4-1.0.1-1.i686.rpm ********************************************************************** [root@sancho generic]# urpmi /usr/src/RPM/RPMS/i686/libxvid4-1.0.1-1.i686.rpm instaluji /usr/src/RPM/RPMS/i686/libxvid4-1.0.1-1.i686.rpm Připravuji... ################################################## 1:libxvid4 ##################################################
Odkazy
» [Celá sekce VIDEO]
Verze tohoto dokumentu: