[Spam?] Re: Anyone know how to do a "timed program" with mplayer

From: Adam Funk (a24061_at_yahoo.com)
Date: 11/15/05

  • Next message: jpg: "Re: debian-user-digest Digest V2005 #2734"
    Date: Tue, 15 Nov 2005 15:51:09 GMT
    To: debian-user@lists.debian.org
    
    

    > and I've successfully recorded (using scripts and at) fixed-duration
    > RealPlayer radio shows to .wav to listen to them later. But I'd
    > like to record a specific show tonight from the continuous live ogg
    > stream.

    In case anyone else cares, here's what I developed.

    $ at 16:00
    > record-wuvt 15 15

    for example, should produce files wuvt--20051115-1600.mp3 and
    wuvt--20051115-1615.mp3, both just under 15 minutes long
    (unfortunately you lose a few seconds between segments).

    HTH someone,
    Adam

    #!/bin/sh
    # Arguments: numbers of minutes to record

    URL='http://engine.collegemedia.vt.edu:8000/wuvt.ogg'
    BASENAME='wuvt-'

    for MINUTES in $@
    do
      FILENAME="${BASENAME}-`date +%Y%m%d-%H%M`"
      
      date
      echo "Start recording ${FILENAME} for ${MINUTES} minutes"
      
      mplayer -really-quiet -ao pcm:file=${FILENAME}.wav ${URL} &
      PID=$!
      
      sleep "${MINUTES}m"
      echo "Ding!"
      date

      killall mplayer
      wait ${PID}

      # normalize and encode in the background
      nice -18 normalize-audio -q -a -19dB ${FILENAME}.wav && \
          nice -18 lame --quiet ${FILENAME}.wav ${FILENAME}.mp3 &&\
          rm -v ${FILENAME}.wav &

    done

    wait
    ls -l *.mp3
    date

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: jpg: "Re: debian-user-digest Digest V2005 #2734"

    Relevant Pages

    • Anyone know how to do a "timed program" with mplayer?
      ... I can listen to a continuously ogg-streaming radio station with this ... and I've successfully recorded fixed-duration ... RealPlayer radio shows to .wav to listen to them later. ...
      (Debian-User)
    • Re: A Linux timed audio recorder
      ... wav to mp3. ... Two scripts:- ... startrec.sh (Start background Firefox and open radio player specified at $1 HTTP address, record the output to a WAV with 'arecord') ...
      (alt.os.linux.suse)
    • Re: Convert music for stationery
      ... and here are the scripts:) ... Could you please tell me how to convert wav or mp3 files into wma or asf ... format to stream for stationery? ...
      (microsoft.public.windows.inetexplorer.ie6_outlookexpress.stationery)