Streaming local encrypted file to Apple TV - ios

My app solution on iOS has downloaded audio and video for offline use. Streaming to apple tv worked like charm for a while, however, we needed to implement file encryption. As a web app, to support encrypted file on the webview, we implemented a http server, which decrypts the file, and streams it unencrypted to the webview request. But now, we need to stream theses encrypted files to the Apple Tv, obviously, when trying to shared the video/audio, the Apple TV tries to stream from the iPad http server url (localhost:8000), and an error is shown.
How should I be able to stream it? As I see, there are other apps which uses encryption and works fine with air play.
Edit: The error message is way generic, just appears on TV that the file could not be played, no log on xcode console.
The HTML on the webview is simple as that, no big deal: <video src= "http://localhost:8000/file/fileId"/>, works fine on iPad, but not streaming to Apple TV.

Related

live video streaming formats supported in iOS programming

I am working live video streaming in iPad app. I have done it previously using MPMediaPlayer with HTTP servers.
From link here I understand that "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.
But my client has provided video streaming URLs in UDP (eg. udp://225.X.X.X:XXXXX ) format and also suggested to refer links link1 and link2 as support to his statement that this will work in iOS for live video streaming.
But I am unable to relate provided links by him with requirement.
My doubts are -
what all formats does iOS supports for live video streaming ?
Does this udp link is of use for me in iOS for video streaming ?
On wifi, iOS supportS everything, because you have access to raw sockets, and the h.264 decode via VideoToolbox. So any protocol can be developed even If there is no out of box support. If you want the video to work over a cellular network, it MUST use HLS. no other options. (Unless you are Facebook, then apple will grant exceptions to this policy)

How do web browsers on iOS play Flash?

I noticed this web browser, Photon (iTunes Store link) is able to play flash. My question is, if Apple doesn't allow flash to run on devices and all web browsers must use Apple's UIWebView, how can this app enable Flash playback?
Most third party apps route flash video to a there own Server to be re-encoded to another Safari friendly file format such as mp4. Once the was bee re-encoded it sent back to there client device

IPhone Resets Communication from Server

I have an mp4 (h.264) file that I want to play on an IPhone (via HTTP). When the file sits on a Windows IIS server, my IPhone and IPad will play the video without any issues.
The file is here: test file
I will leave access to this server for a few days for testing purposes.
When the file sits on our proprietary server, my IPhone and IPad request the download, but then stops the process almost immediately. Non IOS phones and desktop browsers have no problems requesting and viewing the video from the proprietary server. I don't believe that it has anything to do with the HTTP response headers because of the fact that non-IOS phones can play the video.
I use Wireshark to see the http/tcp requests between the IPhone and the server. I see the IPhone request the mp4 and then I see the server send a "200 OK" response and then start to send the file. Soon after the server starts to send the file, the IPhone sends a "reset" request which stops the sending of the file.
Any ideas why the IPhone would reset the communication and stop the file from being sent? I am far from a regular user of Wireshark, so hopefully, my reading of the file is correct.
Here is an image of my Wireshark capture if anyone is interested. It clearly shows the reset from the IPhone.
Wireshark Image
Any help will be appreciated.
Thanks,
Dana
This has been solved. Our server did not handle HTTP requests for partial content (i.e. Range: bytes=0-999). Range headers in incoming requests were being ignored.
We updated the server to handle these requests and IOS devices are now able to download video from our server.
See the link below for more info:
http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p5-range-latest.html

Objective C: iOS: Audio Streaming and Audio Uploading using RTMP

I have to record the high volume sound. It can be upto 60 seconds. The application is already made on flash and the current flash application uses rtmp (red5 server) and streams the recording to the server in real time as FLV. I have uploaded the audio file on server as mp3 from iOS application but this approach is not useful as the volume is very high as mentioned above. So I want to use rtmp (red5 server) for iOS application. I want to ask is it possible that I can record the audio and upload on this server and also can steam from there?
Edit-1: I want to ask that whether Apple can reject the application if we use the RTMP iOS library in our application?
Edit-2: I did some research and found some 3rd party libraries like:
http://www.aftek.com/afteklab/aftek-iphone-RTMP-library.shtml
I want to know, whether it is possible to directly connect from iOS to RTMP server?
Or these libraries use the middle layer approach with HTTP to connect to RTMP?
Example: iOS -> HTTP Server -> RTMP Server (red5)
I will appreciate the help.

How to convert URL file 'Smooth streaming' to Apple HLs format?

In
iOS App
for Live streaming
I am getting the response from server
like this, (You can check)
http://4a75a0cce3694e29bc670b3d574fec92.cloudapp.net/push.isml/manifest
Which is Smooth Streaming file.
How to play this file in my ios app.
Is there any run time converter to convert this file to Apple HLS ?
Any player*(Smooth Streaming)* like
OSMF plugin for iOS
HTML5 player
Silverlight plugin for iOS
Actually :
Actually we have not tried much with Azure Framework. We setted up
the IIS server and got the live streaming.
Played stream by HTML5 video tag in web view.
By following this link
http://www.hanselman.com/blog/CommentView.aspx?guid=86968cd5-feeb-47f2-b02e-1eb4fa556379#commentstart
We can able to play live streaming in our iOS devices.
Still I am happy if I can configure the windows AZure framework to do the same.
You can use the Windows Azure Media Services for converting SmoothStreaming media content into Apple HLS content. Either you use the Management Portal to upload your media assets and then encode it with the preset "Playback on iOS devices and PC/MAC" or you use the REST Api for the Windows Azure Media Services at runtime.
With the REST API you can utilize the Windows Media Packager to encode Smooth Streaming content for HLS. Find a sample configuration for that task here.

Resources