Published:

2 Oct 2008

Categories:

AWS
Code
Projects

Comments:

1 total

Tarzan 2

If you’ve been following my blog over the past few years, you might remember an old project I was working on back in early 2005 called Tarzan. At the time, the only Amazon web service was their e-catalog (e-commerce) service, and that was was Tarzan specialized in.

I ended up scrapping the project around the same time as Geoffrey came to me and said that he wanted to help work on another one of my little side projects, SimplePie. Of course, as most of the web development community knows, SimplePie has gone on to be wildly popular and Tarzan essentially bit the dust.

Fast-forward two years, and I’ve started my own company, WarpShare. I’ve spoken before about the frustrations I’ve had trying to find and download music, movies, and TV shows with high quality, no DRM, with excellent metadata, all for cheap or free. “Legal” is nice, but not required. I believe many of us feel the same way. So I went on to start a company where one of the focuses is to do almost exactly this, except that the “legal” became required instead of optional, and where all parties involved can get what they want. But I’m not here to talk about that.

We knew that an undertaking of this kind of magnitude would require quite a bit of infrastructure, lots of data processing, and huge databases for cheap or free (we’re a pre-VC funding startup). Amazon’s new “cloud computing” initiative to the rescue! I’ll let you read up on Amazon Web Services on your own, but I ended up deciding to resurrect the old Tarzan project as something entirely new. That currently-in-development software will, when officially released, be known as Tarzan 2.0.

I’ve already spent some time talking about it, so if you’re interested in this new “cloud computing” thing (including storage-in-the-cloud and lightweight-databasing-in-the-cloud) and you’re a PHP developer, take a moment to give Tarzan a look. I think you’ll like it.


Published:

28 Jun 2008

Categories:

Code
Software

Comments:

3 total

Installing FFMPEG and FFMPEG-PHP in Fedora 8 running on Amazon EC2

I’ve spent a bit of time working with Amazon EC2 recently. One of the things I’ve been working on is getting a stable build of FFMPEG and FFMPEG-PHP running on a Fedora 8 image in Amazon EC2. This is essentially going to be a tutorial to get things up and running. Of course, your milage may vary.

These instructions apply to a 32-bit Fedora 8 installation. The hardware I primarily use happens to be on EC2, but these instructions aren’t specific to EC2. You may need to tweak things a smidge for an x64 system.


Preparing the LAMP stack (and a few other things)

For FFMPEG-PHP to work, you need to have a web server with PHP support up and running. You’ll definitely need GD for image processing and mbstring is helpful in conjunction with PHP5’s built-in iconv support for managing multiple character sets in ID3 tags.

  1. Install PHP, necessary extensions and supporting software.
    yum -y install php-devel php-gd php-mbstring gcc gcc-c++ libtool svn git yasm gsm-devel libogg-devel libvorbis-devel libtheora-devel;
  2. Also, I like to create a directory with symlinks to important files so that I can access everything more efficiently. These will be used throughout this tutorial.
    mkdir /www-config; \
    ln -s /etc/init.d/httpd /www-config/httpd; \
    ln -s /etc/httpd/conf/httpd.conf /www-config/httpd.conf; \
    ln -s /var/log/httpd/ /www-config/logs; \
    ln -s /usr/lib/php/modules/ /www-config/php5-extensions; \
    ln -s /etc/httpd/conf.d/php.conf /www-config/php.conf; \
    ln -s /etc/httpd/conf.d/ /www-config/apache-conf; \
    ln -s /etc/php.ini /www-config/php.ini; \
    ln -s /etc/php.d/ /www-config/php-ini; \
    ln -s /var/www/html/ /www-config/public-html; \
    /www-config/httpd restart;

PHP 5.x should now be installed and you should have a directory prepared that lets you easily access important files for managing your configuration.


Installing FFMPEG

