How to Install MP4Box on Linux Server

MP4Box is a MP4 multiplexer, 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.

1) Download MP4Box
Execute Following commands on Shell to Download the MP4Box Source

[root@server ~]# cd /usr/local/src/
[root@server src]# wget http://nchc.dl.sourceforge.net/project/gpac/GPAC/GPAC%200.4.5/gpac-0.4.5.tar.gz
[root@server 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.

2) Extract the Downloaded sources
Extract both the downloaded files using Tar

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


3) Copy the Additional Libraries from “gpac_extra_libs” to “gpac” folder

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


4) 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@server src]# cd gpac
[root@server gpac]# ./configure
[root@server gpac]# make lib
[root@server gpac]# make apps
[root@server gpac]# make install lib
[root@server gpac]# make install


5)
Once GPAC get installed Properly, copy the gpac .so file from gpac directory to System libraries

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


Thats all
. you can verify if the MP4Box is installed or not using following Command.

[root@server gpac]# which MP4Box
/usr/local/bin/MP4Box
[root@server gpac]#


Problems Faced While installation.

I have faced two problems while installation of MP4Box

1) Permission of “./Configure” was not set; I have corrected it by setting permission of the file to 755

[root@server gpac]# ./configure
-bash: ./configure: Permission denied
[root@server gpac]# chmod 755 configure


2) Error on 64 Bit OS. Following Error was thrown. 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@server gpac]#ls /usr/lib64 |grep glut
libglut.so.3
[root@server gpac]# ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut.so

About: Mike

Milind Koyande loves to work on new technologies specially virtualization and troubleshoot server problems. I’m an avid photographer and love to spend my free time close to nature, trying to capture its glory on my camera.


6 thoughts on “How to Install MP4Box on Linux Server”

  1. Even after performing the steps mentioned to fix the installer , i still get the ” cannot find -lglut” error. Any suggestion would be great help. I am just not able to fix this issue.

  2. Thank you for the blog. Trying to install MP4Box in my VPS. Typing “make install lib” I got an error: “cannot change permissions of “/usr/local”: Operation not permitted – Error 1.

    I assigned 777 permissions to: “/usr/local” folder, “/usr/local/lib” with not sucess.

    Thank you in advance for helping me out.

    Kob

  3. Thanks for the comment. Please let me know if you are trying to compile lib under root user or any other user. Also please let me know the parameters you have used at the time of ./configure.

This site uses Akismet to reduce spam. Learn how your comment data is processed.