Monthly Archive for October, 2004

Page 2 of 3

Podcasting with Blogger


I’m thinking about installing an iPod (or Zen) in my car. I would replace my current car stereo with a radio with AUX input (Kenwood has some nice ones) and get a docking station for the POD.
Why? I would like an MP3 source that I can update more easily than burning CD’s every now and then. I’d like to get up in the morning, take my MP3 player along and discover what has been put on it. In short, I wanna be a Podcast receiver.

I would of course like to get my favourite music on it. A bit like the Smooth-o-Matic Random Groove, but in my car. So I want to publish my own Podcast. Now I’m a take-it-easy blogger. I do not handcarve my Atom or RSS feeds, I just use Blogger. So can I create Podcasts with Blogger?

I started a new blog: SmoothPod to try this out. I can include a URL to an MP3 file in the (optional) Link field. When I take a look at the resulting Atom feed, it is included as
<link href="http://(path)/file.mp3" mce_href="http://(path)/file.mp3" rel="related" title="(Link Title)" type="text/html"/>. However, what we need for a correct Podcast is an RSS enclosure:
<enclosure url="http://(path)/file.mp3" length="12216320" type="audio/mpeg" />

After RSS conversion by Feedburner, the Link is gone. Now I could do the Atom-2-RSS conversion myself with FeedParser. But I decided to outsource the problem: I mentioned it to the guys from FeedBurner, and Eric Lunt seemed quite enthusiastic about it. So with some quality developer’s time on it, the FeedBurner SmartFeed might include a Podcast option that converts Blogger’s Link field, when filled with an MP3 file, to an RSS file with MP3 enclosures.

In the meantime, I’ll just go with the Smoothouse Oct 2004 Playlist @ Webjay.
UPDATE: Webjay actually has Podcasting capability right now! The RRS feed of the above playlist works like a charm in iPodder!

Squid: list top X referers

