PHP: Dynamic Day List of Weather URLs

Not sure how to dynamically list days in the future on fixed URLs?

A recent problem arose when trying to provide a dynamic list of linked URLs on a page based on the textual name rather than the numeric date (see right). A number of sub-pages on a website has unique, but not ordered URLs, suffixed with a page number (numeric). It is easy to simply statically list them, but why not dynamically put them in ascending order? Find out how to do it here.

Dev: Creating Flash Video from WMV files using Mencoder

A common problem nowadays is how to create flash videos, but not have to download windows applications to do it.

If you are happy to run Linux, then you can use Mencoder, part of the MPlayer suite of applications. Either use RPM manager, Yum or another package manager to download the package to your Linux desktop. Then get you WMV file from a digital camera or from Microsoft Windows Movie Maker and get it onto your linux PC.

Now, to use Mencoder means you have to type stuff at the command prompt (shell). In the same folder as the WMV file, type out the following command line and parameters.

This version will encode at 500k video:


mencoder Winter_Aero_Tow_0002.wmv -o Winter_Aero_Tow_0002z.wmv.flv -of lavf -oac mp3lame -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -ofp 24

The output was about 21Mb.

This version uses 400k video – deriving a saving of 50% (output 11Mb).

mencoder RGC_Summer.wmv -o sum.wmv.flv -of lavf -oac mp3lame -ovc lavc -lavcopts vcodec=flv:vbitrate=400:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -ofps 24

This will create a flash video that you can play on the Linux PC (using Mplayer or similar). Now you can use the flash-encoded file as you wish.