Dr. Horrible’s Sing-Along Blog
If you’re a fan of Joss Whedon (Firefly, Serenity, Buffy the Vampire Slayer), Nathan Fillon (Firefly, Serenity), Neil Patrick Harris (Doogie Howser M.D., How I Met Your Mother), musicals, and comedy, you should take the time to check out Dr. Horrible’s Sing-Along Blog.
Doogie, I mean Barney, I mean Neil Patrick Harris plays a fantastic Dr. Horrible, who is trying to get into the “Evil League of Evil!” Nathan Fillon (who played “Captain Mal” on Firefly/Serenity) plays Captain Hammer, the shallow jerk of a superhero who steals the girl (Felicia Day) from Dr. Horrible when she mis-credits Captain Hammer for saving her life from a runaway van.
Anyway, I don’t want to give too much away, but it’s available streamed from DrHorrible.com and also from iTunes (it’s only $4 total for a season pass for all three episodes). Check it out! It’s great!
Visiting Chicago
I’m visiting my best friend Eric in Chicago this weekend. I’ve never been to Chicago before, but I must say that the few blocks of downtown that I’ve seen are simply breathtaking. Beautiful architecture and tall buildings give this place a very different feel from the more familiar San Francisco or San Jose, CA.
Between the flights today, I didn’t have a chance to eat dinner. So when I got here, I decided to get something to eat… that, and I wanted to go exploring a bit. In the end, I ended up walking around the downtown area of a large, unfamiliar city all by myself at 1:00am. Although quite unorthodox for me, it was a fun hour of walking around. It’s about 80 degrees and humid, even at 1:00am.
Coincidentally, my friend Michelle is also visiting Chicago from the Seattle area. I didn’t know this until after we’d already booked our flights, but she’s a professional photographer and scrapbooker and apparently there’s some convention in Chicago this weekend. I ended up chatting with a lady on the place and on the subway ride afterwords that was going to the same convention where my friend Michelle is going to be.
I’ll be meeting up with Eric and his girlfriend Katie tomorrow. It’s going to be fun!
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.
- 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;
- 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.
- 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;
- 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 ..;
- 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 ..;
- 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 ..;
- 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 ..;
- 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 ..;
- 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 ..;
- 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 ../../../;
- 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 ../;
- 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.
- 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 ..;
- Add FFMPEG-PHP to the PHP configuration.
echo "extension=ffmpeg.so" > /www-config/php-ini/ffmpeg.ini
- 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

