November 4, 2007 Archives

The following script uses the mencoder command to read a live video feed and save it to a file for playback. It could probably be modified or used as it is for audio, but I did not try it. It was custom-made to read a stream in the asf format and encoded in WMV3 (Windows Media Video 9), but I assume that it could be parametrized to take and output other formats. The benefit of this script is that it does not require any transformation or recoding of the stream, as it just copies (or dumps) the contents of the stream to a file, and packages it in its native format, that's supported by FFmpeg's libavformat library.

#!/bin/bash
# Reads a live stream and copies its contents to a file

NOW=`date +%Y%m%d%H%M`;
DLDIR="~/"
EXTENSION="wmv"
FORMAT="asf"

if [ $# -ne 3 ]
then
    echo "Usage: savestream.sh [stream url] [duration] [identifier]"
    exit 1
else
    STREAM_URL=${1}     DURATION=${2}
    IDENTIFIER=${3}     mencoder -forceidx -oac copy -ovc copy -endpos ${DURATION} -vf harddup ${STREAM_URL} \     -of lavf -lavfopts format=${FORMAT} -o ${DLDIR}/${IDENTIFIER}${NOW}.${EXTENSION} fi exit 0

Download it: savestream.sh

Whatever you do with this script is your business. Please be careful about legal questions with respect to copyright when you save stream segments.

You need to have MPlayer/mencoder installed. It works best when you have the latest codecs installed, and this script should only work when you have FFmpeg installed too (although I think you could modify it to do without). You might also need the w32codecs binary codecs package.To get the latest versions of these packages, on Debian, try looking at Debian Multimedia, and for Ubuntu, check out Medibuntu. I did not test it thoroughly, so beware when you use the script, and be sure that you know what you are doing! The script works very well as a cron job.

IMG_3368

Edit (2008-07-14): Last week, I tried bringing my friends to Restaurant Congee, just to find that it has closed for good, it seems! Just after a few months of existence - quel dommage!

Edit (2008-02-03): 豐衣粥食 is actually the Chinese name of this place.

After the singing contest last week, we got a bunch of cards for free dessert at this congee restaurant in Brossard. The name in Chinese is perhaps a little more meaningful, evocative, but I cannot read it. My mother said that she saw ads for this particular restaurant in Toronto - so we might assume that it is part of some pan-Canadian chain.

So, yes, there is a congee place in Montreal, and it is in the suburb of Brossard, where a fairly large Chinese/Asian community lives. The menu indicates countless possibilities of congee combinations, more than I've ever seen in Chinatown for the very least. The said congee restaurant might be in a boring strip mall, but the interior of it is certainly not bad, with its redwood and clean environment (we thought it might've opened recently, as the strip mall sign does not include them yet).

Madame Pearl's Cough Syrup

| | Comments (0)

I bought this in Chinatown, at the back of the Ruby Rouge mall...

Madame Pearl's Cough Syrup

According to my grandfather, it is a very popular brand in Hong Kong, although he does not use it himself. On the box, it says that it contains, per 30ml:

When I checked my Robitussin Cough & Cold (Extra Strength), this was what we had in medicinal ingredients adjusted for the same volume of 30 ml (was for 5 ml on box):

  • Dextromethorphan HBr: 90 mg
  • Pseudoephedrine HCl: 180 mg
  • Guaifenesin: 1200 mg

The Robitussin was perhaps Extra Strength, but is a lot more potent. Price-wise, the Madame Pearl's was 5$ for 120 ml and I forgot how much the Robitussin was, but probably around $8-10 for 100 ml.

About this Archive

This page is an archive of entries from November 2007 listed from newest to oldest.

November 3, 2007 is the previous archive.

November 7, 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.