Home > Articles > Details

How to Install MP4Box gpac and ffmpeg on Linux Ubuntu 18.04

1. Go to this site and follow the instruction to clone GPAC into your folder on Linux
    https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Linux
2. Make sure you install the ffmpeg including its dependencies

     1. Install zlib a dependency for ffmpeg
          sudo apt install zlib
      2. Install zlib-dev as well to be sure nothing will prevent the installer to work
          sudo apt install zlib1g
          sudo apt install zlib1g-dev

      3. Install ffmpeg
         sudo apt install ffmpeg
         - Keep in mind that there will be other dependencies required along the way

3. Clone, Compile, Build and Install GPAC (This is very important as #MP4Box comes with GPC)

    Remember that GPC is a C-based application, you need to have GCC C Compiler installed on your Linux Machine.
    Sometimes LInux comes with C Compiler installed, I did not have to install it.
     1. Follow instructions here 

        https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Linux

4. After you have verified that GPAC is installed 

    - CD into gpac_public folder where you have cloned the GPAC Repository and run the following command.
     [command]: sudo cp bin/gcc/libgpac_static.a /usr/lib
    - This will allow you to find MP4Box everywhere, you don't have to be in the bin directory of a gcc in order to use the MP4Box.
5. If you see an error that says "Command 'MP4Box' not found, but can be installed with  sudo apt install gpac
     - Then simply install gpac since it is already compiled on your machine. After installing it, try to run MP4Box again and you should be able to see the command arguments displayed ont teminal.

-- Good Luck and leave us a comment below if this was helpful.



If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Mark said:

I got an error saying "deprecated pixel format used, make sure you did set range correctly". The ffmpeg would not transcode at all.

Posted On: March 25, 2022 14:35:48 PM
Kert said:

This was very helpful, thank you.

Posted On: December 15, 2021 23:03:51 PM

© 2022 - ErnesTech - Privacy