How to install MP4Box ( GPAC ) on Centos 6.2

Download PDF

MP4Box is a MP4 multiplexer utility, which can import MPEG-4 video, DivX, XviD, 3ivx, h264 etc, audio streams and subtitles into the .mp4 container. The end result is a compliant MP4 stream. It can also extract streams from a .mp4. MP4Box is a command line tool, but can be used with graphical user interfaces such as YAMB or my MP4box GUI.

Q. What is zlib ?

Ans :- zlib is a software library used for data compression. zlib is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program.

How to Install MP4Box on Linux Box :-

1.Install the dependency :-

[root@p-root ~]# yum install zlib*

2.Download MP4Box :-

Execute Following commands on Shell to Download the MP4Box Source.

[root@p-root ~]# cd /usr/local/src/
[root@p-root src]# wget http://nchc.dl.sourceforge.net/project/gpac/GPAC/GPAC%200.4.5/gpac-0.4.5.tar.gz
[root@p-root src]# wget http://nchc.dl.sourceforge.net/project/gpac/GPAC%20extra%20libs/GPAC%20extra%20libs%200.4.5/gpac_extra_libs-0.4.5.tar.gz

“gpac-0.4.5.tar.gz” is Main Source for MP4Box where as “gpac_extra_libs-0.4.5.tar.gz” contains Extra Libraries which will enhance the functionality of MP4Box.

3.Extract the Downloaded sources :-

[root@p-root src]# tar -zxvf gpac-0.4.5.tar.gz
[root@p-root src]# tar -zxvf gpac_extra_libs-0.4.5.tar.gz

4. Copy the Additional Libraries from “gpac_extra_libs” to “gpac” folder :-

[root@p-root src]# cd gpac_extra_libs
[root@p-root gpac_extra_libs]# cp -r * /usr/local/src/gpac/extra_lib
[root@p-root gpac_extra_libs]# cd ..

5. Install GPac or MP4Box :- Execute following Commands on the Shell of your Linux Server one after one (Make sure it doesn’t throw any Error).

[root@p-root src]# cd gpac
[root@p-root gpac]# chmod +x configure
[root@p-root gpac]# ./configure
[root@p-root gpac]# make lib
[root@p-root gpac]# make apps
[root@p-root gpac]# make install lib
[root@p-root gpac]# make install

Might be you will encounter this error :- This Error can be fixed by creating an symbolic link of /usr/lib64/libglut.so.3 to /usr/lib64/libglut.so

ERROR:-

/usr/bin/ld: cannot find -lglut
collect2: ld returned 1 exit status

Fix :-

[root@p-root gpac]#ls /usr/lib64 |grep glut
libglut.so.3
[root@p-root gpac]# ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut.so

6. Once GPAC get installed Properly, copy the gpac .so file from gpac directory to System libraries :-

[root@p-root gpac]# cp bin/gcc/libgpac.so /usr/lib

7. Hurrey…. !!!! Mp4Box installed now….you can cross verify the MP4Box installation :-

[root@p-root ~]# which MP4Box
/usr/local/bin/MP4Box
[root@p-root ~]#

 

******************************************************************************************************

 

libgpac.so: cannot open shared object file.

“Today i am getting the following error after installation of MP4Box.”

MP4Box did not find libgpac.so

Error :-

root@unixsurgeon [~]# /usr/local/bin/MP4Box
/usr/local/bin/MP4Box: error while loading shared libraries: libgpac.so: cannot open shared object file: No such file or directory
root@unixsurgeon [~]#

Solution :-

The shared libary was compiled, but is not installed to /usr/local/lib. This can be fixed as,

root@unixsurgeon [/usr/local/src/gpac]# install -m644 bin/gcc/libgpac.so /usr/local/lib/libgpac.so
root@unixsurgeon [/usr/local/src/gpac]# chmod +x /usr/local/lib/libgpac.so
root@unixsurgeon [/usr/local/src/gpac]# ldconfig

Now you can verify :-

root@unixsurgeon [~]# /usr/local/bin/MP4Box
MP4Box [option] input [option]
-h general:          general options help
-h hint:             hinting options help
-h import:           import options help
-h encode:           encode options help
-h meta:             meta handling options help
-h extract:          extraction options help
-h dump:             dump options help
-h swf:              Flash (SWF) options help
-h crypt:            ISMA E&A options help
-h format:           supported formats help
-nodes:              lists supported MPEG4 nodes
-node NodeName:      gets MPEG4 node syntax and QP info
-xnodes:             lists supported X3D nodes
-xnode NodeName:     gets X3D node syntax
-snodes:             lists supported SVG nodes
-snode NodeName:     gets SVG node syntax
-languages:              lists supported ISO 639 languages
-quiet:               quiet mode
-v:                  verbose mode
-version:            gets build version

root@unixsurgeon [~]# /usr/local/bin/MP4Box -version

 

Done 🙂

17 replies
  1. Mg Aung Zin
    Mg Aung Zin says:

    I have on error when I execute root@p-root gpac]# ./configure , the error show as below,
    ./configure: line 221: cc: command not found
    error: zlib not found on system or in local libs

    Reply
    • Andrej OSmicro
      Andrej OSmicro says:

      clip-bucket can be very tricky sometimes, once you have all the dependencies and still have problems (uploading video, converting etc) let me know, i have built several clip-bucket sites.

      Reply
  2. Mg Aung Zin
    Mg Aung Zin says:

    I already done it bro. I have error still at that line # root@centos[/usr/local/src/gpac]# install -m644 bin/gcc/libgpac.so /usr/local/lib/libgpac.so , I can’t found gcc file in gpac. how can I solve for it. please

    Reply
  3. mohamed
    mohamed says:

    i installed it and the clipbucket can’t see it
    see ffmpeg and flvtools2
    i don’t know what to do

    Reply
    • Andrej OSmicro
      Andrej OSmicro says:

      Clipbucket is a bit tricky to setup at first, but not impossible.
      These are the paths for requirements on CentOS:
      /usr/bin/ffmpeg
      /usr/bin/php
      /usr/local/bin/MP4Box
      /usr/bin/flvtool2
      /usr/bin/mplayer

      There are other options you need to do as well, but do the paths first and see how you go.
      I use ClipBucket myself and once I got it working the way I want, it’s the best Video Sharing script out there.

      Reply
  4. Brad
    Brad says:

    I am trying to install MP4Box for ClipBucket 2.7 on Centos 6.5. I am getting the error described above “error: zlib not found on system or in local libs” when I perform the step to run ./configure

    I have done the “yum install zlib*”

    Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version
    Package zlib-static-1.2.3-29.el6.x86_64 already installed and latest version
    Package zlib-1.2.3-29.el6.x86_64 already installed and latest version

    I am stumped. I have searched high and low on the googles and have found nothing on this really. Any help is appreciated. Thank you.

    Reply
    • Brad
      Brad says:

      I found out that I was installing an old version of gpac mp4box (as described above and many other “How-To” blogs. At the time of this posting, the current version is 0.5.0, where this blog pulls 0.4.5 from sourceforge. Version 0.5.0 recognizes my version of zlib (maybe a higher version than 0.4.5 recognizes). I hope this helps anyone on any future installs.

      Reply

Trackbacks & Pingbacks

  1. […] install mp4box tutorial plus error and solutions   […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply