SlideShare una empresa de Scribd logo
1 de 31
Streaming Video in iOS
Nirbhay K
http://above-inc.com
CocoaHeads - Cocoa on the Brain
Streaming Apps Overview
CNBC Pro Netflix Hulu +
Twitch.tvUstream.tvJustin.tv
Technology
• HLS (HTTP Live Streaming) - [Apple Inc.]
• Progressive Download
• Streaming on Other Platforms
– Smooth Streaming -[Microsoft]
– HDS (HTTP Dynamic Streaming) - [Adobe]
– RTMP (Real Time Messaging Protocol) – [Adobe]
– RTP (Real Time Transport Protocol)
– RTCP (RTP Control Protocol)
– RTSP (Real Time Streaming Protocol) = RTP+RTCP
MPEG–DASH
HTTP Streaming Standard
DASH - Dynamic Adaptive Streaming over HTTP .
Courtesy - http://xkcd.com/927/
Problems with streaming on iOS
• Network
• Do’s/Don’ts [Apple restrictions]
MEH.. !!
How do I get my streaming app
working??
Todays menu
• Streaming Live v/s Streaming On Demand
• How HLS works
• Setting up HLS on Server
• Streaming HLS in iOS
• Using Wowza Server to deliver multi device
streaming
HLS Architecture
• Server components
• Distribution components
• Client components
HLS Architecture
• Server Components
– Media Encoder
– Stream Segmenter
• Media Segment File
• Index Files (m3u8 playlists)
– File Segmenter
HLS Architecture
• Distribution Components
File Ext. Mime Type
.m3u8 application/x-mpegURL or vnd.apple.mpegURL
.ts Video/MP2T
HLS Architecture
• Client components
– End user media player software
– Custom player
– HTML5 Browser
HLS Architecture
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10.00000,
fileSequence0.ts
#EXTINF:10.00000,
fileSequence1.ts
#EXTINF:10.00000,
[…]
#EXT-X-ENDLIST
• Simple Index File (m3u8)
HLS Architecture
• Simple Index File (m3u8)
M3U8 fomat,
Just a list of files to
play
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10.00000,
fileSequence0.ts
#EXTINF:10.00000,
fileSequence1.ts
#EXTINF:10.00000,
[…]
#EXT-X-ENDLIST
HLS Architecture
• Simple Index File (m3u8)
M3U8 fomat,
Just a list of files to
play
Metadata tags
describing the
content
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10.00000,
fileSequence0.ts
#EXTINF:10.00000,
fileSequence1.ts
#EXTINF:10.00000,
[…]
#EXT-X-ENDLIST
Each segment file
preceded by
metadata eg.
#EXTINF:10
(depicts segment
duration)
HLS Architecture
• Simple Index File (m3u8)
M3U8 fomat,
Just a list of files to
play
Metadata tags
describing the
content
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10.00000,
fileSequence0.ts
#EXTINF:10.00000,
fileSequence1.ts
#EXTINF:10.00000,
[…]
#EXT-X-ENDLIST
If there is no end
tag client will treat
this as live stream
Each segment file
preceded by
metadata eg.
#EXTINF:10
(depicts segment
duration)
HLS Architecture
• Simple Index File (m3u8)
M3U8 fomat,
Just a list of files to
play
Metadata tags
describing the
content
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10.00000,
fileSequence0.ts
#EXTINF:10.00000,
fileSequence1.ts
#EXTINF:10.00000,
[…]
#EXT-X-ENDLIST
HLS Architecture
Basic Configuration Diagram
Courtesy - http://apple.com/
HLS Specification
HTTP Live Streaming Specification
TOOLS
• Media segmenter
– File Segmenter
– Stream segmenter (Will not cover it today)
• Streaming Tools – Download link
mediafilesegmenter -f <foldername> <source file>.mp4
mediastreamsegmenter -s 3 -D -f <foldername> <live encoder url>
Setting up HLS with Tools
File Segmenter
{ Demo }
Distributing HLS with Webservers
• Apache
• Nginx
• Any webserver/CDN
{ Demo }
What is Wowza Server
Wowza Media Systems® provides the next
generation of media streaming software which
simplifies the highest quality live and on-
demand video streaming to any Internet-
connected device.
Why Wowza
• Integrated Live Transcoder
• Multi protocol nDVR
• Multi Platform DRM
• Streaming to multiple devices including IPTV devices
• Restreaming of IP cameras or other sources
• Encoder for SHOUTcast / ICEcast restreaming
• Supports all major server OS
• Recording of live streams
• Multiparty video conferencing
• 10GBps per server performance
Life Before Wowza
Courtesy - http://www.telestream.net/
Wowza Live Stream delivery Diagram
Courtesy - http://www.wowza.com/
Setting up Wowza Server
{ Demo }
Live cam publishing on Wowza
{ Demo }
Consume Wowza stream
{ Demo }
Code Links
• iOS HLS Client
– https://github.com/NirbhayK/Streamingplayer
• Factime camera broadcast using VLC (script)
– https://github.com/NirbhayK/vlcbroadcastscript
Q&A

Más contenido relacionado

La actualidad más candente

