Giter VIP home page Giter VIP logo

ioslivestreamexample's Introduction

iOSLiveStreamExample

Work in progress!

As of today, it's a WIP and not fully functional. I'm still trying to wrap my head around the topic. Help, expertise and contribution is appreactiated.

Motivation

Here's the thing: We want to establish a H264/AAC live stream from our iOS device to some arbitrary server over RTMP. Easy enough, right? Well... not so much.

Before iOS 8, there wasn't even a way to use the hardware encoder without writing into a file via AVAssetWriter. So, your only options were to either find a way to simultaneously and efficiently read and write from and to many temp files, or to use some 3rd party software encoders, which are pretty good in delivering bad frame rates while burning through your device's battery.

That whole situation changed with iOS 8 and the introduction of the VideoToolbox framework for iOS which gives you direct access to your device's hardware de- and encoders. So, this is good news. The bad news is, that there's almost no documentation. Well, almost none:

Video Toolbox (VideoToolbox.framework). The Video Toolbox framework comprises the 64-bit replacement for the QuickTime Image Compression Manager. Video Toolbox provide services for video compression and decompression, and for conversion between raster image formats stored in Core Video pixel buffers.

Source: OS X Media Layer (try to find it without CMD-F)

Okay, there is indeed a pretty good, but mostly superficial session from last year's WWDC, which gives at least some clues. Other than that, you're pretty much on your own.

So, I'd like to take this opportunity to familiarize myself with the whole topic on the other hand, and to provide a sample project with a (hopefully) simple enough code base for other people desperately looking for clues (like me).

(https://xkcd.com/979/)

Maintainer

Pascal Cremer

License

The MIT License (MIT)

Copyright (c) 2014-2015 Pascal Cremer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ioslivestreamexample's People

Contributors

b00gizm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.