Adventures In Video

The first step in building my YouTube clone is making sure all the programs on the server work. If you remember from yesterday, I’m using FFmpeg and JW FLV Player.

Here are some great instructions for installing FFmpeg on a Linux server. Unfortunately my Google-foo was not so strong this morning and I ended up playing around for a while before I found that page. The real trick is making sure you have LAME installed before you compile FFmpeg.

After that, converting a video from QuickTime to FLV is a simple command like this:

ffmpeg -i movie.mov -ar 22050 movie.flv

The -ar option sets the audio rate on the FLV file. Flash movies are very particular about audio bit rate. It must be either 44,100, 22,050, or 11,025. FFmpeg is smart enough to resample the audio track. Depending on the format of your original file, you might also need to specify the audio codec with -acodec mp3.

The JW FLV Player comes with a sample HTML file. It was a simple matter to replace their Flash movie with mine in the HTML and adjust the parameters so it would be the right size on the page.

So far everything has been pretty painless. Tomorrow things will get more interesting when I start trying to fully automate this process.

Evaluating Web Frameworks

Yesterday I talked about choosing one framework to use to build web applications. I decided that the best way to evaluate them was to build a simple application. Not long after I wrote that post, the perfect application basically fell in my lap. (Maybe it’s true that the universe delivers what you need when you need it…)

We have several people at the school district that create videos of everything from daily announcements to sporting events. Currently there’s no easy way for parents to see the videos unless they come to the school or someone burns them a DVD. What we need is an easy way to put them on the web.

In other words, something almost exactly like YouTube. Except it needs to run on our server so we can control what gets uploaded and who gets to see it. I did a little research and found some free programs to make building this a little easier.

First, I’ll need to convert the uploaded files to Flash video format. FFmpeg is a command line program to convert videos. I even found a few examples of other people running it on a web server. The other piece I need is a Flash video player. A nice guy named Jeroen Wijering makes a free for noncommercial use FLV player called JW FLV Player.

So that’s my plan, a simple two or three page web application where people can upload videos (in a variety of formats). The server will convert the video to FLV and update a searchable list. Finally, I’ll use JW FLV Player to make them viewable on the web. The whole thing will also need to be password protected.

Over the next few days I’ll be building this application in Perl, PHP, Ruby, and Python. After that, I should have a really good idea about which framework works best for me. And then I can finally move on to bigger and better applications.

It’s Not About the Tools

I’ve focused on tools for way too long. Back when I played guitar, I thought that if I bought a better guitar it would make me a better player. After that, I thought a faster computer would make me a more efficient programmer. Even more recently, I thought I needed a Mac to be a great web designer.

Now I have an expensive guitar, a fast PC, even a MacBook Pro, but my skills haven’t changed at all. I’m a decent guitar player. I can program anything I want, given enough time. I still couldn’t design a beautiful web page to save my life. But, I do feel like I’ve learned a valuable lesson.

I’ve been saying for years now that I was going to start a software business, but so far I’ve gotten no where. My problem is, again, focusing on the tools. My first big web application was written in Perl. Then I heard about PHP and started working with it. Then I moved on to the latest craze – Ruby on Rails. Now I’m looking at Python and Django.

Thankfully, I’ve finally seen the error of my ways. I’m ready now to stop worrying about the tools and just build something. I know enough about each one to make an educated decision and that’s all I need to know.

One last example – the old me would’ve never written this post. It’s late at night and I would’ve had to go into the office and either sit at the PC or get out my laptop. Instead I just grabbed a pen and some paper and I’m scribbling this down while I sit on the bed. How’s that for getting things done.

Using the right tool for the job is important, but it’s more important to focus on getting the job done.

Sold!

I recently sold the domain EdTechForum.com to a nice guy from New Jersey. I’m not sure if anyone I know was even visiting that site. Just in case, be aware that I don’t own it anymore.

The new owner seems to be doing a great job with it. His design is very nice and it seems to have a lot more features than what I had.

The process of transferring the name to someone else was a little more complicated than I expected it to be. Surely this is something that happens all the time?

What I finally ended up doing was updating the WHOIS information with his name and e-mail address. He was then able to transfer the domain to his registrar. I’m not sure if this was the correct way to do it, but it got the job done.