ラベル ソースファイル の投稿を表示しています。 すべての投稿を表示
ラベル ソースファイル の投稿を表示しています。 すべての投稿を表示

2010年10月1日金曜日

libxvidを入れる

yumにlibxvidが無かったのでソースファイルからインストールします
まずlibxvidをダウンロードします
[root@blog.m264.com ~]$ wget http://short.m264.info/xvidcore
--2010-09-30 18:36:51--  http://short.m264.info/xvidcore
downloads.xvid.org をDNSに問いあわせています... 88.198.32.206
downloads.xvid.org|88.198.32.206|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 643344 (628K) [application/x-bzip]
`xvidcore-1.2.2.tar.bz2' に保存中

100%[================================================>] 643,344      155K/s 時間 4.1s

2010-09-30 18:36:56 (155 KB/s) - `xvidcore-1.2.2.tar.bz2' へ保存完了 [643344/643344]
解凍してフォルダを移動します
[root@blog.m264.com ~]$ tar -xf xvidcore-1.2.2.tar.bz2
[root@blog.m264.com ~]$ cd ./xvidcore/build/generic
メイクしてインストールします
[root@blog.m264.com ~]$ ./configure
/root/work/xvidcore/build/generic
[root@localhost generic]# ./configure
checking build system type... i686-pc-linux
checking host system type... i686-pc-linux
checking target system type... i686-pc-linux
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 yasm... no
checking for nasm... no
configure: WARNING: no correct assembler was found - Compiling generic sources only
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
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for pthread_join in -lpthread... yes
configure: creating ./config.status
config.status: creating platform.inc
[root@blog.m264.com ~]$ 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
../../src/motion/estimation_bvop.c: In function ‘SMPMotionEstimationBVOP’:
../../src/motion/estimation_bvop.c:1107: 警告: unused variable ‘f_mbs’
C: motion/estimation_common.c
C: motion/estimation_gmc.c
C: motion/estimation_pvop.c
../../src/motion/estimation_pvop.c: In function ‘MotionEstimation’:
../../src/motion/estimation_pvop.c:912: 警告: unused variable ‘skip_thresh’
../../src/motion/estimation_pvop.c:907: 警告: unused variable ‘stat_thresh’
../../src/motion/estimation_pvop.c: In function ‘MotionEstimateSMP’:
../../src/motion/estimation_pvop.c:1015: 警告: unused variable ‘skip_thresh’
../../src/motion/estimation_pvop.c:1008: 警告: unused variable ‘stat_thresh’
C: motion/estimation_rd_based.c
C: motion/estimation_rd_based_bvop.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: plugins/plugin_ssim.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
L: libxvidcore.a
L: libxvidcore.so.4.2

---------------------------------------------------------------
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.
---------------------------------------------------------------
make install
D: /usr/local/lib
I: /usr/local/lib/libxvidcore.so.4.2
I: /usr/local/lib/libxvidcore.a
D: /usr/local/include
I: /usr/local/include/xvid.h

2010年9月30日木曜日

CentOS5.5にMP4Boxをインストールする

ffmpegやflvtool2はyum(rpmforge)からインストールできるのですが MP4Boxは無いようなのでソースファイルからコンパイルします

最初に必要なパッケージを追加します
現に入っている場合は飛ばして下さい
[root@blog.m264.com ~]$ yum install gcc gcc-c++ freeglut-devel which
===================================================================================
 Package                     Arch        Version              Repository   Size
===================================================================================
Installing:
 gcc-c++                     i386        4.1.2-48.el5         base        3.4 M
 freeglut-devel              i386        2.4.0-7.1.el5        base        98 k
Installing for dependencies:
 libstdc++-devel             i386        4.1.2-48.el5         base        2.8 M
 freeglut                    i386        2.4.0-7.1.el5        base        142 k
Transaction Summary
====================================================================================
Install       4 Package(s)
Upgrade       0 Package(s)

