Thursday, June 4, 2009

Building FAAC, XviD, GPAC and OGMRip



After building MPlayer and Mencoder for Linux, the last fun part is to build OGMRip so that we can rip movies into AVI or MP4 files as found on the P2P networks. OGMRip is a graphical movie convertor that uses MPlayer and Mencoder to convert a movie into another format.



Building FAAC


First, let's compile FAAC as it is needed to encode AAC audio. You need a g++ compiler, autoconf, automake and tcl-dev to compile FAAC, following a typical procedure:


./bootstrap
./configure --build=i586-pc-linux-gnu --prefix=/usr --with-mp4v2
make
make install

The bootstrap command produces the configure script and Makefile necessary for the build procedure. The following set of files are generated upon compilation of FAAC:


/usr/bin/faac
/usr/include/faac.h
/usr/include/faaccfg.h
/usr/lib/libfaac.a
/usr/lib/libfaac.la
/usr/lib/libfaac.so
/usr/lib/libfaac.so.0
/usr/lib/libfaac.so.0.0.0
/usr/man/man1/faac.1.gz


Building XviD library


Now, let's build the XviD library. XviD is a popular video codec. A typical build procedure for XviD looks like this:


tar xzf xvidcore-1.2.2.tar.gz
cd xvidcore/build/generic
./configure --build=i586-pc-linux-gnu --prefix=/usr
make
make install

Upon successful compilation, the following set of files are installed on system.


/usr/lib/libxvidcore.a
/usr/include/xvid.h
/usr/lib/libxvidcore.so
/usr/lib/libxvidcore.so.4
/usr/lib/libxvidcore.so.4.1


Building GPAC


Next, let's compile GPAC which is an open-source MPEG-4 encoder. Before compiling GPAC, install the following developer libraries, most of which are optional:


liba52-0.7.4-dev
libasound2-dev
libavformat-dev
libfaad-dev
libmad0-dev
libmozjs-dev
libogg-dev
libopenjpeg-dev
libssl-dev
libtheora-dev
libvorbis-dev
libwxgtk2.8-0
libxvidcore4

Then, compile GPAC as follows:


./configure --prefix=/usr/local --cpu=i586 --enable-pic --strip --use-ffmpeg=local --use-js=local

make

make install

When GPAC is compiled and installed successfully, the following set of files are generated on the system:


/usr/bin/MP4Box
/usr/bin/MP4Client
/usr/bin/Osmo4
/usr/lib/gpac/gm_aac_in.so
/usr/lib/gpac/gm_ac3_in.so
/usr/lib/gpac/gm_alsa.so
/usr/lib/gpac/gm_bifs_dec.so
/usr/lib/gpac/gm_ctx_load.so
/usr/lib/gpac/gm_dummy_in.so
/usr/lib/gpac/gm_ffmpeg_in.so
/usr/lib/gpac/gm_ft_font.so
/usr/lib/gpac/gm_gpac_js.so
/usr/lib/gpac/gm_img_in.so
/usr/lib/gpac/gm_ismacryp.so
/usr/lib/gpac/gm_isom_in.so
/usr/lib/gpac/gm_laser_dec.so
/usr/lib/gpac/gm_mp3_in.so
/usr/lib/gpac/gm_mpegts_in.so
/usr/lib/gpac/gm_odf_dec.so
/usr/lib/gpac/gm_ogg_xiph.so
/usr/lib/gpac/gm_oss_audio.so
/usr/lib/gpac/gm_raw_out.so
/usr/lib/gpac/gm_rtp_in.so
/usr/lib/gpac/gm_saf_in.so
/usr/lib/gpac/gm_soft_raster.so
/usr/lib/gpac/gm_svg_in.so
/usr/lib/gpac/gm_timedtext.so
/usr/lib/gpac/gm_x11_out.so
/usr/lib/gpac/gm_xvid_dec.so
/usr/lib/libgpac-0.4.5.so
/usr/lib/libgpac.so
/usr/man/man1/gpac.1.gz
/usr/man/man1/mp4box.1.gz
/usr/man/man1/mp4client.1.gz
/usr/share/gpac/gpac.mp4

If you encounter the following error during compilation:


scenegraph/vrml_smjs.c:41:20: error: jsapi.h: No such file or directory

make symlinks to jsapi.h and compile again as follows:


cd include/