FFMPEG can be fairly complicated to get running properly, so here’s what I’ve gotten working thus far.

  1. Download FFMPEG source. Export the latest FFMPEG trunk from Subversion, then change to the source directory.
    svn export svn://svn.mplayerhq.hu/ffmpeg/trunk /ffmpeg-trunk-source; \
    cd /ffmpeg-trunk-source;
  2. Install x264. Export the latest x264 trunk from Git. Enter the directory, make, install, and go back to the parent directory.
    git clone git://git.videolan.org/x264.git; \
    cd x264; \
    ./configure --prefix=/usr --enable-shared --enable-pthread; \
    make; \
    make install; \
    cd ..;
  3. Install liba52. Download the latest version of liba52 (Currently 0.7.4). Decompress the package, enter the directory, run configure, make, install, and go back to the parent directory.
    wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz; \
    tar -zxvf a52dec-0.7.4.tar.gz; \
    cd a52dec-0.7.4; \
    ./configure --prefix=/usr --enable-double; \
    make; \
    make install; \
    cd ..;
  4. Install FAAC. Download the latest version of FAAC (Currently 1.26). Decompress the package, enter the directory, create the configure file, run configure, make, install, and go back to the parent directory.
    wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz; \
    tar -zxvf faac-1.26.tar.gz; \
    cd faac; \
    autoreconf -vif; \
    ./configure --prefix=/usr; \
    make; \
    make install; \
    cd ..;
  5. Install FAAD. Download the latest version of FAAD (Currently 2.6.1). Decompress the package, enter the directory, create the configure file, run configure, make, install, and go back to the parent directory.
    wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz; \
    tar -zxvf faad2-2.6.1.tar.gz; \
    cd faad2; \
    autoreconf -vif; \
    ./configure --prefix=/usr; \
    make; \
    make install; \
    cd ..;
  6. Install LAME. Download the latest version of LAME (Currently 3.98b8). Decompress the package, enter the directory, run configure, make, install, and go back to the parent directory.
    wget http://downloads.sourceforge.net/lame/lame-3.98b8.tar.gz; \
    tar -zxvf lame-3.98b8.tar.gz; \
    cd lame-3.98b8; \
    ./configure --prefix=/usr; \
    make; \
    make install; \
    cd ..;
  7. Install libmpeg2. Download the latest version of libmpeg2 (Currently 0.4.1). Decompress the package, enter the directory, run configure, make, install, and go back to the parent directory.
    wget http://libmpeg2.sourceforge.net/files/mpeg2dec-0.4.1.tar.gz; \
    tar -zxvf mpeg2dec-0.4.1.tar.gz; \
    cd mpeg2dec-0.4.1; \
    ./configure --prefix=/usr; \
    make; \
    make install; \
    cd ..;
  8. Install Xvid. Download the latest version of Xvid (Currently 1.1.3). Decompress the package, enter the directory, run configure, make, install, and go back to the parent directory.
    wget http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz; \
    tar -zxvf xvidcore-1.1.3.tar.gz; \
    cd xvidcore-1.1.3/build/generic; \
    ./configure --prefix=/usr; \
    make; \
    make install; \
    cd ../../../;
  9. Install AMR/3GPP. Download the latest version of AMR (Currently 7.0.0.1). Decompress the package, enter the directory, run configure, make, install, and go back to the parent directory.
    wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.1.tar.bz2; \
    tar -jxvf amrnb-7.0.0.1.tar.bz2; \
    cd amrnb-7.0.0.1; \
    ./configure --prefix=/usr; \
    make; \
    make install; \
    cd ../;
  10. Compile FFMPEG. Configure, make, and install the software, including all options that enable enhanced functionality.
    ./configure --prefix=/usr --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-liba52 --enable-liba52bin --enable-libamr-nb --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid; \
    make; make install;

Installing FFMPEG-PHP

Once you have FFMPEG functioning properly, you can install the FFMPEG-PHP extension.

  1. Download and install FFMPEG-PHP source. Enter the directory, download the source, run phpize, configure, make, install, and go back to the parent directory.
    cd /ffmpeg-trunk-source; \
    wget http://downloads.sourceforge.net/ffmpeg-php/ffmpeg-php-0.5.3.1.tbz2; \
    tar -jxvf ffmpeg-php-0.5.3.1.tbz2; \
    cd ffmpeg-php-0.5.3.1; \
    phpize; \
    ./configure --prefix=/usr; \
    make; \
    make install; \
    cd ..;
  2. Add FFMPEG-PHP to the PHP configuration.
    echo "extension=ffmpeg.so" > /www-config/php-ini/ffmpeg.ini
  3. Restart Apache.
    /www-config/httpd restart

FFMPEG and FFMPEG-PHP should now be installed and ready to go. Make sure to check your error log if something isn’t working properly.

cat /www-config/logs/error_log

Published:

11 May 2008

Categories:

Code
Design
Projects

Comments:

None

Yahoo! Messenger redesign is live!

Internally known as “Aurora,” the new Yahoo! Messenger redesign has finally launched! I was going to write something up about it, but Ryan Doherty and Adrien Cahen have all written plenty. Check it out! :)

Also, Digg it! http://digg.com/tech_news/New_Yahoo_Messenger_website_is_LIVE