Setup Lighttpd for Vedio Streaming

Lighttpd is said that much lighter that Apache. I tried to set it up for flv and H.264 streaming. The configuration is relatively easy.

1. Download lighttpd-1.4.29.tar.gz

2. Download lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz
(This is the patch for mod_h264)

3. Open tar ball of lighttpd
tar zxvf lighttpd-1.4.29.tar.gz

4. Patch h264-mod
mv lighttpd-1.4.29 lighttpd-1.4.18
tar zxvf lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz

5. config /etc/lighttpd.conf
basic setup:

server.port = 80
server.username = “lighttpd”
server.groupname = “lighttpd”
server.document-root = “/var/www”
server.tag = “lighttpd”
server.pid-file = “/var/run/lighttpd.pid”
server.errorlog = “/var/log/lighttpd/error.log”
include “conf.d/access_log.conf”
index-file.names += (
“index.html”, “index.htm”, “index.php”
)
include “conf.d/mime.conf”

6. module.conf
server.modules = (
“mod_access”,
“mod_fastcgi”,
“mod_h264_streaming”,
“mod_flv_streaming”,
“mod_rewrite”,
“mod_auth”,
)
h264-streaming.extensions = ( “.mp4” )
flv-streaming.extensions = ( “.flv” )

7. Setup vhost
There’re many samples out there for this part already, so I won’t write any here.

8. FCGI
I had FCGI installed in advance. To have lighttpd uses FCGI, edit

conf.d/fastcgi.conf

fastcgi.server = (
“.php” =>
(( “host” => “127.0.0.1”,
“port” => 81,
“bin-path” => “/usr/local/bin/php”
)),
)
9. restart lighttpd
Then you can see the lighttpd started fcgi process

10. Use jwplayer
download mediaplayer.zip
unzip it and copy “jwplayer.js” and “player.swf” to a folder under docroot of the site
check the “JW Player Quick Start Guide.pdf” in the zip file for how to use javascript to embed jwplayer to stream.

Larry the cat

Source From: http://www.bbc.co.uk/ukchina/simp/elt/take_away_english/111116_tae_343_cat_story.shtml

Larry the cat

Has Larry become just another government fat cat?

Larry the cat is still top dog at Number 10 Downing Street.

The British Prime Minister’s cat was brought in earlier this year after a large rat was seen running around.

But he has lately become tangled up in controversy. On Monday it emerged that a mouse had appeared at a Prime Ministerial dinner.

Then on Tuesday Larry was photographed sleeping on the job, as he took a nap during the arrival of ministers for their weekly cabinet meeting.

Has Larry become just another government fat cat? David Cameron’s spokesman dismissed rumours that the tabby’s predatory drive isn’t as strong as it was believed – even though it has emerged that the PM had to throw a fork at a mouse during a recent dinner with ministers.

Larry isn’t the first ‘First Pet’ to be dogged by controversy. George W Bush’s dog Barney’s pet hate seemed to be journalists. Being on a leash didn’t prevent him from biting a reporter’s finger.

But then, that’s exactly the kind of loyalty a premier needs. Pets are steadfast, companionable and of course never let the cat out of the bag.

Indeed, in the dog eat dog world of politics, it must sometimes feel like a dog is not just man’s best friend, but his only one.

In 1997, while Bill Clinton was himself in the doghouse for his affair with the White House intern Monica Lewinsky, he was photographed constantly in the company of his Labrador, Buddy. As the saying goes: “If you want a friend in Washington, get a dog”.

top dog首领,头号人物
to be tangled up陷入某种纠纷
to sleep on the job怠工,打盹
a fat cat肥猫,指薪水过高的人
to dismiss rumours否认谣言
a tabby(虎斑)猫
predatory drive寻食的本能/动力
the First Pet相当于第一夫人的位置
to be dogged by something受到某事的负面影响

a pet hate特别讨厌的东西或人
to be on a leash拴在链条/绳索上
to bite咬
steadfast立场坚定的,不变的
companionable友善的
to let the cat out of the bag不小心吐露了秘密
dog eat dog狗咬狗,无情竞争
man’s best friend人类最忠实地朋友
to be in the doghouse被打入冷宫

Mammoth hiking Aug. 2011 (3)

[singlepic id=104 w=320 h=240 float=left]

Duck path trail is a beautiful trail with many lakes. It starts from the cold water camp ground close to lake Marry. Last year we only walk a part of it, where i got many gorgeous water fall photos.
It’s 8 miles and a half hike, around 2000 feet elevation gain. On the way, there are lakes called Arrowhead, skeleton lake, Barney and Reds lake. At the end of the trail is the duck lake, very huge and the view is breath-taking. Barney lake is different from the others because of its color, not deep blue but green. At the higher part of the trail where close to the duck lake, you can see 3 lakes down there. Barney lake’s color reminds me sea with reef on the bottom at Hawaii.

Mammoth hiking Aug. 2011 (2)

[singlepic id=103 w=320 h=240 float=left]

For 45 minutes drive from Mammoth and there we came to the Yosemite national park east entrance. A small parking next to the gate was the trail head to the Gaylor lakes and Granite lakes. It starts at 9900 feet.
The beginning of the trail was steep. After getting up to the ridge, around 10600 feet ,  the beautiful view of the Gaylor lake shows up when looking down in the valley. The view of  snow mountains in the far back are amazing too.
Passing Gaylor lake, it’s a easy walk to the upper Gaylor lake then to the miner’s shack, except a part on a snow field and attack of hundreds of mosquitos. I tried to use hood and hat to protect my face but still got a few bites. They even bit through my long sleeve jacket on my shoulder. This year the snow melt later than usual and it seems the mosquito season is delayed too. It’s wise to have some bug nets and bug spray with you. On the way back, i took some nice photos of some wild flower and the granite lake.
The hike was totally 5 miles. Came back to the trail head, we decided to drive a little bit more into the Yosemite. Olmstedt point was 8 miles away. From there view of Half dome is pretty clear. It’s obviously a popular spot of photo shooting.
Tenaya lake is a huge lake on the way to the Olmstede point. It is very beautiful but just not so quiet because of the popularity.
Dinner was at the lodge, including sauteed chicken, boiled corn and veg soup. It was delicious.