latest: strec.pl
2005-05-02: v1.1 - strec-1.1.pl
- add id3v1 tag after recoding is finished
- improved handling of multi-part recordings
2005-05-01: v1.0 - strec-1.0.pl
- Initial release
What you'll need:
DSProxy: http://scara.com/dsproxy/
RealPlayer: http://www.real.com/
(old ver.: http://forms.real.com/real/player/blackjack.html)
(current version of dsproxy still has problems with rp10, use rp8 instead)
Lame: http://lame.sourceforge.net/
gnu wget: http://wget.sunsite.dk/
LibID3v2 http://id3lib.sourceforge.net/
id3v2 http://id3v2.sourceforge.net/
openRTSP http://www.live.com/liveMedia/
(compile, then copy 'live' directory to /usr/local/)
How to do it:
- Make sure all the software above is installed
- Start with "strec.pl <file or URL> [<perfect>]"
- URL can be any http:, rtsp: or pnm: link
- the recording file name will be that of the .rm file,
e.g. rtsp://server.com/dir/file.rm --> file.mp3
- file can be:
- filename.url: One line with a URL as above
- filename.strec: First line with the URL, second line with Title, Artist, Album and Year, separated by TABs.
- Otherwise, a line with 'rtsp:' from the file will be used as the URL
- The recording filename will be that of the file,
e.g. /tmp/file.ram --> /tmp/file.mp3 (or $target/file.mp3, if $target is set in the script)
- If you specify a non-zero value for <perfect>, the recoding will be
stopped if a DSP_RESET is encountered.
- Now the realplayer should start and you should see some messages like these:
00:00:00.00 SNDCTL_DSP_RESET
00:00:00.00 SNDCTL_DSP_SPEED => 44100
00:00:00.00 SNDCTL_DSP_CHANNELS => 2
Assuming raw pcm input file : Forcing byte-swapping
LAME version 3.93 (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 15115 Hz - 15648 Hz
Encoding <stdin> to audiofile.mp3
Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=2
00:00:00.00 SNDCTL_DSP_SETFMT => AFMT_S16_LE AFMT_S16_NE
00:00:00.00 SNDCTL_DSP_RESET
00:00:00.00 SNDCTL_DSP_SETFRAGMENT => 0001000d
00:00:00.00 SNDCTL_DSP_SETFMT => AFMT_S16_LE AFMT_S16_NE
00:00:00.00 SNDCTL_DSP_CHANNELS => 2
00:00:00.00 SNDCTL_DSP_SPEED => 44100
00:00:00.00 SNDCTL_DSP_RESET
waiting 5
- The "waiting" value will count up until the pre-buffering is finished,
after that is continues like this:
00:00:00.00 SOUND_MIXER_WRITE_VOLUME => 75 - 75
00:00:00.00 SOUND_MIXER_WRITE_BASS => 75 - 75
00:00:00.00 SOUND_MIXER_WRITE_TREBLE => 75 - 75
00:00:00.00 SOUND_MIXER_WRITE_PCM => 75 - 75
00:00:00.00 SOUND_MIXER_WRITE_PCM => 75 - 75
00:05:23.42
- The time value at the bottom will keep on going during the recording.
- After the file has finished playing, you should see two more
DSP_RESET messages and success message like:
"FINISHED: clip is completed at 00:00:10.52"
The printed time is the recorded length of the .mp3 file.
- If there were any other DSP_RESET messages during the file recording,
the connection got bad and you might have to start over again.
If that happens, a warning is also displayed:
"ALERT! stream interruption at 00:00:05.70"
Visits:
(by digits.com)