How to play .m3u8 or .ts file in iOS? - 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.

Related

How to create HTTP server inside iOS app that will feed the .m3u8 data to AVPlayer?

How to create HTTP server inside iOS app to stream & play file .m3u8 file
http://ccbprnrush-vh.akamaihd.net/i/PRN/premiereradionetworks/The-Rush-Limbaugh-Show/102617/80407_1509037716.12_RUSHMP320171026_,48,.mp4.csmil/master.m3u8
1) You can play .m3u8 data to AVPlayer Please view this link: stackoverflow
2) >>>> http://ccbprnrush-v
You can use only https resources.

How Mobicent Media server plays audio using URL

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.

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.

Live streaming Azure framework,is url issue?

Working on ios app.
For live streaming.
Using Azure framework.
I am receiving the bytes at run time.
But could not play them in Azure Media Player.
In Demo app we are able to play the static url from the server.
http://nimbuspartnerorigin.cloudapp.net/8260c015-abfb-4c8d-8c3a-689b1448e279/Contoso_93d705de-fe6b-4430-b0ab-4c291665b610-m3u8-aapl.ism/Manifest(format=m3u8-aapl)
But when we are streaming live we have to create the url like from server.
http://nimbuspartnerorigin.cloudapp.net/8260c015-abfb-4c8d-8c3a-689b1448e279/Contoso_93d705de-fe6b-4430-b0ab-4c291665b610-m3u8-aapl.isml/Manifest
Should I convert the Manifest file to .m3u8 format ?
Any body knows how to convert that manifest file to m3u8 file format ?
Please.
http://nimbuspartnerorigin.cloudapp.net/8260c015-abfb-4c8d-8c3a-689b1448e279/Contoso_93d705de-fe6b-4430-b0ab-4c291665b610-m3u8-aapl.isml/Manifest is a Smooth Streaming Manifest that can't be played back using Azure framework. You will need to create HLS live stream.
**For live streaming using Azure framework I was getting 'SmoothStreaming' url.
Which I could not play on iOS device directly.As told by Mingfei Yan in above answer**
So, We searched another way then Azure
We followed this link to set up the IIS server.
http://www.hanselman.com/blog/CommentView.aspx?guid=86968cd5-feeb-47f2-b02e-1eb4fa556379#commentstart
And we got the Apple HLS stream to play in Safari or
WebView(iOS).
Still I am waiting to use Azure Frameork If I configure it properly.

How to buffer audio in Blackberry?

I need to learn how to buffer audio stream from a remote server in Blackberry.
There is a sample buffered playback app with Blackberry api but can you tell what url may I use to test the application?
You can use any audio file (i.e. mp3) served up by a webserver. So either copy an mp3 file onto your own webserver or find a link to an mp3 file out on the internet.

Resources