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.

Share/Save/Bookmark



Leave a Reply