Videos for the web

I recently did some investigation into how to post videos on the web in formats easily accessible to the widest audience. Sites like YouTube make videos available via a flash frontend, which means most people can watch them without installing additional software (and it's generally a lot easier to install Flash than a new video codec).

I expected that I would require proprietary software or tools in order to do something like this, and so I was delighted to discover FlowPlayer, an open source Flash-based video player which can play back .FLV videos.

The FlowPlayer website also contains documentation on how to convert videos to .FLV using free software. Things have become a bit simpler since the instructions were first posted, though. In Debian, I just needed to:

  • Add the following line to your /etc/apt/sources.list if necessary:
         deb http://www.debian-multimedia.org stable main
         deb http://www.debian-multimedia.org testing main
         
  • Install ffmpeg and lame (I used testing)
  • Convert from an AVI file using:
          ffmpeg -i input.avi -s 320x240 -ar 44100 -r 12 movie.flv
          
  • I found that the flvtool2 command mentioned in the FlowPlayer documentation wasn't actually necessary; FlowPlayer seemed to recognize the total runtime of the video with difficulties.
  • It can be helpful to insert a "-t 0:1:00" into the ffmpeg command to only convert the first minute of a file. This makes it faster to test different sizes of output.

Once you have the FLV file, just follow the FlowPlayer instructions to put the video on your website.

When posting a video on a front page which gets lots of page views, you might not want to have FlowPlayer start downloading the (potentially large) video file unless a user really wants to view the video. You can achieve this by setting autoBuffering to false in the flash variables, like so:

  <param name="flashvars" value="videoFile=uncomfortable_truth.flv&autoBuffering=false" />
  

Posted by Jason Hildebrand <jason@opensky.ca> Friday Nov 24, 2006 at 5:22 PM

Videos for the web

I recently did some investigation into how to post videos on the web in formats easily accessible to the widest audience. Sites like YouTube make videos available via a flash frontend, which means most people can watch them without installing additional software (and it's generally a lot easier to install Flash than a new video codec).

I expected that I would require proprietary software or tools in order to do something like this, and so I was delighted to discover FlowPlayer, an open source Flash-based video player which can play back .FLV videos.

The FlowPlayer website also contains documentation on how to convert videos to .FLV using free software. Things have become a bit simpler since the instructions were first posted, though. In Debian, I just needed to:

  • Add the following line to your /etc/apt/sources.list if necessary:
         deb http://www.debian-multimedia.org stable main
         deb http://www.debian-multimedia.org testing main
         
  • Install ffmpeg and lame (I used testing)
  • Convert from an AVI file using:
          ffmpeg -i input.avi -s 320x240 -ar 44100 -r 12 movie.flv
          
  • I found that the flvtool2 command mentioned in the FlowPlayer documentation wasn't actually necessary; FlowPlayer seemed to recognize the total runtime of the video with difficulties.
  • It can be helpful to insert a "-t 0:1:00" into the ffmpeg command to only convert the first minute of a file. This makes it faster to test different sizes of output.

Once you have the FLV file, just follow the FlowPlayer instructions to put the video on your website.

When posting a video on a front page which gets lots of page views, you might not want to have FlowPlayer start downloading the (potentially large) video file unless a user really wants to view the video. You can achieve this by setting autoBuffering to false in the flash variables, like so:

  <param name="flashvars" value="videoFile=uncomfortable_truth.flv&autoBuffering=false" />
  

Posted by Jason Hildebrand <jason@opensky.ca> Friday Nov 24, 2006 at 5:22 PM