ln -s ../extra_lib/include/js/* .

cd ..

./configure --prefix=/usr --cpu=i586 --enable-pic --strip --use-ffmpeg=local --use-js=local --extra-cflags=-DXP_UNIX

make

make install

Some programs require the gpac static library libgpac_static.a. This file is not installed by default. However, you can copy it manually:


cp bin/gcc/libgpac_static.a usr/lib


Building OGMRip


Finally, let's build OGMRip. First, make sure you have the following developer libraries:


libdbus-glib-1-dev
libdvdread-dev
libenca-dev
libenchant-dev
libgconf2-dev
libglade2-dev
libgtk2.0-dev
libhal-dev
libnotify-dev
libstdc++6-4.4-dev
libtheora-dev

Optionally, install intltool, gtk-doc and xsltproc for internationalization and documentation. Then, build OGMRip as follows:


./configure --prefix=/usr/local --build=i586-pc-linux-gnu --sysconfdir=/etc --enable-gtk-doc --with-ocr=auto

make

make install

After OGMRip is compiled and installed successfully, the following set of files are generated on system:


/etc/gconf/schemas/ogmrip.schemas
/usr/bin/avibox
/usr/bin/dvdcpy
/usr/bin/ogmrip
/usr/bin/subp2pgm
/usr/bin/subp2png
/usr/bin/subp2tiff
/usr/bin/subptools
/usr/bin/theoraenc
/usr/include/ogmdvd/
/usr/include/ogmjob/
/usr/include/ogmrip/
/usr/lib/libogmdvd-gtk.a
/usr/lib/libogmdvd-gtk.la
/usr/lib/libogmdvd-gtk.so
/usr/lib/libogmdvd-gtk.so.0
/usr/lib/libogmdvd-gtk.so.0.0.0
/usr/lib/libogmdvd.a
/usr/lib/libogmdvd.la
/usr/lib/libogmdvd.so
/usr/lib/libogmdvd.so.0
/usr/lib/libogmdvd.so.0.0.0
/usr/lib/libogmjob.a
/usr/lib/libogmjob.la
/usr/lib/libogmjob.so
/usr/lib/libogmjob.so.0
/usr/lib/libogmjob.so.0.0.0
/usr/lib/libogmrip-gtk.a
/usr/lib/libogmrip-gtk.la
/usr/lib/libogmrip-gtk.so
/usr/lib/libogmrip-gtk.so.0
/usr/lib/libogmrip-gtk.so.0.0.0
/usr/lib/libogmrip-lavc.a
/usr/lib/libogmrip-lavc.la
/usr/lib/libogmrip-lavc.so
/usr/lib/libogmrip-lavc.so.0
/usr/lib/libogmrip-lavc.so.0.0.0
/usr/lib/libogmrip-mplayer.a
/usr/lib/libogmrip-mplayer.la
/usr/lib/libogmrip-mplayer.so
/usr/lib/libogmrip-mplayer.so.0
/usr/lib/libogmrip-mplayer.so.0.0.0
/usr/lib/libogmrip.a
/usr/lib/libogmrip.la
/usr/lib/libogmrip.so
/usr/lib/libogmrip.so.0
/usr/lib/libogmrip.so.0.0.0
/usr/lib/ogmrip/
/usr/lib/pkgconfig/ogmdvd-gtk.pc
/usr/lib/pkgconfig/ogmdvd.pc
/usr/lib/pkgconfig/ogmjob.pc
/usr/lib/pkgconfig/ogmrip-gtk.pc
/usr/lib/pkgconfig/ogmrip.pc
/usr/share/applications/ogmrip.desktop
/usr/share/doc/ogmrip/
/usr/share/gtk-doc/html/ogmdvd-gtk
/usr/share/gtk-doc/html/ogmdvd/
/usr/share/gtk-doc/html/ogmjob/
/usr/share/gtk-doc/html/ogmrip-gtk/
/usr/share/gtk-doc/html/ogmrip/
/usr/share/locale/ca/LC_MESSAGES/ogmrip.mo
/usr/share/locale/cs/LC_MESSAGES/ogmrip.mo
/usr/share/locale/de/LC_MESSAGES/ogmrip.mo
/usr/share/locale/fr/LC_MESSAGES/ogmrip.mo
/usr/share/locale/sv/LC_MESSAGES/ogmrip.mo
/usr/share/man/man1/avibox.1.gz
/usr/share/man/man1/dvdcpy.1.gz
/usr/share/man/man1/subp2pgm.1.gz
/usr/share/man/man1/subptools.1.gz
/usr/share/ogmrip/
/usr/share/pixmaps/ogmrip.png

Now that you've compiled OGMRip, go ahead and test it. Be sure that mplayer, mencoder, ogmtools, vorbis-tools, gpac, faac, lame, mkvtoolnix and gocr (or ocrad) are installed, also.


OGMRip Video Convertor Options

No comments:

Post a Comment

About This Blog

KBlog logo This blog seeks to provide a collection of interesting pictures found on the Web. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

Powered By Blogger