ESXi PXE Server-Instructions/Documentation
ESXi PXE Server-Instructions/DocumentationESXi PXE Server-Instructions/Documentation
ESXi PXE Server-Instructions/Documentation
Jeremy Dixon
 
Things Reqiurements
Things Reqiurements Things Reqiurements
Things Reqiurements
bashag2
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)
Raghu nath
 

La actualidad más candente (20)

Ftp server
Ftp serverFtp server
Ftp server
 
Ftp server linux
Ftp server linuxFtp server linux
Ftp server linux
 
ESXi PXE Server-Instructions/Documentation
ESXi PXE Server-Instructions/DocumentationESXi PXE Server-Instructions/Documentation
ESXi PXE Server-Instructions/Documentation
 
Meeting 9 samba
Meeting 9   sambaMeeting 9   samba
Meeting 9 samba
 
Ubuntu server guide
Ubuntu server guideUbuntu server guide
Ubuntu server guide
 
Things Reqiurements
Things Reqiurements Things Reqiurements
Things Reqiurements
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionInstallation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server Edition
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file system
 
HTML5 Multimedia Streaming
HTML5 Multimedia StreamingHTML5 Multimedia Streaming
HTML5 Multimedia Streaming
 
Meeting 14. web server ii
Meeting 14. web server iiMeeting 14. web server ii
Meeting 14. web server ii
 
Scale13
Scale13Scale13
Scale13
 
Linux one sles12sp3 installation lpar
Linux one   sles12sp3 installation lparLinux one   sles12sp3 installation lpar
Linux one sles12sp3 installation lpar
 
Server configuration
Server configurationServer configuration
Server configuration
 
Ftp hari edu
Ftp hari eduFtp hari edu
Ftp hari edu
 
Debian
DebianDebian
Debian
 
Modul server debian 5
Modul server debian 5Modul server debian 5
Modul server debian 5
 
FTP Client and Server | Computer Science
FTP Client and Server | Computer ScienceFTP Client and Server | Computer Science
FTP Client and Server | Computer Science
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)
 
US07FFT-mod_ftp.ppt
US07FFT-mod_ftp.pptUS07FFT-mod_ftp.ppt
US07FFT-mod_ftp.ppt
 
Presentation on samba server
Presentation on samba serverPresentation on samba server
Presentation on samba server
 

Similar a Cocoaheads - Streaming on iOS devices

Video Streaming
Video StreamingVideo Streaming
Video Streaming
Videoguy
 

Similar a Cocoaheads - Streaming on iOS devices (20)

Multimedia Streaming Architecture
Multimedia Streaming ArchitectureMultimedia Streaming Architecture
Multimedia Streaming Architecture
 
Mm sys 2013-demo
Mm sys 2013-demoMm sys 2013-demo
Mm sys 2013-demo
 
Dos presentation by ahlam shakeel
Dos presentation by ahlam shakeelDos presentation by ahlam shakeel
Dos presentation by ahlam shakeel
 
Streaming video to html
Streaming video to htmlStreaming video to html
Streaming video to html
 
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
 
Approaches to Building Media Streaming Applications
Approaches to Building Media Streaming ApplicationsApproaches to Building Media Streaming Applications
Approaches to Building Media Streaming Applications
 
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
 
Technology Update: MPEG-Dash
Technology Update: MPEG-DashTechnology Update: MPEG-Dash
Technology Update: MPEG-Dash
 
Windows Azure Media Services June 2013 update
Windows Azure Media Services June 2013 updateWindows Azure Media Services June 2013 update
Windows Azure Media Services June 2013 update
 
Apple's live http streaming
Apple's live http streamingApple's live http streaming
Apple's live http streaming
 
Introduction to Amazon Elastic Transcoder
 Introduction to Amazon Elastic Transcoder  Introduction to Amazon Elastic Transcoder
Introduction to Amazon Elastic Transcoder
 
Video Streaming
Video StreamingVideo Streaming
Video Streaming
 
Videostream compression in iOS
Videostream compression in iOSVideostream compression in iOS
Videostream compression in iOS
 
FMS Administration Seminar
FMS Administration SeminarFMS Administration Seminar
FMS Administration Seminar
 
Rebaca's Video Delivery Expertise Overview
Rebaca's Video Delivery Expertise OverviewRebaca's Video Delivery Expertise Overview
Rebaca's Video Delivery Expertise Overview
 
1_MWS2018_Tutorial1_Pham_Internet Delivered Media.pdf
1_MWS2018_Tutorial1_Pham_Internet Delivered Media.pdf1_MWS2018_Tutorial1_Pham_Internet Delivered Media.pdf
1_MWS2018_Tutorial1_Pham_Internet Delivered Media.pdf
 
Writing a Fullstack Application with Javascript - Remote media player
Writing a Fullstack Application with Javascript - Remote media playerWriting a Fullstack Application with Javascript - Remote media player
Writing a Fullstack Application with Javascript - Remote media player
 
2015 snl l30_live_encoding_cdn_stream
2015 snl l30_live_encoding_cdn_stream2015 snl l30_live_encoding_cdn_stream
2015 snl l30_live_encoding_cdn_stream
 
