Hi everyone.
This may be a stupid question, but I've read through the madplay man page and online documentation several times and I cannot get an MP3 Internet radio station (SHOUTcast) to play with madplay.
Every time I try on the command line, I get:
------------------------------------------------------ [mixx941@amd64:~]% madplay http://stream.com:8000 MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al. http://stream.com:8000: No such file or directory ------------------------------------------------------
I've tried with and without the trailing slash on the URL, with/without quotes on the URL, and adding the "listen.pls" at the end. Still the same. Tried downloading the .pls and playing it from the file, although that gives this:
------------------------------------------------------ [mixx941@amd64:~]% madplay listen.pls MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al. error: frame 0: lost synchronization 0 frames decoded (0:00:00.0), -inf dB peak amplitude, 0 clipped samples [mixx941@amd64:~]% ------------------------------------------------------
What am I doing wrong? Thanks in advance.
-Mark madplay-0.15.2b
On Oct 8, 2006, at 11:30 AM, Mark Kane wrote:
This may be a stupid question, but I've read through the madplay man page and online documentation several times and I cannot get an MP3 Internet radio station (SHOUTcast) to play with madplay.
Every time I try on the command line, I get:
[mixx941@amd64:~]% madplay http://stream.com:8000 MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al. http://stream.com:8000: No such file or directory
There's no network streaming support in madplay; to play a stream this way, you could instead:
% wget -O - http://stream.com:8000 | madplay -
I've tried with and without the trailing slash on the URL, with/ without quotes on the URL, and adding the "listen.pls" at the end. Still the same. Tried downloading the .pls and playing it from the file, although that gives this:
[mixx941@amd64:~]% madplay listen.pls MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al. error: frame 0: lost synchronization 0 frames decoded (0:00:00.0), -inf dB peak amplitude, 0 clipped samples [mixx941@amd64:~]%
There is no playlist support in madplay either, sorry.
On Thu, Oct 12, 2006, at 11:55:42 -0700, Rob Leslie wrote:
On Oct 8, 2006, at 11:30 AM, Mark Kane wrote:
This may be a stupid question, but I've read through the madplay man page and online documentation several times and I cannot get an MP3 Internet radio station (SHOUTcast) to play with madplay.
Every time I try on the command line, I get:
[mixx941@amd64:~]% madplay http://stream.com:8000 MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al. http://stream.com:8000: No such file or directory
There's no network streaming support in madplay; to play a stream this way, you could instead:
% wget -O - http://stream.com:8000 | madplay -
Thanks. That is what I thought, but someone on an Asterisk mailing list kept insisting there is a way to play streams with madplay directly so I thought I was missing something. I tried piping it into madplay using cURL which worked great on the command line, but pipes wouldn't work in Asterisk's music on hold.
Thanks again.
-Mark
Mark Kane wrote:
On Thu, Oct 12, 2006, at 11:55:42 -0700, Rob Leslie wrote:
On Oct 8, 2006, at 11:30 AM, Mark Kane wrote:
This may be a stupid question, but I've read through the madplay man page and online documentation several times and I cannot get an MP3 Internet radio station (SHOUTcast) to play with madplay.
Every time I try on the command line, I get:
[mixx941@amd64:~]% madplay http://stream.com:8000 MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al. http://stream.com:8000: No such file or directory
There's no network streaming support in madplay; to play a stream this way, you could instead:
% wget -O - http://stream.com:8000 | madplay -
Thanks. That is what I thought, but someone on an Asterisk mailing list kept insisting there is a way to play streams with madplay directly so I thought I was missing something. I tried piping it into madplay using cURL which worked great on the command line, but pipes wouldn't work in Asterisk's music on hold.
I'd written a decode engine wrapped around libmad which treats the input as a byte stream. Basically libmad wants to consume a virtually endless linear buffer of encoded data. However you can redirect the location of decode such that a fixed size buffer can emulate an endless data stream.
mad_frame_decode() returns after consuming a frame which provides the opportunity to perform seamless relocation of the buffer data. This requires moving the remaining frame aligned buffer data to the buffer head and pointing the libmad decode at its new location. Along with doing so would be filling the buffer with additional stream data as presumably the reason for the relocation was running close to the fixed buffer end.
This isn't too complicated. But it gets more so when implementing trick/skip play in an arbitrary direction. Ie: a stream browsing operation which continually skips a few seconds fwd/back without pcm output and then generates a few pcm frames as output.
-john