Play audio stream using Cocoa - cocoa

How can I stream audio from a .pls using cocoa?
Right now I'm trying to use this Xcode project, but it only works with a URL pointing to an actual audio file like .mp3.
Where I can find something to start with?

Related

Is there a way to use libvlc / libvlcsharp to non interactively transcode or compress a video on iOS?

I am using libVLCSharp (Xamarin bindings to the libvlc library) for video playback. I am adding a feature to transcode / compress downloaded videos to the local filesystem. Normally I'd use mobile-ffmpeg for this, but since internally VLC uses ffmpeg with different build configurations, ffmpeg transcoding does not work - android it crashes the app, ios returns a 'Invalid data found when processing input' error message when attempting to convert. The code works fine when libvlcsharp is uninstalled and there is only one instance of the ffmpeg library being used.
So, I'm looking for video compression / transcode options for Xamarin.iOS.
I've looked into the docs for libvlcsharp and it sounds like we can transcode, but it's somewhat vague on how to do that:
https://github.com/videolan/libvlcsharp/blob/3.x/docs/how_do_I_do_X.md
How do I do transcoding?
Pretty similarly to how you would do it from the CLI. Read https://wiki.videolan.org/Transcode/ and try media options with Media.AddOption.
In my case, I'd like to transcode non-interactively / in the background of the app. There is a 'dummy' option in the command line interface for doing this, so I was wondering how we'd do this from libvlc / libvlcsharp.
So far, my code from these docs looks like this:
using(var vlc = new LibVLC())
{
Media media = new Media(vlc, source, FromType.FromLocation);
media.AddOption($":sout=#transcode{{vcodec=h264,venc=x264{{cfr=40}},vb=2048,scale=auto,acodec=mp4a,ab=96,channels=2,samplerate=44100}}:std{{access=file,mux=ts,dst={destination}}}");
media.AddOption("dummy");
//How do I start the transcoding non interactively??
}
As replied on the libvlc discord server, when you are transcoding a video, it is not displayed at all and you just don't need to create a VideoView, the MediaPlayer alone is enough.
The rest is finding the correct transcoding options, and you already found the correct wiki page for that.

Android MediaPlayer Internal subtitles

I need to show internal subtitles with android MediaPlayer.
I am playing a .ts stream, subtitles are coming on a seperate stream with DVB sub codec.
Currently working on Android 4.2.2, DVB sub is not supported with native media player.
Any Alternative?
You can take a look at Google's open source video player https://github.com/google/ExoPlayer
They don't have DVB, but you can either add your own parser or if you already have it somewhere, then just plug it to the player.
Otherwise, if you want to do it with MediaPlayer, then you need to keep track of current playback time and display the subtitles on top in a separate view.

Playing mp3 Audio files in WP7

I want to stream an audio from server using windows phone 7
the audio extension is mp3. I have tried Mp3MediaStreamSource class but the problem was that it downloads all the audio then start playing it.
I want to know what is the best way to play audio in WP7 for platform 7.0 ( with buffering -> not waiting until the entire audio file is downloaded.
Thanks in advance
I use Background Audio agent do stream mp3 radio broadcast. Take a look at this tutorial http://msdn.microsoft.com/en-us/library/hh202978(v=VS.92).aspx

How to show audio details when played using MediaPlayerLauncher?

In my application i am playing an audio file (let it be .mp3) using MediaPlayerLauncher. File is downloaded from network and stored in IsolatedStorage.
I managed to play the audio but it was a bit disapointing to see that there is absolutly no details about the played track.
Is there a way to show picture and/or track name when launched with MediaPlayerLauncher? Or am i forced to use MediaElement?
Unfortunately, if you're just playing an audio stream using the MediaPlayerLauncher there si no way to specifyu additional (meta) data for the launcher to also display.
If you want additional information displayed then you'll need to create the UI yourself and play the track via a MediaElement (or background audio).

Play live stream

Is there a gui or better yet something via terminal for the Mac (unix) that can play a rtmp live stream? So be able to enter the rtmp address and also the stream name? I have tried VLC with no luck. I'm on Snow Leopard.
I just want to have a window pop open and the stream be available to view...like when you play a file via command line for mPlayer.
why not just create some embed code in a html page and point the stream at that?
Download the jw flash player demo and just change the rtmp stream.

Resources