mplayer question re saving streaming audio to a file.

Discuss Applications
Post Reply
User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

mplayer question re saving streaming audio to a file.

Post by Calum »

i am really feeling like a pillock, but i can't understand the man page enough to do this.

http://www.asaplive.com/FARNE/RadioFARN ... 150&cs=771

on that page, i get the choice of an m3u stream or a ram stream, both the same, both audio only.

what i want to do is to record the sound from the stream into an audio file, wav file, ogg file, whatever, i will encode it to ogg afterwards anyway.

It's a radio program about a musician i have heard of, and i'm worried it'll go from the internet and i'll want to hear it again, also i want to save bandwidth.

so. i thought i could just do "mplayer <url> -ao pcm" and get an audio dump in the current directory, but no. and when i do "mplayer <url>" with either url, no sound. just this:
MPlayer 1.0pre5-3.2.2 (C) 2000-2004 MPlayer Team

CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville 701.8 MHz (Family: 6, Stepping: 3)
Detected cache-line size is 32 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/calum/.mplayer/config
Reading /home/calum/.mplayer/codecs.conf: Can't open '/home/calum/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
font: can't open file: /home/calum/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
Using usleep() timing
Can't open input config file /home/calum/.mplayer/input.conf: No such file or directory
Can't open input config file /etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : No such device
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.

Playing http://www.asaplive.com/farneaudio/m3u/RF3.m3u.
Resolving www.asaplive.com for AF_INET...
Connecting to server www.asaplive.com[217.23.231.11]:80 ...
Cache size set to 320 KBytes
Connected to server: www.asaplive.com


Exiting... (End of file)
i've put all the codecs from the all codecs tarball from mplayerhq.hu in /usr/lib/win32 so it should be able to play it.

What am i not seeing do you think?
thanks etc...

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

An m3u file is just a play list isn't it? You have a "." at the end of your URL which could be one problem but going to the proper URL I do see it is just a list of MP3 files:

Code: Select all

http://www.asaplive.com/farneaudio/P0014003.mp3
http://www.asaplive.com/farneaudio/P0017003.mp3
http://www.asaplive.com/farneaudio/P0017004.mp3
http://www.asaplive.com/farneaudio/P0017005.mp3
http://www.asaplive.com/farneaudio/P0017012.mp3
http://www.asaplive.com/farneaudio/P0017013.mp3
http://www.asaplive.com/farneaudio/P0017016.mp3
http://www.asaplive.com/farneaudio/P0018003.mp3
http://www.asaplive.com/farneaudio/P0018005.mp3
http://www.asaplive.com/farneaudio/P0018006.mp3
http://www.asaplive.com/farneaudio/P0019006.mp3
http://www.asaplive.com/farneaudio/P0019007.mp3
http://www.asaplive.com/farneaudio/P0019011.mp3
http://www.asaplive.com/farneaudio/P0019012.mp3
http://www.asaplive.com/farneaudio/P0019014.mp3
http://www.asaplive.com/farneaudio/P0010004.mp3
http://www.asaplive.com/farneaudio/P0010005.mp3
http://www.asaplive.com/farneaudio/P0010006.mp3
These are not streams but individual mp3s. If you did have a link to a stream file I believe it's the "-dumpaudio" or "-dumpstream" param that you want. I know we have discussed this here before somewhere.

Tux
guru
guru
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Post by Tux »

If you open the m3u playlist in a text editor, you will see the links to the MP3 files. Just download these with wget or something.

EDIT: Ya beat me

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

Tux wrote:If you open the m3u playlist in a text editor, you will see the links to the MP3 files. Just download these with wget or something.

EDIT: Ya beat me
Ya gotta be quick around here. :) I should just give other people a chance to answer. I needed to clean the garage today but that didn't get done! :)

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

yes, we have discussed it before, with video files, which is why i felt so dumb about asking this.

thanks for your answers guys, will try sometime soon and if i have problems (well, beyond the usual :P ) then will post again!

Post Reply