Installing ViMP Part 2: Installing the Transcoding Tools

These steps are mostly taken from the ViMP FAQ, with modifications from where I stumbled. I had originally tried to make this one long document, but to avoid a wall of text and getting lost in the middle, I've split it out into three parts: Installing the Web Server, Installing the Transcoding Tools, and Installing ViMP.


  • This how-to assumes that you have already installed Ubuntu Server 12.04 LTS, have SSH enabled in order to remotely manage the server, and have followed Part 1 of this tutorial
  • I prefer to use nano as my text editor, because it's stupid simple. Ctrl+W is for search, Ctrl+X is for close/save.
  • I run these commands as sudo. Use sudo su in order to drop into permanent sudo mode.

Installing the Transcoding Tools

  1. Update and remove any installed transcoding packages:

    cd /usr/src
    apt-get update
    apt-get upgrade
    apt-get remove x264 ffmpeg mplayer mencoder

  2. Install some compiling tools:

    apt-get install joe make automake g++ bzip2 unzip patch subversion

  3. Install Win codecs:

    tar xvjf essential-amd64-20071007.tar.bz2
    mkdir /usr/local/lib/codecs
    cp -Rvp essential-amd64-20071007/* /usr/local/lib/codecs/

  4. Extend the search path for /etc/

    nano /etc/

    Add the following lines (if they aren't there):


    Execute ldconfig


  5. Install some additional codecs:

    apt-get install libsdl1.2-dev zlib1g-dev libfaad-dev libfaac-dev libgsm1-dev libtheora-dev libvorbis-dev libspeex-dev libopencore-amrwb-dev libopencore-amrnb-dev libxvidcore-dev libxvidcore4 libmp3lame-dev libjpeg62 libjpeg62-dev

  6. Install yasm (used to compile x264):

    tar xzf yasm-1.2.0.tar.gz
    cd yasm-1.2.0/
    ./configure && make install
    cd ..

  7. Install x264 (replace the XXXXXXX's below with the correct version)

    tar xvjf last_stable_x264.tar.bz2
    cd x264-snapshot-XXXXXXXX-XXXX-stable/
    ./configure --enable-shared --enable-pic
    make && make install
    cd ..

  8. Install libvpx:

    tar xvjf libvpx-v1.2.0.tar.bz2
    cd libvpx-v1.2.0
    ./configure --enable-shared --enable-pic
    make install
    cd ..

  9. Install MPlayer/mencoder (for Flash playing and transcoding)

    tar xvzf MPlayer-1.1.tar.gz
    cd MPlayer-1.1/
    make && make install
    cd ..

  10. Install ffmpeg:

    tar xvjf ffmpeg-0.8.10.tar.bz2
    cd ffmpeg-0.8.10
    ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
    --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
    --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
    --enable-libvpx --enable-libx264 --enable-libxvid
    make install
    cd ..

    IMPORTANT! Execute ldconfig one more time:


  11. Install flvtool2

    apt-get install flvtool2

  12. Download qt-faststart from ViMP: Copy the script to /usr/local/bin/ and make it executable:

    chmod +x /usr/local/bin/faststart_64

  13. Create a cron job for transcoding
    • Open crontab. If it prompts, choose the editor you are most comfortable with. I prefer nano.

      crontab -e

    • Insert this line at the bottom, but ensure there is an additional BLANK line after:

      */1 * * * * /var/www/vimp/scripts/ > /dev/null 2>&1

  14. Download the ffmpeg presets from here and move them to /usr/local/share/ffmpeg/

That was a long process, but you're done with the transcoding tools! The last step is installing ViMP, and you'll have your very own video sharing site!

Share this