<?xml version="1.0"?>
<item id="4069">
  <title>Videos for the web</title>
  <description>
  <p>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).
  </p>

  <p>I expected that I would require proprietary software or tools in order to do something like this, and so I was delighted to discover <a href="http://flowplayer.sourceforge.net/">FlowPlayer</a>, an open source Flash-based video player which can play back .FLV videos.</p>

  <p>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:</p>
 
  <ul>
  <li>Add the following line to your /etc/apt/sources.list if necessary:
     <pre>
     deb http://www.debian-multimedia.org stable main
     deb http://www.debian-multimedia.org testing main
     </pre>
     </li>
  <li>Install <b>ffmpeg</b> and <b>lame</b> (I used testing)</li>
  <li>Convert from an AVI file using:
      <pre>
      ffmpeg -i input.avi -s 320x240 -ar 44100 -r 12 movie.flv
      </pre>
      </li>

  <li>I found that the <b>flvtool2</b> command mentioned in the FlowPlayer documentation wasn't actually necessary; FlowPlayer seemed to recognize the total runtime of the video with difficulties.</li>
  <li>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.</li>
  </ul>

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

  <p>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 <b>autoBuffering</b> to <b>false</b> in the flash variables, like so:
  <pre>
  &lt;param name="flashvars" value="videoFile=uncomfortable_truth.flv&amp;autoBuffering=false" /&gt;
  </pre>
  </p>

  </description>

  <category>Unix</category>
<pubDate seconds="1164410564.94">2006-11-24T17:22:44-07:00</pubDate><comment-count>119</comment-count></item>
