How can I playback an audio stream from a Icecast on WP7 - windows

How can I playback an audio stream from a Icecast on WP7
I have tried SMF, SmoothStreaming Client and the MediaElement.
None of these have worked. The formats are either asx or and wma.
Edit:
Recently I found a new stream. this stream works when I'm in the designer. But it does not work on the device. On the device the stream is opened and closed immediately.
this stream is from an IceCast server in MP3 format. with a ?.mp3 extention. or without.

When you are streaming live radio, the stream may be encoded by an IceCast server or ShoutCast server. To read these streams, you will need to decode the stream in memomry and pass it to the MediaElement once it has been decoded.
have a look at Mp3MediaStreamSource
and Audio output from Silverlight
I lost tons of time on this, and this is the best solution I found so far.

Having had a quick look at the Icecast web site (I'm not familiar with their service) it seems that most of what they offer for streamed audio is offered in MP3 format, but that they provide this as playlists in either M3U or XSPF format. You can't provide this to any of the built-in controls or classes in the WP7 framework, but you can parse the contents of the file and pass that to a MediaElement to play individual files.
The M3U file is a simple list of the consituent URLs, so is the simplest to deal with, but the XSPF format (which is an XML format) provides more information, such as the title. You can easily use the XDocument class to parse the XSPF file and then use LINQ to query the contents.

You're not adding the ?.mp3 to the pls file right, to the embedded URL? IF you are using the URL you get from the PLS/M3U file, you might need to append a file extension to it. You can often do this by adding ?ext=.mp3 or ?file.mp3 to the URL and it should play with MediaElement, as I read on the MS dev boards that people had been getting that to work with Shoutcast streams.

Does your stream work on the device when you unplug it from the computer? Media playing doesn't work while you're plugged into the Zune sync center.
Chris

Related

PLay M3U8 on Windows Phone

I have been searching for ways to play an M3U8 media live stream on WIndows Mobile using the media framework.
Kindly share any info on this.
You need to read and parse the m3u8 file (it's a simple text file). Then stream the parsed Uri(s).
After more research i found out that m3u8 is a format supported by APPLE.
Unfortunately we cannot play the m3u8 files on windows phone directly.
Rather we can use the streaming media framework to play .manifest files.
The .manifest files are generated by the SMOOTH STREAMING MEDIA SERVER.
.manifest files are equivalent of m3u8 files. It is also a playlist file just like the
m3u8 file.
SMOOTH STREMAING SERVER, is a part of windows media servies that works on a IIS server.
You can use Windows Phone Streaming Media free library, it worked fine for me, there is a blog post about it:
3ivx live streaming 3ivx although this is not free
First add reference.
xmlns:local="clr-namespace:Microsoft.PlayerFramework;assembly=Microsoft.PlayerFramework"
xmlns:smmedia="clr-namespace:SM.Media.MediaPlayer;assembly=SM.Media.MediaPlayer.WP8"
<local:MediaPlayer Name="player"
HorizontalContentAlignment="Stretch"
AutoPlay="True"
Volume="0.7"
Source="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
IsPlayPauseVisible="True">
<local:MediaPlayer.Plugins>
<smmedia:StreamingMediaPlugin />
</local:MediaPlayer.Plugins>
</local:MediaPlayer>

playing mp3 files in firefox

Can anyone suggest me webplayer which can play MP3 files in Firefox browser?
I tried jPlayer, however it needs ogg files. I tried converting MP3 to OGA using FFMPEG, however, even the generated file is not being played in JPlayer.
Is there any alternate player which can play MP3 files in Firefox.
I don't want to use Flash.
..alternate player which can play MP3 files in Firefox.
Combine these 3 for an answer.
Java Sound for the ability to play audio.
The MP3 plug-in SPI of JMF, to supply support for MP3, which Java Sound does not support by default.
Applet - to embed that ability in a web page.
Note
I am pretty sure there are easy ways to embed sound in web pages that does not require Java, or requires plug-ins that have higher usage (like Flash). If there is not something custom you wish to do, I recommend investigating alternatives.

How to play MPEG-TS videos by DirectShow on Windows 7?

Our application uses IGraphBuilder::RenderFile to build filter graph. On Windows 7, this application can play MPEG-PS videos smoothly, but it cannot open/play MPEG-TS(transport stream) videos. IGraphBuilder::RenderFile returns an error code VFW_E_UNSUPPORTED_STREAM.
On my Windows 7, Windows Media Player can open/play those MPEG-TS HDV videos.
My questions are:
Is it possible to load/play MPEG-TS videos by DirectShow on Windows 7, with only filters installed by Windows 7? Because it is best for us not to ask users to install some third-party DirectShow filters.
If it is impossible, is there some popular codecs that can handle MPEG-TS HDV, and also fit in DirectShow at best.
Some more details I've tried:
I also tried GraphEdit in Windows SDK. It gave the same error when opening those MPEG-TS videos.
If I added one MPEG-TS video as a File Source(Async), its output pin was marked as Major Type: Stream, SubType: GUID_NULL, and cannot be connected to other filters, such as MPEG-2 Demultiplexer.
More frustrated, MSDN says MPEG-2 Demultiplexer does demultiplex both of MPEG-2 transport and program streams.
So, it is very likely that I missed something. After days of digging, I am now very desperate on this problem now. Any advices are welcome and appreciated.
Thanks
Fan
The reason why you can't connect File Source (Async) to MPEG-2 Demux is that the file source operates in pull mode and the MPEG-2 demux only supports TS in push mode.
Haali media splitter can demux MPEG-2 TS. If you don't want to force users to install it, maybe you can write a simple push-type file source filter and insert it manually into your graph.

software which can stream any flv file

I know this is not programming related, but I have a scenario.
Each video streaming site has a flash video plugin and upon viewing the source I can find the link of the flv file it is streaming. Now I wanted to make an application or work on an existing one, where I can copy and paste the url of the flv file and it streams it for me. Something like an application which can stream flash videos for me.
Take an opensource flv player and plug it into your website and put the url of the flv files you want to stream.
Should work in most cases, in cases it won't work, you have the source code, so change it to overcome any issues :).
On the client side you can use this flash application to render the flv (works on any flv file) http://www.longtailvideo.com/players/jw-flv-player/ . Needs a license for commercial use (quite cheap).
On the server side you have to build an application which will stream flv files - but i guess that, if you want to use existing online flv files, you don't need this part.
Use Adobe Flash or the Flex SDK.

How to receive MPEG-TS multicast from Windows

We currently have a system with live video encoded to an MPEG-TS multicast stream, being received by televisions with STBs. In addition to televisions we'd like to embed the video in our Windows application.
I know that VLC will receive the stream, but would prefer both a solution that I can embed in an existing application without playing window moving games, and one without licensing problem. I realize that likely means that I'm not looking at a free solution, that's fine, within reason.
Anyone know of a good product for this? Either something easy to use, or a plug-in for WMP.
You'll need to develop a simple DirectShow filter that listens on a given port and just passes down every packet it had received.
I don't have a sample handy, but it's really simple, several hundreds lines of code.
Then you just connect this filter to an MPEG2 Demultiplexer capable of decoding transport stream.
NVidia and Elecard come to mind first, though the former one does not connect under debugger.
Then you connect the demultiplexer to the decoder and finally to the renderer.
The demultiplexers and decoders handle the live stream issues well, you just capture the UDP packets and send down to them.
Due to licensing issues, MPEG2 decoders cannot be free (ffmpeg and VLC violate the license), so you'll have to buy the decoder.
Visit http://elecard.com, they have a nice range of MPEG2 products.
Expanding on Quassnoi's answer...
You might check out the Haali Media Splitter to act as a "MPEG2 Demultiplexer." This is a filter that just pulls the compressed video and sound out of the transport stream, so I'm guessing it doesn't have any licensing issues. Most PCs with a DVD player on them already have a licensed DirectShow MPEG2 decoder, so you can probably just use one that's already installed (or purchase a license from a place like elecard if you really want to be safe).
As you are developing your DirectShow application, you might find Monogram GraphStudio to be a helpful tool in designing the filter chains.

Resources