I'm implement http live streaming video from my webserver to iPhone. Will I get rejected for bandwidth? - iphone

Apache webserver setup
added:
AddType application/x-mpegURL .m3u8
AddType video/MP2T .ts
to "httpd.conf" file.
Movie file preparation
I have 3 movie files (9mb - 25mb each).
Used QuickTime to convert movies into iPhone format.
Used mediafilesegmenter to convert .m4v into 10-second segments of .ts files, with an accompanying .m3u8 file.
Placed these in a folder on webserver.
iPhone App implementation
Created UIWebView whose URL points to http://71.190.235.29/~yujean/stream.html
Simulator accesses the site and streams the movie-files just fine.
Question
Will I still get rejected by apple for bandwidth issues over the 3G and/or Edge network?
Do I need to somehow check which network the end-user is on first? And then provide a different movie accordingly? If so, how do I do that ...?
Thank you in advance,
Eugene

We were rejected when we first submitted our mp3 streamer to the app store for excessive bandwidth use. Then we hobbled the app to limit its downloads to 4.5 meg in 5 min, which was accepted by Apple.
You can review that thread for more info on the issue.

To answer your second bullet-point first, the SDK does that all for you. Determining what quality to stream is not the concern of the developer.
To answer your first bullet-point, I haven't submitted my Live Streaming app so I don't know for sure, but I believe you will be rejected if you don't have a 64k stream. To be sure, check out Requirements for Apps, which is as definitive a list of requirements that you could probably get.

Related

Does iOS support anything outside of HTTP Live Streaming?

If streaming video to an iOS device, do I have to use HTTP Live Streaming? Is HDS supported? The problem is we have limited storage space and HTTP Live Streaming would require us to have more video files. Can someone give me some elucidation on these matters?
If your app will stream more than 10 minutes of video Apple requires that you use HTTP Live Streaming to deliver the video, otherwise your app will be rejected when you submit it to the app store. (This happened to me the first time I submitted my app, before I knew about this requirement.)
From the HTTP Live Streaming Overview:
Warning iOS apps submitted for distribution in the App Store must
conform to these requirements.
If your app delivers video over cellular networks, and the video
exceeds either 10 minutes duration or 5 MB of data in a five minute
period, you are required to use HTTP Live Streaming. (Progressive
download may be used for smaller clips.)
If your app uses HTTP Live Streaming over cellular networks, you are
required to provide at least one stream at 64 Kbps or lower bandwidth
(the low-bandwidth stream may be audio-only or audio with a still
image).
These requirements apply to iOS apps submitted for distribution in the
App Store for use on Apple products. Non-compliant apps may be
rejected or removed, at the discretion of Apple.
iOS devices support HTTP progressive download for .mp4 files, the server could be simply Apache or Nginx. The user experience is quite similar to HTTP live streaming.
RTSP is also possible. You can migrate live555 to iOS platform as the RTSP client, as use DarwinStreamingServer as the RTSP server.
I think that HTTP progressive download is the alternative solution. We already done it through a simple HTTP server. For RTSP or other type of protocol you have to implement it by yourself.
David

iPhone MPMoviePlayerController : download files while streaming en play them locally

