libreplay 0.5 review

Download
by rbytes.net on

libreplay library will save the output of realplay in a raw format, so you can do what you want with this uncompressed data later in

License: Public Domain
File size: 8K
Developer: Sed
0 stars award from rbytes.net

libreplay library will save the output of realplay in a raw format, so you can do what you want with this uncompressed data later in time.

When you use realplay, sometimes you would like to save the sound that you ear, to be able to listen to it later in time. But realplay doesn't have a save or export button, so libreplay dose that for you.

Installation

Just do a make in the directory, should be alright. There will be the file libreplay.so which contains everything usefull.

Usage

This documentation is only valid for version 0.3 of libreplay. Avoid using 0.1, it crashes too much realplay. (Version 0.2 does not have LIBREPLAY_AUDIO support.)

You must set the variable LIBC_PATH to the place where your libc is (something like /lib/libc.so.6). If you are under bash, just do export LIBC_PATH=/lib/libc.so.6
(replace /lib/libc.so.6 by your libc of course).

Do
LD_PRELOAD=./libreplay.so realplay in the directory where libreplay is.

realplay will create /tmp/realplayer_stream_XX_speed_YY_channels_ZZ_format_AA.raw for each stream you play.

XX will be replaced by the stream number (from 0 to whatever the number of streams you download).

YY will be the speed of the stream (44100 if the stream is at 44100Hz, for instance).

ZZ will be the number of channels of the stream (1 for mono, 2 for stereo).

AA will be the size of each sample of the stream (I only saw 16 for it, meaning: 16 bits, signed, little endian).

Some streams may be empty, because realplay sometimes opens and closes the soundcard whitout outputting any sound.

The output is a raw file, use sox or you favorite conversion program to transform it into a format you like more.

For instance, using sox, you would do

sox -t raw -s -w -c 2 -r 44100 realplayer_stream_6_speed_44100_channels_1_format_16.raw out.wav copy

-t raw for saying it's a raw file,
-s -w for saying it's 16b signed,
-c 2 for saying there are 2 channels,
-r 44100 for saying it's a 44100Hz stream.

It has been tested against realplayer 8.

By setting the environment variable LIBREPLAY_AUDIO, you can save live streams. Some streams create problems when they are saved faster than they are played; the server will send again some audio data, and the result is bad. With this option, the stream is played and saved at the same time. If you have problems with your saved streams, try this option.

You may use the scripts realplay.dump and realplay.dump_live, which include all the necessary to let realplay be used with libreplay.
realplay.dump will only save the stream.
realplay.dump_live will save it and play it.
You may need to edit these scripts, to adapt the paths, for them to fit your system. These scripts are only here to help you; if they don't work, you still will need to read the documentation (this file) and understand it.

Gregory did a little perl utility to, maybe, facilitate the usage of this little tool. realexport.tar.gz

realexport.sh something.rm is the way to use it, according to Gregory. (It may work, it may fail, not tested.) You will need sox and lame available on your system.

libreplay 0.5 keywords