Whatbox Logo

Wiki > FFmpeg

ffmpeg is pre-installed on all servers, however it may not be built with flags that you want. This article is for if you need to compile your own to add additional compilation flags.

Installing custom FFmpeg

  1. Connect to your slot with SSH

  2. Create a temporary build directory for FFmpeg

     mkdir -p ~/ffmpeg_build
    
  3. Download the latest source snapshot of FFmpeg

     wget https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 -O ffmpeg-snapshot.tar.bz2
    
  4. Extract the source snapshot

     tar xjvf ffmpeg-snapshot.tar.bz2
    
  5. Compile FFmpeg. You can add any additional configuration flags to the ./configure line.

     cd ffmpeg
     
     ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin"
     
     make
     
     make install
    
  6. Add ~/bin to your PATH environment variable. You do not need to run this command if you already have ~/bin in your PATH.

     echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
     source ~/.bashrc
    
  7. Run FFmpeg

     ffmpeg --version
    

Troubleshooting

For more detailed information, consult the FFmpeg Compilation Guide.