I've m3u8 file with all the TS files. MPMoviePlayerController play them fine via http request on the streaming server. But I'd like to get the files locally in order to play them again later without any connection.
I managed to download m3u8 file and all the TS files locally on my device, I edited m3u8 files to point to local .ts instead of http ones, but I can't read them from this emplacement.
(VLC can do it well)
Is there a way to download the segments while playing (to avoid 2 downloads) and then to play them locally with MPMoviePlayerController or else.
.m3u8 is Apple HTTP Live Streaming, right? I think what you're trying to do simply goes against the design of that technology. You should expose the original file and allow it to be downloaded.
From what I understand, it's in the design of streaming that you don't get explicit access to the pieces in order to put them back together. For instance, Netflix uses streaming via Silverlight, and one of the benefits (to Netflix) is that it protects the data from being saved as if it were downloaded. Also, since HTTP Live Streaming allows a stream to switch bitrates on the fly, it's designed such that each time slice can be encoded at any number of bitrates, and none of them is canonical.
In theory, there might be a way to collect all the slices for a particular bitrate and re-encode them into a single video. But Apple's playback APIs are not going to give you that opportunity.
Instead of HTTP Live Streaming, consider progressive download. Just serve the original video file (transcode it to something the iPhone likes if necessary). If your server is configured properly, the playback APIs will do small requests to get particular chunks of the file, rather than the whole thing in one go, and it's a close second to proper streaming. I wish I could find where I read about this so I could give the proper name for it. Amazon S3 is set up to serve this way, if you need a quick solution.
But beware, Apple's docs say,
If your app delivers video over
cellular networks, and the video
exceeds either 10 minutes duration or
5 MB of data in a five minute period,
you are required to use HTTP Live
Streaming. (Progressive download may
be used for smaller clips.)

iphone video streaming

So, I recently submitted my first iphone app to Apple.
I did not stream my videos and they are over 10 minutes long, so my app was denied because I did not use HTTP Live Streaming.
So, we stream live videos every week. Those files are stored somewhere, but I am a little unsure of where. I want the video files that I made a feed for to be converted into streamed videos. But I don't want to use Apple's HTTP Live software. I do not know how to code into streamed video.
Is there anyway to either figure out where my streamed files are storing or is there a software that will convert videos into streamed video? Will take any suggestions.
Thanks
The main problem is that you must use HTTP Live Streaming if you wan't your app to be approved, and also be aware of the Apple restrictions (you must set different bitrates, one of 64kbps or lower).
If you don't want to use Apple tools, you can use ffmpeg. Take a look at ioncannon.net http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/
With Apple tools is easier. You just need mediafilesegmenter/mediastreamsegmenter.
There is also professional services out there, but not free, that will take care of all the process.
If you don't know where are your files, maybe you can use a sniffer and check where is your computer "listening to".
The easiest solution is to simply require that your users be on WiFi in order to watch the videos. The 10 min. / 5MB restriction only applies to video that is sent over Cellular networks, not WiFi. See Apple's "Reachability" code for an example of how to test the user's network connection at run-time.

MPMoviePlayerController on iPhone - Streaming or progressive download?

In my iPhone App I need to show the videos which are in Flash format.
I asked the client to change the videos in iPhone compatible format. They stored the converted the video on a server and I am able to show the video using MPMoviePlayerController.
Now we need to store around 25 videos (Each around 300 MB) and access them via iPhone App using MPMoviePlayerController
I have to help the client figure out how or where to host these files.
So some questions are there
1) What all things need to be taken care on server side for better performance? Is there any document available for this?
2) The video will be streaming or progressive download ? Do we have a choice?
I am sure many people would have done it. So kindly help in this regard.
if video is more then 10 minutes then you have to use streaming not progressive and you have to prepared playlist on server side with .m3u8 format. you just need to pass this url with .m3u8 into the mpmediaplayercontroller and this will take care of every thing from client side.
For server side functionality you can search apple code for streaming video.

Need to play flash videos on iphone

I am building this iphone app for a client and they have a large set of flash video files that they need to play/stream to the iphone. I understand that the iphone doesnt natively support flv playback but isnt there anything I can do to get around this problem?
In case it helps, they are using the akamai flash player on their website to play these video files.
Thanks in advance.
Yes! - You can convert all the videos to m4v format.
There's a javascript hack available, but it will only work if it's installed on the clients web server. It's also pretty clunky and slow and will likely murder battery life.
A workaround, since you're working with video, is to convert to mp4 format.
Short answer: no flash, but conversion will do what you need.
akamai actually supports "auto-packaging" of h.264 content which may be your best option here. By uploading 1 or more h.264 files you can use those to both serve your Flash player, and akamai will also auto-package them for iPhone (chunking them into .ts files and creating an .m3u8 reference file for dynamic mobile streaming).
This allows you to not have separate encodes for mobile and web, thus saving money and time so you can leverage your existing archive.