Stream MP4 video onto iPhone directly from S3? - ios

I have a bunch of MP4 files on S3. Is it possible to stream MP4 video content onto iPhone directly from S3? If so, how can I do this? If I can't do this, what options do I have for streaming video to iPhone? (e.g. run HLs streaming server on EC2? pseudo-streaming or progressive media download?)
Cloudfront can stream video but apparently only using RTMP protocol which is not supported natively by iOS. I'd like to stream natively (make things easier). Thanks all.

You can stream, but the video file must be segmented into .ts files and an .m3u8 file that lists the segments. See https://developer.apple.com/streaming/

Related

iOS webm, ogg, ogv, mp4 playback in app

I have an app where we use OGVKit pod at the moment in order to play/stream webm/ogg/ogv/mov videos (non-local). Now there's the new requirement to be able to play mp4 videos from an URL (non-local) and OGVKit kust supports local playback of mp4 files.
Is there a good library which supports playback of all these video file formats from non-local storage (stream) or do we need to switch between the AVPlayerVoewController/AVPlayerLayer?
I already tried to implement a switch which uses AVPlayerLayer if the file is not webm or ogg which partially worked but I couldn't get the layouting work correctly.
I also tried to search for an appropriate library but haven't found any yet.
Any ideas?

Downloading Gifv files for use in AVPlayer in Swift

I've been working with Imgur's api for fetching a retrieving photos but whenever I try and download a gifv, or webm I can't download or play it. Now Imgur's api has no direct way to download the gifv as an mp4. Is their anyway I can convert the downloaded gifv to a playable mp4 in Swift?
Is their anyway I can convert the downloaded gifv to a playable mp4 in Swift?
Not really.
gifv is not a real file format but a set of HTML5 rules that imgur uses on their webpages to deliver their new GIFs: the server decides which file it delivers upon several criteria like bandwidth.
gifv is actually a wrapper on their server containing a WebM file, a MP4 and a re-encoded GIF.
You can't use it as it is, a GIFV is only playable via an HTML code snippet generated by this imgur page.

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.

Stream only audio track from mp4 file

I have a remote MP4 file that has video and sound. I want to only stream the audio track of the mp4 file. I don't need the video and want to decrease the internet usage in my app. I have no idea where to start with this, Google doesn't seem to help. Is this impossible? Any ideas?
You can't... If you want audio only, you need to split video / audio on the server or put a stream software (like vlc, ffmpeg or mplayer) who can re-encode file in realtime (so you can drop video for new stream)
It's better, for me, to process all files on server and extract audio track...

darwin not able to stream uploaded 3gp files from rails

I am trying to upload 3gp files into my rails application on ami instance using paperclip.
I then move that 3gp file to darwing streaming server folder to stream it.
To have a better identification of file names , it has been prepended with some ids'.
Now when i am trying to play that video through its rtsp link on mobile, i am not able to play that video. Interestingly, when i download that video to my local machine and play it with say vlc - i am able to do that.
what could be missing here.
To stream a 3gp or mp4 file via darwin streaming server, you must ensure that the media file is hinted.
To add hint track to a 3gp or mp4 file, you can use MP4Box
http://gpac.wp.institut-telecom.fr/mp4box/
mp4box -hint sample.3gp

Resources