Archive for February, 2006

ajax links / bookmarks

I have this idea for over some time, that the links in wordpress be displayed in a “ajax” manner, in a way like super archives. It may help esp. if there are huge list of links and grouped in many categories. In a way this links can be your online bookmarks. Anyway I wont have the time to create any plugin now, but I found many links which might (or not) be useful.

ajax examples
http://www.fiftyfoureleven.com/resources/programming/xmlhttprequest/examples

Onjava article on handling ajax bookmarks
http://www.onjava.com/pub/a/onjava/2005/10/26/ajax-handling-bookmarks-and-back-button.html?page=4
http://codinginparadise.org/weblog/2005/09/ajax-how-to-handle-bookmarks-and-back.html

Google Page Creator - AjAX html WYSIWYG builder
http://pages.google.com/
yourname.googlepages.com

Draggable lists
http://www.gregphoto.net/sortable/index.php

Ajax bookmarking
http://swik.net/

Another online/social bookmarking
http://www.digglicious.com/
http://www.spurl.net/
http://www.netvouz.com/
http://del.icio.us/

Social bookmarking reviews
http://www.dlib.org/dlib/april05/hammond/04hammond.html
http://www.irox.de/roxomatic/1050

which reminds me of TADA lists and other todo lists.

More Video Compression

I mentioned about rmvb compression the previous time. Now for many reasons you might want to convert rmvb to other formats (for burning, for playback on low cpu pcs..), here’s some tutorials you ever need.

For me, what I used was Real Alternative, VirtualDub, and AviSynth. You create an AVS file (AviSynth Script), with a line of

DirectShowSource(”d:\video.rmvb”, fps=29.97, convertfps=true)

would do the job. For me, ffdshow video and audio filters would be running when the virtualdubbing is in progress. I must recommend ffdshow filters as quick and good, supporting many file types, with many filters and options (and effects), and its audio filters even supports winamp DSP plugins.

One media player I cannot afford to miss out is mplayer. Not the mplayer in windows 95 but the free open source which many linux distro use for video playback. Now not only it comes with lots of features too, it supports almost any video format and run with the least resources, even in windows (try the win32/mingw port!). Although there are many keyboard shortcuts, command line switches, many frontends are available even for the windows version.

Now included in the mplayer project is mencoder, whose job is for encoding video into another format. Need some for this (again) console software? Try these tutorials 1, 2, 3.

Again, frontends are available, but I think MediaCoder does seems to cover anything you need. (Another quality Chinese product addition to BitCommet, Easy Realmedia Producer). The downside is that if you are on a SMP(multiprocessor) / hyperthreading, not all your processing power will be utilised. This is because of mplayer’s single thread core, which is its weakness, as well as its strength. 2 solutions I have? 1) look for mplayerXP & mencoderXP, the multi-threaded mplayer. 2) Run more than 1 mencoder at the same time.

IMHO, after mplayer, the next best video client is VideoLan client. It supports many many formats, and also have capabilities to relay streams, and encode files too.

Going on to the next cool tool I found, its WMNicEnc - A Windows Media 9 Encoder that takes AviSynth scripts as input. Here you have almost limitless possibilities on what and how you want to encode to window media files.

Next. Online video gallery are very popular nowadays, eg. Google Video, YouTube. The fact that they use a flash format for their videos make downloading harder. I think it didnt take long for someone to come up with a greasemonkey script which allows downloading of the video to harddisks. I think however this scripts are outdated are nonworkable - google provide for psp/ipod downloads.

No matter what, some sites were setup to copy the videos and allowed for download. See this “frontend” for youtube, google video, and another for google videos in flv,avi,mp4.

Sudoku and My Handphone Solver

Sudoku is the short of “suji wa dokushin ni kagiru (æ•°å­—ãÂ?¯ç‹¬èº«ãÂ?«é™Â?ã‚‹),” meaning “the digits must remain single”. Its also called Nanpure (Number Place). Don’t mistaken this “Number Puzzle” for a magic square, it doest require adding, at the least maybe just counting. These numbers infact can be substitute with symbols, but digits are still the easiest way to represent 9 objects. The rule fill in digits so each digit(1-9) can only appear once in each row and column in the 9×9 grid, and each 3×3 subgrid. Most of the time you can solve the puzzle finding some pattern by observation.

The first encounter with sudoku The first time I saw of it was when I was reading Bittorrent’s creator Bram Cohen (cant remember was in his biography or interview about his Asperger’s Syndrome ) , when he found out he enjoy playing this game and hence learn about this puzzle.

