Sunday, March 09, 2008

WMA to MP3 using mplayer and lame

for i in *.wma ; do
mplayer -vo null -vc dummy -af resample=44100 -ao pcm:wavehead $i
lame -m mo audiodump.wav "${i%.wma}.mp3"
done

Install Source Code as an Ubuntu deb Package

The easiest way is as following...

Take foo.tar.bz2 as an examples.

1. tar jxvf foo.tar.bz2
2. cd foo
3. ./configure ; make
4. sudo checkinstall

Installed and deb package generated

Saturday, March 08, 2008

16:9 rmvb to iPod format

mencoder
-ovc lavc -lavcopts vcodec=mpeg4
-vf scale=320:-3,expand=:240:::1::
video filter
scale
320: Width
−3: Calculate w/h using the other dimension and the original aspect ratio.
expand
240: Expanded height
1: OSD/subtitle rendering On
-oac faac
-o intermediate.mp4 input.rmvb

ffmpeg
-vcodec xvid -b 350 -qmax 10 -bufsize 4096 -g 300
-acodec aac -ab 96 -ac 2
-s 320x240
-aspect 4:3
-i intermediate.mp4
output.mp4

Tuesday, March 04, 2008

SNL: Democratic Debate #2

Democratic Debate #2
Hillary and Obama face off again

Monday, March 03, 2008

My experience of CSS

Use descendant selectors carefully, especially for build in html text labels such as <p> and <span>. Descendant selector is convenient to specify general text style only when you already have a whole picture what your website should be look like, or the descendant selector rules may contradict the selector which you want to another kind of style for a identified paragraph. An example:

#container p {
font-color: #000000;
font-size: 16px;
}

#container #someDiv .identifiedP {
font-color: #ff0000;
font-size: 12px;
}

<div id="container">

<div id="someDiv">

<p id="identifiedP">
Text here will be black rather than red as you specify.
</p>

</div>

</div>