Play mp3 while encoding to harddisk?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

Play mp3 while encoding to harddisk?

#1 Post by MU »

Hi,

I can use mplayer to write audio-streams to harddisk, if I select the "pcm"-driver.

However, it is not perfect:
while recording, I can't hear the stream.
And it saves .wav uncompressed, eating zillions of megabyte.

Do you know a solution that saves the files encoded as mp3 or ogg or so, and allows to listen to them at the same time?

Would be nice for mplayer, but other suggestions are welcome, too.

Thanks, Mark

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#2 Post by Lobster »

think I saw something like that here

http://linux-sound.org/

8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#3 Post by GuestToo »

StreamRipper can do this automatically for internet streams ... you can listen to the stream using a local server ... i think you can do something similar using mplayer
Last edited by GuestToo on Thu 27 Oct 2005, 09:36, edited 1 time in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

GuestToo, yes,just had a look at their website.
I downloaded streamtuner, but it requires perl.

I will go sleep some hours now.
If no-one knows a solution with smaller dependencies, I will have a closer look at streamtuner lateron.

It would be nice to have a small and simple plugin like the existing mplayer-PCM-plugin, just with compression, and output redirected to file and OSS.

I currently use mplayer with Radio3.pup to listen to radiostreams like jazzradio or Swiss Groove:
http://www.murga.org/~puppy/viewtopic.php?p=20077#20077

---
lobster, interesting site for Audio-tools, will take some time to findsomething in the huge amount of tools.

Thanks, Mark

Yogi
Posts: 207
Joined: Fri 19 Aug 2005, 18:50

#5 Post by Yogi »

I am using Chubby Puppy 1.0.5 and have been using Stream Tuner and Stream Ripper in conjunction with XMMS to record and listen to mp3 formatted songs for about two weeks now. I've had the most luck with the Shoutcast stations. You'll have to read the Stream Ripper text on how to use Rxvt and the proper commands for recording. Not all stations are "cooperative" when it comes to recording their material. Two of my favorite stations are:

http://www.radiofreecolorado.net

http://www.radioparadise.com

Good luck!

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

ok, I have perl in usr_devx.sfs anyway, so I will get them a try.
Seem to be the most comfortable apps out there :)

thanks, Mark

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#7 Post by GuestToo »

i do not think my StreamRipper dotpup requires perl

the StreamTuner dotpup requires perl for some of the plugins, but most of the plugins do not require perl ... StreamTuner seems to work ok without perl

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

oooohhhhh.. stupid me did not recognize GuestToo posted a DotPup-link for Streamtuner and Streamripper...

Yes, they work out of the box... do all I wanted... man this is soooo cool :) 8)

From my german Linux-board (translated):
Amarok and gstreamer don't play mp3

Since one week, someone tries to get that working with suse 9.3.

We gave him tips of installing packages from packmanlinks2linux, and codecs and so on, no success...
Now he wants to upgrade to Suse 10 (although I suggested trying Puppy).
Well, I just read a test about Suse 10:
woohoo, now it can play mp3!
What a success *g*
k3b and other apps do not support it yet *gg*
And wmv -nada.

I'll never give my puppy back *woofwoof* :D

Mark

ljones
Posts: 47
Joined: Tue 10 May 2005, 16:38

#9 Post by ljones »

I don't know if this helps I may be OT here , but on my main linux box (a mandrake 10.2 box, sorry!) I have made 2 scripts. One captures video and encodes straight it into (mencoder's idea of) an MPEG4 file. The other script I have records from the line in straight into an MP3 using two programs, "sox" and "lame". The video capture script I can't use in puppy as I don't know how to get video capture working under puppy (let alone mencoder), but the audio recorder which records into MP3 is much more simple (though I do not know if puppy has sox & lame). But here's the script;

Code: Select all

#!/bin/sh
#srec by ljones
echo " "
echo "enter filename (e.g. out.mp3)"
read name1
echo " "
echo "enter audio quality (e.g. 32)"
read quality
echo " "
echo "tracks (1=mono (default), 2=stereo)"
read track

if [ "$name1" = "" ]
then
 name1="out.mp3"
fi

if [ "$quality" = "" ]
then
 quality=32
fi

if [ "$track" = "" ]
then
 track=1
fi

if [ $track = 1 ]
then
 sox -t ossdsp -w -s -r 44050 -c 1 /dev/dsp -t raw - | lame -x -m m -b $quality - $name1
fi

if [ $track = 2 ]
then
 sox -t ossdsp -w -s -r 44050 -c 2 /dev/dsp -t raw - | lame -x -m s -b $quality - $name1
fi
Where you see a "-r 44050" you might need to replace it with "-r 44100", it depends on the sound card. Mine needed -r 44050, or the recordings all sounded speeded up!

I would turn my scripts into GUIs via something like wxbasic, but I have no idea on how to tell either mencoder or sox & lame to stop via a GUI,

ljones

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#10 Post by MU »

Thanks, but Streamripper does perfectly what I need :)

Mencoder is available as a dotpup, but I did not test it.
Might require additional libraries:
http://www.murga.org/%7Epuppy/viewtopic.php?t=3128

btw. no reason to be ashamed because of Mandrake?
I use it too (though very seldom sinceI have puppy).

Many people here use more than 1 Operating system, andespecially some older Dotpups were made from MDK/Debian/Vector-Linux-Packages.

Greets, Mark

Post Reply