fall premieres: media frameworks in ios 11, macos 10.13, and tvos 11 (cocoaconf next door, june...

41
Fall Premieres: Media for Apple Platforms in Late 2017 Chris Adamson • @invalidname CocoaConf Next Door • June, 2017

Upload: chris-adamson

Post on 21-Jan-2018

188 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Fall Premieres: Media for Apple Platforms in

Late 2017Chris Adamson • @invalidname

CocoaConf Next Door • June, 2017

Page 2: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Agenda

• HEVC / H.265

• Apple Music API

• Changes to Existing Frameworks

• HTTP Live Streaming

• Developments outside of Apple

Page 3: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

HEVC / H.265

Page 4: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

H.265• "High Efficiency Video Codec"

• Approximately double the data compression (or much better quality) of H.264 at same bitrate

• Expected use-case: 4K video streaming

• Work began in 2010, standard approved in 2013

• Versions 2, 3, and 4 approved since then

Page 5: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 6: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 7: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 8: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Standardized Mac / iOS support Major Uses

MPEG-1 1993 QuickTime 2.5 Video CD

MPEG-2 1996 QuickTime 6 (optional) DVD, Digital TV

H.264 2003QuickTime 7

(MacOS X 10.4), iPhone OS 1

Blu-Ray, Digital TV, Streaming

H.265 2013 macOS High Sierra, iOS 11 ???

Page 9: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Patent Encumbrances• HEVC contains technology covered by hundreds

(thousands?) of patents

• Patent Pools: MPEG-LA, HEVC Advance, Velos Media

• Don't even cover everything (Technicolor SA)

• Much costlier than H.264 licenses (max $25M/yr [MPEG-LA] $40M/yr [HEVC Advance])

Page 10: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

VP9• Google-supported competitor to HEVC

• Royalty-free

• Only patents (🤞) are held by Google

• Supported by 75% of browsers (desktop + mobile)

• Used extensively by YouTube for delivery to non-Apple platforms

Page 11: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 12: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

AV1

• Royalty-free codec from Alliance for Open Media (AV1 means "AOMedia Video 1")

• Founding members: Amazon, Cisco, Intel, Google, Microsoft, Mozilla, Netflix

• Successor to VP9

• Planned for release in 2017

Page 13: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

http://www.streamingmediaglobal.com/Articles/ReadArticle.aspx?ArticleID=118062

Then I asked where HEVC fit in. Aaron explained that Netflix currently deployed HEVC primarily on Smart TVs, and saw the codec as integral to its HDR strategy. For computers and mobile, however, H.264 and VP9 are Netflix's primary codecs, and the focus of most of its current research, which will soon include AV1.

I asked about the future of HEVC given the imminent release of AV1, and the fact that Netflix was a founding member of the Alliance for Open Media. Ronca laughed, explaining that Netflix was still encoding in VC1 format for some older platforms, and that HEVC is important for their UHD/HDR experience, though he noted that the HEVC license uncertainty is an ongoing concern.

NAB 17 Codec Roundup

Page 14: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Jan Ozer HEVC will do well in broadcast, no doubt. Still not available in any browser, iOS, and Netflix prefers VP9/AV1 over HEVC for Android. VP9 gets you most browsers and many smart TVs and OTT boxes (like Roku 4), so it's the smart money UHD codec if you don't need HDR.

http://www.streamingmediaglobal.com/Articles/ReadArticle.aspx?ArticleID=118062

Page 15: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

High Dynamic Range (HDR)

http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/HDR-The-More-Bits-the-Better-118643.aspx

HDR: The More Bits, the Better Apple's new Macs feature 10-bit HEVC decoding for HDR video viewing. To understand why that's important, it's worth a look at an old technology—film cameras

By Tim Siglin

Posted on June 6, 2017

The aperture itself determines how deep or shallow the focus will be, which is where we get the terminology for depth of field that's now being tossed about for consumer smartphones. The Apple iPhone 7 "depth effect" feature makes use of two lenses to create a digital version of depth of field.

Page 16: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

HEVC in code• AVVideoCodecType.hevc

• AVAssetExportPresetHEVC1920x1080, …3840x2160

• AVOutputSettingsPreset.hevc1920x1080, hevc3840x2160

• kCMVideoCodecType_HEVC

• kVTCompressionPropertyKey_ProfileLevel values: Profile0_Level10, Profile0_Level45, Profile3_Level45

Page 17: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 18: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Apple Music API

Page 19: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

AppleMusic TODOs

• Web API (MusicKit) for getting Apple Music artists/albums/playlists, getting user's preferences

• Working with Store Kit to actually access those items

• Playing with Media Player

Page 20: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

MusicKit web service

• APIs: artists, albums, songs, playlists, search, charts, recommendations

• Must have a developer token to call

• Must get a user token to access personalized features

https://api.music.apple.com/{version}/catalog/{storefront}/{api}?[params]

Page 21: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Subscription UI

• If user isn't an Apple Music subscriber, you can show the subscription view, optionally showing specific content

• Can embed your affil token

Page 22: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Playback

• MPMediaPlayer

• Can create MPMediaItem (local songs), MPMusicPlayerStoreQueueDescriptor (Apple Music songs), MPMusicPlayerPlayParametersQueueDescriptor (personalized collections)

Page 23: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 24: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Changes to Existing Frameworks

Page 25: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

AVAudioEngine• Offline Rendering

• Auto shutdown

• Completion callbacks (.dataConsumed, .dataRendered, .dataPlayedBack)

• Important: AUGraph (Audio Toolbox) to be deprecated in 2018

Page 26: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 27: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 28: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Also

• watchOS recording

• AUAudioUnit "preferred view configuration" API

• Support for FLAC and Opus audio codecs

• Spatial audio formats

Page 29: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 30: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

HTTP Live Streaming

Page 31: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

HLS updates• HLS approved for an actual RFC

• Format war with MPEG-DASH continues

• HEVC supported (of course), fMP4 only (not .ts)

• New subtitle standard ISMC1

• Nice but esoteric features (variables in playlists)

• FairPlay is still very much a thing. 🤐

Page 32: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 33: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Beyond Apple Park

Page 34: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

ReplayKit

• Screen Capture + Livestreaming API

Page 35: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 36: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 37: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)
Page 38: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

RTMP HLS

Page 39: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

https://github.com/shogo4405/GPUHaishinKit.swift

Page 40: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

https://github.com/shogo4405/GPUHaishinKit.swift

Page 41: Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaConf Next Door, June 2017)

Fall Premieres: Media for Apple Platforms in

Late 2017Chris Adamson • @invalidname

CocoaConf Next Door • June, 2017