Presentation links

Update: added some of the source code used.

As promised, I'll put up some links from last nights presentation.. If you attended, I hope I got the message across, and if you're hungry for more, be sure to check out fitc, where I will do a 1 hour version of the presentation..

  • Flowplayer - FlowPlayer is an open source, skinnable, very powerful flash video player..
  • FFMpeg - To my opinion, the best tool out there to convert your video to flv.

    Binaries for OS/X are included in FFMpegX, binaries for windows can be found in Riva FLV encoder. Most Linux distributions also have a pre-compiled ffmpeg package..

    Remember though! Only use those for testing purposes, if you want support and support for for example WMV3, you really should compile your own..
  • SWFUpload - An open source library to leverage Flash 8's multi-file upload from javascript.
  • On2 Flix - An expensive, commercially backed FLV encoder.. If using the latest flash video codec is important to you, look at this product.

And there's even a small piece of the presentation recorded....

</embed>

handling uploads..

Note that these scripts all assume an .mpg extension..

<?php

    foreach($_FILES as $file) {

        $newFileName = 'uploads/original.mpg';
        move_uploaded_file($file['tmp_name'],$newFileName);

    }

?>

Simple conversion

<?php

    $ffmpegPath = '/Applications/ffmpegX.app/Contents/Resources/ffmpeg';
    $input = 'uploads/original.mpg';
    $output = 'uploads/converted.flv';
    $result = `$ffmpegPath -y -i $input -ar 44100 $output 2> /tmp/ffmpeg_log`;

?>

Slightly more advanced..

Adjusts the bitrate, height and width, and also generates a thumbnail.

<?php

    $ffmpegPath = '/Applications/ffmpegX.app/Contents/Resources/ffmpeg';
    $input = 'uploads/original.mpg';
    $output = 'uploads/converted.flv';

    $output = 'uploads/thumb.jpg';
    $result = `$ffmpegPath -y -i $input -an -s 320x240  -f mjpeg -ss 0:2:0 -t 0:0:0.001 $output 2> /tmp/ffmpeg_log`;

    $output = 'uploads/converted.flv';
    $result = `$ffmpegPath -y -i $input -ar 44100 -b 320 -s 320x240 -ab 128 -acodec mp3 $output 2> /tmp/ffmpeg_log`;

?>