[nmglug] grabbing a realplayr pnm:// stream with wget or equiv.

Mark Galassi rosalia at galassi.org
Thu Mar 18 14:34:39 PST 2004


    Mark> I remembered this one: it's "vsound" -- a cool idea, but it
    Mark> takes real time to do the conversions with vsound.

Here's what I did in the end to get a bunch of mp3s; it works, but it
is annoying to have to manually exit realplay after each segment:

#! /bin/sh
wget 'http://www.radiofrance.fr/chaines/france-inter01/gout_inter/evenements/fiche.php?evenements_id=75030037' -O program-list.html -o /dev/null

grep 'pnm' program-list.html | sed 's/.*\(pnm:\/\/.*\.\(ra\|rm\)\)\".*/\1/' > real_url_list

REAL_URL_LIST=`cat real_url_list`

for real_url in $REAL_URL_LIST
do
  echo 'real url is ' $real_url

  wav_file=`echo $real_url | sed 's/.*evenements\/\(.*\)\.r[am]/\1\.wav/'`
  echo wav_file is $wav_file
  mp3_file=`echo $wav_file | sed 's/\.wav/\.mp3/'`
  echo "$real_url -> $wav_file -> $mp3_file"
  vsound -f $wav_file realplay $real_url
  cp $wav_file ${wav_file}.bak
  wav2mp3 $wav_file
done




More information about the nmglug mailing list