MP4Boxをダウンロードします
[root@blog.m264.com ~]$ wget http://short.m264.info/gpac-045-tar
--2010-09-30 10:36:10--  http://short.m264.info/gpac-045-tar
short.m264.info をDNSに問いあわせています... 168.143.174.97
short.m264.info|168.143.174.97|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 4269054 (4.1M) [application/x-gzip]
`gpac-0.4.5.tar.gz' に保存中

100%[===========================================>] 4,269,054    896K/s 時間 4.8s

2010-09-30 10:36:17 (866 KB/s) - `gpac-0.4.5.tar.gz' へ保存完了 [4269054/4269054]

[root@localhost work]#
ファイルを解凍します
[root@blog.m264.com ~]$ tar -xf ./gpac-0.4.5.tar.gz
cd ./gpac
configureしてmakeします
configureに実行権が無いので1.か2.どちらかの方法で実行して下さい
[root@blog.m264.com ~]$ chmod u+x ./configure
./configure
若しくは
[root@blog.m264.com ~]$ sh ./configure
** System Configuration
6行ぐらい出力

** GPAC 0.4.5 Core Configuration **
8行ぐらい出力

** Detected libraries **
17行ぐらい出力

** Extra Libraries used **
11行ぐらい出力

Creating config.mak
config.h is unchanged
Done - type 'make help' for make info, 'make' to build

メイクする
[root@blog.m264.com ~]$ make
なんかすごく沢山でます
正しくメイクできたらインストールする
もし失敗してたら足りないパッケージを足して再度メイクしなおし
[root@blog.m264.com ~]$ make clean
[root@blog.m264.com ~]$ make

[root@blog.m264.com ~]$ make install
install -d "/usr/local"
install -d "/usr/local/bin"
install -m 755 bin/gcc/MP4Box "/usr/local/bin"
make -C applications install
make[1]: ディレクトリ `/root/work/gpac/applications' に入ります
set -e; for i in mp4client ; do make -C $i install; done
make[2]: ディレクトリ `/root/work/gpac/applications/mp4client' に入ります
rm -f main.o extract.o ../../bin/gcc/MP4Client
make -override BUILD_INSTALL=yes all
make[3]: ディレクトリ `/root/work/gpac/applications/mp4client' に入ります
gcc -O3 -fno-strict-aliasing -Wno-pointer-sign -I/root/work/gpac/include -DGPAC_MODULES_PATH=\"/usr/local/lib/gpac\" -c -o main.o main.c
gcc -O3 -fno-strict-aliasing -Wno-pointer-sign -I/root/work/gpac/include -DGPAC_MODULES_PATH=\"/usr/local/lib/gpac\" -c -o extract.o extract.c
gcc -Wl --warn-common -o ../../bin/gcc/MP4Client main.o extract.o -L../../bin/gcc -lgpac -lz -lGL -lglut
make[3]: ディレクトリ `/root/work/gpac/applications/mp4client' から出ます
install -m 755 ../../bin/gcc/MP4Client "/usr/local/bin"
make[2]: ディレクトリ `/root/work/gpac/applications/mp4client' から出ます
make[1]: ディレクトリ `/root/work/gpac/applications' から出ます
install -d "/usr/local/lib/gpac"
install bin/gcc/*.so "/usr/local/lib/gpac"
rm -f /usr/local/lib/gpac/libgpac.so
rm -f /usr/local/lib/gpac/nposmozilla.so
strip bin/gcc/libgpac.so
install -m 755 bin/gcc/libgpac.so /usr/local/lib/libgpac-0.4.5.so
ln -sf libgpac-0.4.5.so /usr/local/lib/libgpac.so
ldconfig || true
install -d "/usr/local/man"
install -d "/usr/local/man/man1"
if [ -d doc ] ; then \
install -m 644 doc/man/mp4box.1 /usr/local/man/man1/ ; \
install -m 644 doc/man/mp4client.1 /usr/local/man/man1/ ; \
install -m 644 doc/man/gpac.1 /usr/local/man/man1/ ; \
install -d "/usr/local/share/gpac" ; \
install -m 644 doc/gpac.mp4 /usr/local/share/gpac/ ; \
fi
これでMP4Boxのインストールは完了です
[root@blog.m264.com ~]$ which MP4Box
/usr/local/bin/MP4Box
ついでにmp4boxじゃなくてMP4Boxです←これで小一時間悩んだw