A web developing, photo taking, Muay Thai fighting man.

Encoding Flash Video (FLV) in Ubuntu 8.04 using FFMpeg

Posted: April 26th, 2009 | Author: James | Filed under: Web Development, linux | No Comments »

Recently while helping a friend with their website I required the need to convert any video file uploaded to FLV and have that display on the site.  My first instinct was to set up a conversion pipeline using FFMpeg on the Ubuntu server and have that convert the videos as required.  Unfortunately there seems to be an issue with the standard FFMpeg release on Ubuntu as it has issues attaching the sound when converting to Flash video.

Luckily it can be fixed fairly trivially by installing FFMpeg from Medibuntu.  Turns out the FFMpeg is in Medibuntu as some of the encoding libraries it use may violate some patents.

To get things up and running start by adding Medibuntu to your sources lists

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

and then add Medibuntu to your sources keyring

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

Finally, install FFMpeg and its related tools

sudo apt-get install ffmpeg
sudo apt-get install libavcodec-dev libavcodec1d libavformat-dev libavformat1d libavutil-dev libavutil1d libpostproc-dev libpostproc1d libswscale-dev libswscale1d

And now when doing conversions with FFMpeg on Ubuntu the sound should be properly encoded as well.  This information was grabbed from the Ubuntu Forums.


links for 2009-04-17

Posted: April 17th, 2009 | Author: James | Filed under: Uncategorized | No Comments »

More on Hosting with Amazon EC2

Posted: April 17th, 2009 | Author: James | Filed under: Web Development | Tags: , , , | 1 Comment »

After moving the hosting of oceanseventy to Amazon EC2 before departing for pastures new I was fairly keen to try it out again on a site that was more than a few hundred hits a day.  I recently had call to host a single static page that would get hit about 13,000 times within the space of a couple of hours – but do very little for the rest of the time.

So I set up a small instance running on EC2, running Ubuntu 8.04 and tweaked Apache2 a little to increase the MaxClients setting.

Unfortunately not everything went to plan.  While the server itself was rock solid the response times from Apache grew very quickly to 20+ seconds.  So I’m trying to figure out what the next plan of attack is.  Do I set up a load balancer on EC2 and share the load with a number of instances, or do I go with a larger instance for the duration of the traffic spike, upgrading to a large or extra large instance.  Are there some settings I should be tweaking on Apache?  Should I be trying out an alternate webserver like Lighttpd?

Or maybe I give up and get back to the day job :)  Any advice appreciated.


links for 2009-04-16

Posted: April 16th, 2009 | Author: James | Filed under: Uncategorized | No Comments »

links for 2009-04-02

Posted: April 3rd, 2009 | Author: James | Filed under: Uncategorized | No Comments »