As usual I learnt alot about the game from a wikipedia article on it.

Just as how Soduku popularise in many other countries, it became popular after appearing daily in Today Newspaper. I spend some fun time (or killing time) in camp solving the daily puzzle from copies of Today’s newspaper my campmate brings.

I believe this topic attract a considerable interest in the programming world, i decide to give a try at it too.. While I didnt do much well, the web provides lots of methods and implementations.

Then came my idea of using my mobile phone to play and solve it. Maybe it was just an idea to show off how my mobile phone can solve a puzzle when the rest are scribbling with pen and paper. So I I decided to create a Sudoku Puzzle Solver midlet for my Nokia 3120 Symbian series 40 phone.

What I use is a port/modification of Stan Chesnutt’s Java implementation/library of Knuth’s Dancing Links Method (see his university research paper)

Its interesting to know that Donald Knuth’s Dancing Links Algorithm uses his Algorithm X method. Dancing links seems to be the most efficient and organised way to find all solutions to a sudoku puzzle. Its uses boolean matrix of up to 700+rows and 500+columns. The operation on the matrix will be the algo x, where trys to solve cover leaf problems in the most efficient way. Here’s also another link for a comparision of dancing links implementations.

Anyway here’s the download to my initial version of my sudoku solver.

I thought at first maybe this sudoku was the only version for mobile phones around (at least free) but I found myself wrong after looking up getjars.com.. Happy Sudoku-ing on your mobile phone!

Behind Every Successful Man…

, there is a woman” goes the popular saying. Or a good woman, or a wife.

A magnet in my aunt’s house caught our eyes…
“Behind Every Successful Man, is an exhasted woman..”

We were quick to come up with a few more
“Behind every unsuccessful man, is also a woman.”

“Behind a sucessful man, is many women.”

Of course, the variations list would go.

Some others would say..

“Behind a successful woman, is no man.”

“Behind every successful man, there is a woman
And behind every unsuccessful man, there are two. ”

“Behind every successful man is an
astonished wife”

RMVB Video Compression

I first started playing around with video compression about 5 years ago (after gotten interest in audio compression too). Since loss-less compression wouldn’t work well with videos formats, playing with lossly compression could a uncompressed avi to 1/3 and then depending on what you do, even a compressed vcd format (mpeg-1) to another 1/3.

Perhaps I first learned about the vcd format which is mpeg1. VCDcutter then was a cool tool I tried using.

So I moved on VirtualDub w/ mpeg (hacked ones), divx codecs (xvid came later), where there are plenty much more options to work with.

I tried Media Cleaner to produce quicktime files.

Then came along the release of Windows Media 8 and I tried the beta and it did impress me it could produce the best quality at the lowest size. Of course nowadays you can get the Windows Media Encoder or Movie Maker included in Windows for easy usage. Windows Media version is now either 9 or 10 with lots of other features including HD and lossless formats.

Talking about lossless codecs, the APE or monkey audio format is one of my favorite. Not too long ago, I notice some promising video lossless codecs, one of them being Alparysoft Lossless Video Codec

Talking about codecs, you wouldnt want to miss out on this webpage Free Codecs. One of the fravorites again is the K-Lite codec pack with Real and Quicktime alternative. Not forgetting another interesting compression subject I touch on before is KVcd- which lets you encodes videos on VCDs or DVDs such that it contains much more length but at a maintained quality playable on vcd/dvd players.

Back to subject, I realised nowadays Real media compression gives really good quality at the small size. Actually Real compression was one of the first I used, considering that I used MusicMatch jukebox long time ago. Nowadays, rmvb(Real Media variable bitrate) are the preferred video releases by china groups if you have noticed.

A DVD quality file sizes about 400mb instead of 700mb. Drawsides, more cpu is needed. You might get lots of lag if you are running a cpu below 500mhz. The latest version for real codecs is now 10. Sometime ago, (after RealOne player was released), part of real was open sourced under Helix I think.

So how do you encode rmvb easily. This was what I learn recently. 1 tool you might only need is Easy RealMedia Producer. Here’s a very cool tutorial on the subject .

Mind you though, encoding takes lots of CPU power (so you now get 1 way using all the idle cpu potential you have), with my 2.8GHz Hyper-threading cpu, converting to ~400kbps vbr file would cost more than 1min encoding for 1 min of playback. Anyway Easy RealMedia Producer is really easy to use and encode all your video in batches. You can leave it on the whole night, and let the pc shutdown when its done. Happy encoding.