Drupal S3 Integration and Flashvideo Module with FFMPEG Installation
Fri, May 22, 2009 by Afraaz
S3, a great technology provided by Amazon, allows users to store an unlimited amount of files through simple web service calls. Amazon S3 is very cost effective, only charging 15 cents per gigabyte and additional charges for the bandwith that is used during retrieveing and sending files. The scalability of Amazon S3 allows video hosting sites to trust that the videos will be available at all times and will not
add to load times when playing videos.
The flashvideo module allows users to convert uploaded video files to Flash format with the help of FFMPEG. These video files after being converted can be embedded into nodes by using a special placeholder, [video], in the node body. The project page mentions that the module has been tested with two great flash players which are:
I was also able to get flashvideo working with Flowplayer. However the site seems to be down at the moment. There is a project for this on Drupal, for Drupal 6, located here.
Flashvideo also integrates well with CCK. The key feature for us was the Amazon S3 integration.

The settings page for flashvideo and the integration can be found at admin/settings/flashvideo/. Here you will find a list of content types that you can enable flashvideo for. After navigating into one of the content types you'll see a fieldset labelled S3 Integration. The Amazon S3 integration takes a few parameters in order to post the converted video files in to the buckets created by the module. The first textfield is for the bucket name. A bucket is just a folder that the converted videos will be stored in. The name of the bucket needs to be unique for each content type that flashvideo is enabled for. The next textfield is for the S3 URL, which should not be changed. The next two textfields are the fields that need to be filled in with the private an public keys provided by Amazon when you sign up for the S3 service.
The flashvideo module has now been setup for S3 integration however we still need to install FFMPEG in order to convert the videos. FFMPEG is a tool that allows us to convert the videos to FLV (Flash format). The easiest way to get FFMPEG is to ask the hosting provider to install it on the server for you. Be sure to ask them to install with MP3 support, or else your videos will not have audio.
Some hosting providers may say no, so you'll need to this by yourself. Here are a few links that I've found to be useful when installing FFMPEG.
- http://www.webhostingtalk.com/showthread.php?t=565563
- http://tovid.wikia.com/wiki/Installing_svn_ffmpeg_on_a_Debian_based_distro
- http://ubuntuforums.org/showthread.php?t=786095
These links will outline the steps neccessary to install FFMPEG with MP3 support on Fedora Core and Debian based distros, respectively. The last link is for Ubuntu which is deb based as well, but the thread specifically says its for 9.04 and 8.10. These instructions will also allow for x624 encoding as well.
For my local machine, running Ubuntu Jaunty Jackalope 9.04, I was able to install FFMPEG with MP3 support with the following command:
sudo apt-get install ffmpeg libavcodec-unstripped-52
This will install the unstripped libraries which includes the restricted encoders.
The only downfall I had was that video thumbnails would need to be stored on the local server, so we could use imagecache to manipulate the images for different parts of the site. However, this was a relatively small issue as the images are really small and don't take too much space on the local server.
The flashvideo module is a great module if you're starting a video hosting site. There are 3rd party video modules as well, such as Kaltura and Brightcove, but these modules are still in their early stages and don't provide the large amount features that flashvideo does.
"The Interweb! My ~ away from ~"
Afraaz posted on May 26, 2009 5:04 pm
Hi Andy,
I haven't worked with Blue Droplet Video project. However, it looks pretty good.
Using S3 we haven't run into any sort of issues regarding server resources. Before we moved to S3 we had issues with server resources when it was trying to load the videos.
You are absolutely correct about the legal concerns with videos and FFMPEG. There's also the risk of uploading copyrighted content as well. We were careful with this on our site.
At the moment the Blue Droplet Video project seems to be for Drupal 6, hopefully they backport for Drupal 5. Thanks for sharing this information.
Thank you.
Andy Hieb posted on May 25, 2009 2:33 pm
thanks, Afraaz.
do you have any comment on Flashvideo vs Blue Droplet Video (Open Package Video in D5)? i've been very happy with op_video, with the exception of exceeding server resources when posting videos to the Open Package web site for transcoding... (OK, it's shared hosting so i can't complain :) .) i assume posting to the S3 service would hit up against the same types of limitations.
also, readers should beware of the server resources required, and potential/hypothetical legal concerns, when using their own installation of FFmpeg. (IANAL, so i'm not sure how much mind it is worth paying the legal issues, but those two factors are why i've been using Open Package's transcoding service...)
video with Drupal seems to be in a lot of flux at the moment, with a lot of exciting new developments, so posts like this are really helpful!
Post new comment