PDA

View Full Version : WMA/ASX Streaming on Linux with ffmpeg?



Thomas B. Malsbury
2004-11-10, 10:02
Following Arnon Meshoula's post a few days ago I was able to add the
following to my convert.conf file and can playback local WMA files on my
Fedora 2 systems:

wma mp3 * *
[ffmpeg] -v 0 -i $FILE$ -f wav - | [lame] -x -m s -r -S -q 5 -s 44.1 - -

My hope is that now that slimserver can convert local wma files to mp3s that I can use this feature to open webstreams on my SliMP3s. The problem that I am running into is that most windows media webstreams have the file ext .asx. The main reason that I am interested in this is that my two local NPR stations broadcast in Windows Media formats.

http://publicbroadcast.net/njn/ppr/njn.asx

http://www.whyy.org/91FM/windowsfmlive.asx

If I place these in a simple .m3u playlist, Slimserver sees them with no problem. I can even start playback, it pulls down the station ID and displays them on the Slimp3 display, but then says that it can open the file. When I place the url in an ASX playlist like those posted to the list over the past few weeks (Quebec.asx and Sweden.asx) slimserver shows the playlist, but when I select it it says that the playlist is empty.

I have tried adding asx to the convert.conf file replacing wma with asx in the above statement, but that did not work. I don't know if this is a limitation of the currently (11/9/04 nightly) slimserver or that of ffmpeg. I have done a little looking around and the aviplay/avifile project (http://sourceforge.net/projects/avifile/)claims that it is a linux media player that can parse asx webstreams. I have also seen a xine plugin that allows it to handle mms:// streams (http://www.geocities.com/majormms/). I want to see if these can be used in place of or in addition to ffmpeg to get slimserver to play windows media webstreams.

Any advice on the topic or if anyone else is working towards a similar goal, let me know.

Tom

Bruce Tucker
2004-11-10, 11:43
I tried out these two streams, and found that the first one (
http://publicbroadcast.net/njn/ppr/njn.asx ) worked for me, starting up
quickly and playing perfectly.

The second one ( http://www.whyy.org/91FM/windowsfmlive.asx ) didn't. It
would start and the counter would increment, but no sound ever started.
After a while the counter would reset to 0. Perhaps there is something odd
about their stream. Their website does say that they are working on fixing
their MP3 stream, so you may not have too long to wait until you can stream
it.

Bruce
Win XP SP2

kdf
2004-11-10, 11:50
Quoting Bruce Tucker <tuckerb2 (AT) adelphia (DOT) net>:


> The second one ( http://www.whyy.org/91FM/windowsfmlive.asx ) didn't. It
> would start and the counter would increment, but no sound ever started.
> After a while the counter would reset to 0. Perhaps there is something odd
> about their stream. Their website does say that they are working on fixing
> their MP3 stream, so you may not have too long to wait until you can stream
> it.

if you are using digital outs, then this stream is likely 22kHz, which does not
comply with SPDIF. try the analog outs for this stream.

-kdf

vidurapparao
2004-11-10, 12:09
As Bruce reported, the first works, the second fails (because of a
seemingly unresponsive server) on Windows. Unfortunately, Windows Media
mms: protocol support is only enabled on Windows - the wmadec.exe
utility accepts mms: URLs. I don't believe ffmpeg supports the mms:
protocol - for now, WMA streaming via mms: is Windows-only. :-( If
anyone is aware of a cross-platform mms protocol implementation, let me
know.

--Vidur

Bruce Tucker wrote:

> I tried out these two streams, and found that the first one (
> http://publicbroadcast.net/njn/ppr/njn.asx ) worked for me, starting
> up quickly and playing perfectly.
>
> The second one ( http://www.whyy.org/91FM/windowsfmlive.asx ) didn't.
> It would start and the counter would increment, but no sound ever
> started. After a while the counter would reset to 0. Perhaps there is
> something odd about their stream. Their website does say that they are
> working on fixing their MP3 stream, so you may not have too long to
> wait until you can stream it.
>
> Bruce
> Win XP SP2
>
>
>
>

Bruce Tucker
2004-11-10, 14:52
> if you are using digital outs, then this stream is likely 22kHz, which
> does not
> comply with SPDIF. try the analog outs for this stream.
>
> -kdf

I'm running a SlimP3, no digital out. But, I was trying all this out on
Softsqueeze (so I didn't have to run down to the other end of the house).

> As Bruce reported, the first works, the second fails (because of a
> seemingly unresponsive server) on Windows. Unfortunately, Windows Media
> mms: protocol support is only enabled on Windows - the wmadec.exe
> utility accepts mms: URLs. I don't believe ffmpeg supports the mms:
> protocol - for now, WMA streaming via mms: is Windows-only. :-( If
> anyone is aware of a cross-platform mms protocol implementation, let me
> know.
>
> --Vidur

I'm always forgetting to try that pesky mms: until reminded. I went back
and edited the asx file to change the http: to mms: and the stream played
for me. Of course I am running it on Windows.

Bruce

WHYY.asx

<ASX version="3.0">
<Entry>
<ref HREF="mms://WINMEDIA.whyy.org/live_radio"/>
</Entry>
</ASX>