So you want to publish that nice family video in your page/blog/intranet without forcing your visitors to download, install and activate some obscure browser plugin and *then* wait for a 200MB download… Well.. That’s easy as cake!
First, let’s use ffmpeg to convert the video from avi, mpg or mov to something that we can stream to a nice Flash video player:
$ sudo aptitude install ffmpeg
$ ffmpeg -i video.mpg -ar 11025 -s 320×240 video.flv
Then we extract the first frame of the video to use it as a thumbnail:
$ ffmpeg -y -i video.mpg -f image2 -ss 5 -vframes 1 -s 320×240 -an video.jpg
Of course, real men brew their own Flash video players using Ming. The rest of us have to settle for one that has been pre-made, like Jeroen Wijering’s most excellent Flash Video Player. To insert the video in a web page you just have to write
<object type="application/x-shockwave-flash" width="320" height="260" wmode="transparent" data="flvplayer.swf?file=video.flv&image=video.jpg&autoStart=false">
<param name="movie" value="flvplayer.swf?file=video.flv&image=video.jpg&autoStart=false" />
<param name="wmode" value="transparent" />
You know, there’s even a neat wordpress plugin that allows a much simpler syntax:
[flv:/path/to/video.flv 320 240]
Cool, eh? Now you are ready to take over YouTube!
After playing around with the WordPress Widgets plugin I wrote a couple of widgets for WPG2 borrowing heavily from the sample widgets in the widget plugin distribution and also from Otto’s Google AdSense widget.
WPG2 Random Image and WPG2 Grid Block are released into the public domain, and you can download version 1.0 right here.
Oh! BTW, I just set up a page for these widgets.
Last Sunday I upgraded WordPress to 2.0.3, and I have to confess that I am very impressed. After a couple of disastrous dry runs in a spare server, I backed up everything and decided to go for it on the production system — half expecting it to crash somehow. However the upgrade went smoothly, and almost every plugin just kept working exactly as before, with the sole exception of WPG2. Since the website recommends to upgrade to Gallery2 2.1.x and to the new WPG2 2.0 plugin, I did just that and got the embedded gallery working again in no time.
Kudos to both WordPress and Gallery2 teams. You have created nice pieces of software, and are setting a high standard for commercial and Open Source blogging and photo gallery software.
Kudos, and thanks.