Apple hls technical presentation
Apple hls technical presentationApple hls technical presentation
Apple hls technical presentation
 
Slide
SlideSlide
Slide
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Cocoaheads - Streaming on iOS devices

  • 1. Streaming Video in iOS Nirbhay K http://above-inc.com CocoaHeads - Cocoa on the Brain
  • 2. Streaming Apps Overview CNBC Pro Netflix Hulu + Twitch.tvUstream.tvJustin.tv
  • 3. Technology • HLS (HTTP Live Streaming) - [Apple Inc.] • Progressive Download • Streaming on Other Platforms – Smooth Streaming -[Microsoft] – HDS (HTTP Dynamic Streaming) - [Adobe] – RTMP (Real Time Messaging Protocol) – [Adobe] – RTP (Real Time Transport Protocol) – RTCP (RTP Control Protocol) – RTSP (Real Time Streaming Protocol) = RTP+RTCP
  • 4. MPEG–DASH HTTP Streaming Standard DASH - Dynamic Adaptive Streaming over HTTP . Courtesy - http://xkcd.com/927/
  • 5. Problems with streaming on iOS • Network • Do’s/Don’ts [Apple restrictions]
  • 6. MEH.. !! How do I get my streaming app working??
  • 7. Todays menu • Streaming Live v/s Streaming On Demand • How HLS works • Setting up HLS on Server • Streaming HLS in iOS • Using Wowza Server to deliver multi device streaming
  • 8. HLS Architecture • Server components • Distribution components • Client components
  • 9. HLS Architecture • Server Components – Media Encoder – Stream Segmenter • Media Segment File • Index Files (m3u8 playlists) – File Segmenter
  • 10. HLS Architecture • Distribution Components File Ext. Mime Type .m3u8 application/x-mpegURL or vnd.apple.mpegURL .ts Video/MP2T
  • 11. HLS Architecture • Client components – End user media player software – Custom player – HTML5 Browser
  • 13. HLS Architecture • Simple Index File (m3u8) M3U8 fomat, Just a list of files to play #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PLAYLIST-TYPE:VOD #EXTINF:10.00000, fileSequence0.ts #EXTINF:10.00000, fileSequence1.ts #EXTINF:10.00000, […] #EXT-X-ENDLIST
  • 14. HLS Architecture • Simple Index File (m3u8) M3U8 fomat, Just a list of files to play Metadata tags describing the content #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PLAYLIST-TYPE:VOD #EXTINF:10.00000, fileSequence0.ts #EXTINF:10.00000, fileSequence1.ts #EXTINF:10.00000, […] #EXT-X-ENDLIST
  • 15. Each segment file preceded by metadata eg. #EXTINF:10 (depicts segment duration) HLS Architecture • Simple Index File (m3u8) M3U8 fomat, Just a list of files to play Metadata tags describing the content #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PLAYLIST-TYPE:VOD #EXTINF:10.00000, fileSequence0.ts #EXTINF:10.00000, fileSequence1.ts #EXTINF:10.00000, […] #EXT-X-ENDLIST
  • 16. If there is no end tag client will treat this as live stream Each segment file preceded by metadata eg. #EXTINF:10 (depicts segment duration) HLS Architecture • Simple Index File (m3u8) M3U8 fomat, Just a list of files to play Metadata tags describing the content #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PLAYLIST-TYPE:VOD #EXTINF:10.00000, fileSequence0.ts #EXTINF:10.00000, fileSequence1.ts #EXTINF:10.00000, […] #EXT-X-ENDLIST
  • 17. HLS Architecture Basic Configuration Diagram Courtesy - http://apple.com/
  • 18. HLS Specification HTTP Live Streaming Specification
  • 19. TOOLS • Media segmenter – File Segmenter – Stream segmenter (Will not cover it today) • Streaming Tools – Download link mediafilesegmenter -f <foldername> <source file>.mp4 mediastreamsegmenter -s 3 -D -f <foldername> <live encoder url>
  • 20. Setting up HLS with Tools
  • 22. Distributing HLS with Webservers • Apache • Nginx • Any webserver/CDN { Demo }
  • 23. What is Wowza Server Wowza Media Systems® provides the next generation of media streaming software which simplifies the highest quality live and on- demand video streaming to any Internet- connected device.
  • 24. Why Wowza • Integrated Live Transcoder • Multi protocol nDVR • Multi Platform DRM • Streaming to multiple devices including IPTV devices • Restreaming of IP cameras or other sources • Encoder for SHOUTcast / ICEcast restreaming • Supports all major server OS • Recording of live streams • Multiparty video conferencing • 10GBps per server performance
  • 25. Life Before Wowza Courtesy - http://www.telestream.net/
  • 26. Wowza Live Stream delivery Diagram Courtesy - http://www.wowza.com/
  • 27. Setting up Wowza Server { Demo }
  • 28. Live cam publishing on Wowza { Demo }
  • 30. Code Links • iOS HLS Client – https://github.com/NirbhayK/Streamingplayer • Factime camera broadcast using VLC (script) – https://github.com/NirbhayK/vlcbroadcastscript
  • 31. Q&A