How Mobicent Media server plays audio using URL - media-source

I want to know details how Mobicent Media server plays audio using URL? In which method it's streaming using URL. For local storage I'm understanding but for remote storage(URL) I'm not getting how it's working. I didn't find anything in the user guide or in website. It will be very helpful if you please inform me details or suggest me any web link.
Thanks.

In order for the Media Server to play a file you need to send a Play signal, where you specify the URL of the file to be played. If the file is local then the URL format will be file://path_to_file/filename.wav; otherwise if the file is hosted remotely then the URL format will be http://something/filename.wav.
Upon receiving the Play request, the Media Server will ask the underlying AudioPlayer to process the URL, first guaranteeing that it is not malformed and that the file type is supported: .wav, .gsm, .tone, .mov, .mp4, .3gp. If all is fine, the player will open a stream to the file right away.
Finally, the AudioPlayer is activated so it can start processing the file and transmitting audio to the remote peer.
You can find a fully detailed discussion about this topic in the mobicents public forum as well (including links to github code):
https://groups.google.com/d/msg/mobicents-public/4zuUOM3zHsM/fQM6o80JEXwJ
Let me know if this helps.
Regards.

Related

use wireshark to get video url from java application

i was asked recently if its possible to sniff the s3 playback url of a video that is shown in a Java application. So i loaded up wireshark and launched the Java app and started recording.
but i few question came up.
how would i filter for video url
how do i tell if the packet sniffed belongs to a video stream
how can i rebuild the aws s3 url that was picked up. i assume its a private url, would the query parameters providing the access key be picked up?
or if this is at all possible.
thank for any feedback or suggestions.

How iTunes parses m3u files

I have a m3u file here.
When I downloaded the file and opened it in iTunes the program successfully started playing the stream audio and showed me the artist name and the song title. Moreover iTunes sends notification that track is changed and shows artist name and song title!
I wonder how iTunes guess this? The file doesn't have list of artists, it only has the link to the streaming audio. When I go this address mentioned in the file I can see a web page with some info. Does iTunes parse this pages and look for artist name? Don't think so...
Can anyone explain to me how to get song info from m3u file that contains only a link to an audio stream like iTunes does? Sample code in Obj-C or Swift of how to do this programmatically will be highly appreciated!
It comes down in the audio stream itself (using the Icecast protocol), rather than from the m3u file. You can prove this by opening the m3u file, taking the HTTP url inside, and putting it into VLC and you'll see the track data is still there.
There's a bit more info on this question: How do I extract streamed "now playing" data embedded in an Icecast audio (radio) stream on Samsung Smart-TV
There's also some obj-c specific stuff on this question: Getting SHOUTcast metadata on the Mac
And an explanation of the protocol here: http://www.smackfu.com/stuff/programming/shoutcast.html
Also if you're curious as to how I figured out the stream was an Icecast one, I opened Wireshark and filtered it by "ip.src == 79.120.77.11" and then started the stream, and in one of the first few packets there was a bit of data starting "icy-notice" and a mention of Shoutcast. A couple of packets later there's also the title of the radio station.

IOS Live streaming

Problem:
I need to download mp4 video from media server and simultaneously feed the localhost httpserver (GCDWebServer) to enable video streaming.
What have i tried so far:
I am able to download a video file from media server and then provide the localhost url for streaming the video.
But this takes a lot of time in downloading. So i wanted to know if there is a way i can segment the video on the fly and keep updating the m3u8 file as and when my next segment is ready.
Ok, Why downloading? Basically i need to deal with a custom encrypted video file. So i need to download, then decrypt the stream and then feed to my local httpserver.
I hope i'm clear in the requirements.

How to play .m3u8 or .ts file in iOS?

I have create one iOS application in xCode 4.5.1.
The main purpose of this applciation is the playing .m3u8 video file.
I have add one .m3u8 file with all segment(.ts) in our local resource bundle.
So, how to play this file in iPhone locally using MPMoviePlayerController or UIWebView?
And, Can we modify or not this file after the download from the server?
If possible then how to do it?
pls tell me, any one known...
You will only be able to play the HLS content if it's being served over HTTP. So you should run a simple http server in one thread, and then pass the local URL to MPMoviePlayerController. The URL will look like http://localhost:8080/file.m3u8 and the video player will read the stream from the http server you have running in another thread.
Here is a question about running a webserver on iOS that might help you along: iPhone HTTP Server
You can host the .m3u8 file on local server e.g GCDWebServer. Just create its instance and pass the path of .m3u8 file in that server. Then use the server generated local host path and pass it to your player It will automatically fetch the key and .ts file as per the content written in .m3u8 file.

Play the Video/Audio which is getting from the server

Is there any solution of this below one?
I have the Video/audio URLs
My Requirement is:
Is it possible to get the video/audio from the server and at the same time I have to open the player to play it(Like showing the Live-video directly in browser Field).
Means
Getting streaming into a buffer in back-end and at the same time I want to show it in the player.
If above is possible
I want to save that particular video/audio streaming data in to one file.
This blackberry KB link explains about streaming video from server. It may help you.

Resources