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....
Sorry, this video website no longer exists
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`;
?>
Comments
Manfred Weber •
Looks like you gave a nice presentation. I recently had to write an article for the german php magazine about the ffmpeg extension ( http://manfred.dschini.org/2007/02/07/phpmagazin-article-1/ ) and I started to love ffmpeg. Also the GD integration could not be better.Adam •
It was a good presentation! Will you be posting the PHP files you used?Evert •
Sure.. they were all pretty straightforward.. I'll update this post