18
GO HLS STREAMING SANGWONL

Implementing HLS server with GO

Embed Size (px)

Citation preview

GO HLS STREAMINGSANGWONL

AGENDA- About HLS

- About GO- Implement HLS with GO- Demo

GO HLS STREAMING

ABOUT HLS - STREAMING HISTORY

GO HLS STREAMING

ABOUT HLS - DEFINITION

▸ HTTP Live Streaming lets you send audio and video over HTTP from an ordinary web server for playback on iOS-based devices—including iPhone, iPad, iPod touch, and Apple TV—and on desktop computers (Mac OS X).

▸ HTTP Live Streaming supports both live broadcasts and prerecorded content (video on demand).

▸ HTTP Live Streaming supports multiple alternate streams at different bit rates, and the client software can switch streams intelligently as network bandwidth changes.

▸ HTTP Live Streaming also provides for media encryption and user authentication over HTTPS, allowing publishers to protect their work.

GO HLS STREAMING

ABOUT HLS - HOW IT WORKS

The server component is responsible for taking input streams of media and encoding them digitally, encapsulating them in a format suitable for delivery, and preparing the encapsulated media for distribution.

GO HLS STREAMING

ABOUT HLS - HOW IT WORKS

The distribution component consists of standard web servers. They are responsible for accepting client requests and delivering prepared media and associated resources to the client. For large-scale distribution, edge networks or other content delivery networks can also be used.

GO HLS STREAMING

ABOUT HLS - HOW IT WORKS

The client software is responsible for determining the appropriate media to request, downloading those resources, and then reassembling them so that the media can be presented to the user in a continuous stream.

GO HLS STREAMING

ABOUT HLS - COMPATIBILITY

GO HLS STREAMING

ABOUT HLS - COMPETITOR

▸ Standard - MPEG-DASHhttp://www.encoding.com/mpeg-dash/

▸ Adobe Systems - HTTP Dynamic Streaminghttp://www.encoding.com/http-dynamic-streaming-hds/

▸ Microsoft - Smooth Streaminghttp://www.encoding.com/microsoft-smooth-streaming/

▸ Javascript - hls.jshttps://github.com/dailymotion/hls.js

▸ Android - MediaControllerhttps://developer.android.com/guide/appendix/media-formats.html

▸ iOS - MPMoviePlayerhttps://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/

▸ Windows - MicrosoftHLSSDKhttps://github.com/MicrosoftDX/MicrosoftHLSSDK

GO HLS STREAMING

ABOUT HLS - LIBRARY

GO HLS STREAMING

ABOUT HLS - REFERENCES

▸ http://appleinsider.com/articles/09/07/08/apple_launches_http_live_streaming_standard_in_iphone_3_0

▸ https://tools.ietf.org/html/draft-pantos-http-live-streaming-19

▸ https://developer.apple.com/streaming/

▸ http://www.encoding.com/http-live-streaming-hls/

▸ https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP

GO HLS STREAMING

ABOUT GO▸ * Some notable open-source applications in Go include:

Docker, a set of tools for deploying Linux containers Doozer, a lock service by managed hosting provider Heroku Juju, a service orchestration tool by Canonical, packagers of Ubuntu Linux Syncthing, an open-source file synchronization client/server application Packer, a tool for creating identical machine images for multiple platforms from a single source configuration Ethereum, a shared world computing platform.

▸ * Other companies and sites using Go (generally together with other languages, not exclusively): Google, for many projects, notably including download server dl.google.com Netflix, for two portions of their server architecture Dropbox, migrated some of their critical components from Python to Go CloudFlare, for their delta-coding proxy Railgun, their distributed DNS service, as well as tools for cryptography, logging, stream processing, and accessing SPDY sites. SoundCloud, for "dozens of systems" The BBC, in some games and internal projects Splice, for the entire backend (API and parsers) of their online music collaboration platform. Cloud Foundry, a platform as a service CoreOS, a Linux-based operating system that utilizes Docker containers. Couchbase, Query and Indexing services within the Couchbase Server Replicated, Docker based PaaS for creating enterprise, installable software.[ MongoDB, tools for administering MongoDB instances Zerodha, for realtime peering and streaming of market data[citation needed] Chango, a programmatic advertising company uses Go in its real-time bidding systems. SendGrid, a Boulder, Colorado-based transactional email delivery and management service. Plug.dj, an interactive online social music streaming website. ThoughtWorks, some tools and applications around continuous delivery and instant messages (CoyIM). AeroFS, private cloud filesync appliance provider which migrated some microservices from Java to Go with major memory footprint improvements Uber, for handling high volumes of geofence-based queries.

GO HLS STREAMING

IMPLEMENT HLS WITH GO

GO HLS STREAMING

IMPLEMENT HLS WITH GO

GO HLS STREAMING

IMPLEMENT HLS WITH GO 1. main function

2. naming package & import modules

3. define url routing

GO HLS STREAMING

IMPLEMENT HLS WITH GO 4. implement core handler

GO HLS STREAMING

IMPLEMENT HLS WITH GO 5. implement core handler

6. serve HLS index file(.m3u8) with “application/x-mpegURL”

7. serve HLS segment file(.ts) with “video/MP2T”

GO HLS STREAMING

DEMO