If your Squid server logs the referers of its request (i.e.
1. you’ve configured squid-cache with --enable-referer-log before compiling and
2. you’ve included a referer_log /var/log/squid/referer.log in your squid.conf file),
you can easily show top 50 of most popular referers with a simple Bourne shell:
#!/bin/bash

  1. this script is ‘top_referers.sh’
  2. (c) 2004 Peter Forret – Open Source
    REFERERS=/var/log/squid/referer.log
    OUTPUT=/var/www/html/stats/referer.txt
    MAXLINES=50(
    echo REPORT MADE AT `date`
    echo =============================
    $OUTPUT

Then add it to your crontab:
10 * * * * /(path)/top_referers.sh
and you have an hourly updated stat!
Add a little HTML formatting if you’re aesthetically demanding!

Redhat versions: what am I running?

If you manage multiple RedHat servers, or if you just stumble on a Linux server, and you have no idea what kind of machine it is, nor what the version of the OS is, try the following commands:

# more /proc/version
Linux version 2.4.20-24.9 (bhcompile@porky.devel.redhat.com)
(gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1
Mon Dec 1 11:35:51 EST 2003
# more /proc/cpuinfo
vendor_id : GenuineIntel
model name : Intel(R) Pentium(R) 4 CPU 2.00GHz
cpu MHz : 1992.653
cache size : 512 KB
(…)
bogomips : 3971.48
# more /proc/meminfo
MemTotal: 1030872 kB
(…)
# cat /etc/redhat-release (only for RedHat distributions)
Red Hat Linux release 9 (Shrike)

So now you know: a 2GHz Pentium 4 with 1GB of memory, running RedHat 9 ‘Shrike’.
For more info on RedHat versions: Taroon, Shrike, Enigma, …

Poor-man’s sepia conversion


Working for Pixagogo makes digital imagery my daily bread, and I fool around with images every now and then. I am, however, not a user of PhotoShop. I’ve never worked with it, I don’t own the software, nada. Keep that in mind while you continue reading this.

Recently, for my cousin’s filmfilostoverij blog, I converted some film snapshots into small thumbnails like the one on the right (from “Lucia y el sexo”). The program I use for conversion is IrfanView. Not the best program, not the most complete, but easy, stable and free. For the stuff I need to do, I find Gimp too complex.

What I did to the images was:

  1. crop a square part of it
  2. convert to grayscale
  3. resize to 400×400 px
  4. perform a median filter (value: 9)
  5. resize to 100×100 px
  6. Save as JPG

But then I wanted to have a ‘sepia‘ effect. Irfanview does not have it. I wanted it. So I began my quest.


I started with the ‘Enhance Colors’ function and added 64 ‘R’ and 16 ‘G’ to the B/W image, but that didn’t look real enough. What does sepia look like, anyway? I found two definitions, expressed in CMYK coordinates, that I converted to RGB with my CMYK-to-RGB converter hizmo (thanks to Wikipedia):

The color
1. \definecolor{Sepia}{cmyk}{0,0.83,1,0.70} (from TexCeh)
#4D0D00 (77,13,0)
2. sepia cmyk(0%, 60%, 81%, 63%) (from december.com)
#5E2612 (94,38,18)
In ‘websafe‘ colors, this would be:
#551100 (84,17,0)

So let me show you how I proceeded, using an image of my tango teachers, Marisa y Oliver:

original image
Original
  1. Convert to greyscale
  2. Enhance colors: 94-38-18 (#5E2612)

=> way too red!

  1. Convert to greyscale
  2. Enhance colors: 77-13-0 (#4D0D00)

=> color OK, but too light

  1. Convert to greyscale
  2. Enhance colors: 77-13-0 (#4D0D00)
  3. Add 50% contrast

=> looks great

    Compare this with the optional QuickSepia plugin

=> I like mine better

Voila, there it is, a simple poor-mans sepia, that can even be used in ‘batch convert’ (Irfanview).

Short CMYK/RGB explanation and Detailed CMYK/RGB explanation

[Listening to: "The Prettiest Thing" - Norah Jones - Feels Like Home]

Casablanca: here’s looking at you


Well there’s a reputation well earned: Casablanca is one of the best films I’ve seen recently. I know it’s been out for a while (it was released in 1942) but I only bought the DVD last weekend. Great cast (Bogart as cool as a three-star freezer), strong script (Bergman torn between the two loves of her life, and then some WWII thrown in), and superb dialogues.

Captain Renault : What in heaven’s name brought you to Casablanca?
Rick : My health. I came to Casablanca for the waters.
Captain Renault : The waters? What waters? We’re in the desert.
Rick : I was misinformed.
Casablanca Memorable Quotes

aka heres lookin at ya

Intelligence is the mind’s worst enemy


If you’re interested in high level conversations on a wide range of topics, check out edge.org. Their motto: To arrive at the edge of the world’s knowledge, seek out the most complex and sophisticated minds, put them in a room together, and have them ask each other the questions they are asking themselves.
There’s fascinating stuff about quantum computing and black swan dynamics, but a piece in the last publication jumped out, a discussion on ‘A self worth having’:

An increasing intelligence would also reach a point where it became aware of its own intelligence and that’s a highly dangerous spot because an intelligence that was naked and transparent would be susceptible to intellectual manipulation. The first thing that a mind smart enough to see itself would do is start to hack itself.
Kevin Kelly (on edge.org)

The irony of this is that the research performed by Mr. Kelly is doing just that: trying to hack the mind. But he makes a great point. The above quote actually comes from a reply to an earlier article, the original ‘A self worth having’ thesis:

This case stayed with me � to remind me, if I should ever forget, how much consciousness matters. Even to the extent that mattering may be one of the main reasons why consciousness exists. What if it’s consciousness that gives us a reason for waking up every day, and going out into the world �to experience the qualia of a rainbow, the sunset, music, interactions with our friends, sex, food? What if consciousness provides such an incentive for living that, as human beings, we would not � and probably could not � do without it?
Nicholas Humphrey (on edge.org)

So, making out under a rainbow, Marvin Gaye in the background, just after a picknick with some excellent Sancerre is not by accident an enjoyable event: you are actually celeberating the Self. And far too busy to start picking your own mind.

[Listening to: "It had to be you" - Warner Bros. Orchestra - Casablanca DVD]

George W Bush: working hard

George W. Bush did not make the strongest of impressions during the first Bush-Kerry debate 2 weeks ago. His abundance of ‘ermm…’s, spoonerisms and other slips has been combined into a Bush Mixtape.
It can’t be easy to organize your thoughts while someone is yelling through your earplug. But “I admire Sen. Kerry for being a great dad”? And he’s a great cook too? Some more comments on We Three Jerks (start reading at the Kirsten Dunst picture).

Bad habits are hard (work) to break, so I’ve put some music under it: I’ve made a mash-up of Dubya’s speech and ‘Power of the Flower’ by Praga Khan.

Here is the result:

Hard Work (Mixed Message).

(tenoarman via Trade Secrets)

Google is listening: searching audio

There are rumours that Google would be rolling out search functionality for audio files. It is true that currently no sound files (.wav, .mp3, .wma, .mov, .ogg, …) files can be found by Google’s “normal search”, except for the odd mis-indexed mp3 file.
Multimedia search is a fascinating topic, let’s talk about audio for a moment:

INDEXING

  • target = WAV, MP3, WMA, RAM, AIFF, MOV, OGG, … files. Playlist files (M3U, ASX, SMIL, …) would be essential to include too, since they often are the link between a web page and the audio they publish, and also provide a link between ‘related’ audio items. Maybe also MIDI files.
  • 1st level indexing: no file content is indexed, only the URL and the content of the HTML page that referred to it. This is what Google Images does.
  • 2nd level indexing: most audio formats have meta-data (artist, song, album, date, …) listed in the beginning of the file. This can be retrieved by just taking the first KB of an audio file and extracting that information – so one does not need to download the whole file.
  • 3rd level indexing: the full content of the file is also converted to a text format and indexed. This is what Google currently does with PDF and DOC files. How does one convert audio to text? For spoken word, speech recognition comes to mind. An impressive example is HP Speechbot, that has converted 14.928 hours of radio programs into searchable text. For music files, one could use the lyrics as a text representation.
  • Now that PODcasting (publishing MP3’s of discussions, conferences, radio programs … which are then included in RSS feeds and automatically downloaded by subscribed users) is becoming something of a hype (e.g. Adam Curry’s Daily Sourcecode), there will be a lot of information in audio-only format (I haven’t seen too many people also providing transcriptions – it’s a dirty job). It is crucial there that indexing is done on 3rd level, otherwise it is useless.

SEARCHING

  • preview: what should the results of a search look like? Just text (artist, song, album, year, filesize) or also audio samples? To make the analogy with Google Images, provide a 30 seconds 28Kbps MP3 preview file (which would be approx. 60KB) for every audio file found.
  • ranking: which search hits are shown first? Something like an audio SoundRank could be invented. My guess is that this is easier than the real Google PageRank, since audio files are typically an endpoint, they do not ‘cast votes’ to other URLs, so there is no recursivity in calculating this SoundRank. Every page/playlist referring to an audio file would represent a vote. Maybe high PageRank sites should have a heavier weight.
Currently existing audio search engines:
Search on “Donna Summer
AllTheWeb Audio Search: 104 results
Altavista Audio Search: 245 results
Espew.com: 53 results
Lycos Multimedia Search: 350 results
Singing Fish: 1867(!) results
More audio search engines can be found on Google Directory: MP3 Search Engines

SIDE REMARKS

  • What are the legal implications of pointing people to content that you don’t know is legal? I don’t see Google setting up BitTorrent/ISO search soon.
  • There is a technology Shazam Music Recognition that allows one to call a number, point your phone at the speakers while a song is playing and get the name/title/ringtone of that song on your mobile. Or this technology by Fraunhofer Institute: query by humming.
  • Judging by the PODcasts I’ve already heard, any speech recognition used on it should be extremely robust, due to many VoIP audio issues: low bandwidth, delay, glitches. Hopefully this will improve in the future. Skype, the PODcast edition?

Inspired by: oristus.com via Google Blogoscoped