Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Emit: Internet Broadcasting with HTTP Live Stre...

Emit: Internet Broadcasting with HTTP Live Streaming

Avatar for Ray Yamamoto Hilton

Ray Yamamoto Hilton

May 13, 2013
Tweet

More Decks by Ray Yamamoto Hilton

Other Decks in Technology

Transcript

  1. Community Radio • FM & AM well are established •

    DAB+ is rolling out, but only to ~30 metro • No sector-wide internet streaming solution - smaller stations are precluded • FM/AM/DAB need special hardware - Internet streaming available to any internet connected device Monday, 13 May 13
  2. Emit Media • We are @rayh and @jurgen • A

    startup with revenue! • Attempting to build a scalable broadcast platform for the internet • Born out of PBS, but now working with 3RRR, 3MBS, 2FBI, 4ZZZ and more • v1.0 has been running for a few years Monday, 13 May 13
  3. Problem • Traditional streaming is expensive and hard to scale

    (RTSP, etc) • We have no money, and neither do our clients - prefer upfront costs to ongoing • Continuous/Live broadcasts aren’t the norm for existing services • Many devices and codecs to support Monday, 13 May 13
  4. Approach • Pick one or two well supported codecs (mp3

    and AAC) • Pick one streaming tech (HLS) • Design for failure • Aim to scale out rather than up Monday, 13 May 13
  5. Stack • Ruby / Sinatra / Resque / Redis •

    RESTful APIs • Static HTML5/JS front-end(s) • S3 + CloudFront for distribution • ElasticSearch • MySQL (RDS) • EC2 Cluster (3 x c1.medium + others) Monday, 13 May 13
  6. How does it work • Segmenter takes audio stream and

    chops it into short (10-30s) segments • Segments are uploaded to your CDN • Playlist (m3u8) file generated with references to new segments • Client polls playlist file to check for new segments Monday, 13 May 13
  7. Great for iOS • Apple have requirements about how you

    stream content (prefer HLS, include audio-only 3G friendly bitrate) • AVPlayer et al support HLS out-of-the-box • Manifest file lists playlists for each bitrate and codec - client can choose to up/downgrade stream based on network conditions • Just HTTP, works well with proxies, firewalls, front-end caches, etc Monday, 13 May 13
  8. Other Benefits • Use S3 & CloudFront for all client

    interaction • Scaling costs are a function of broadcasters, not listeners • Fault tolerant - worst case, playlist doesn’t get updated, or segments are lost • Event streaming (rewindable live streams) • PVR-style, pause live streams Monday, 13 May 13
  9. Drawbacks • Not entirely live, lag-time is the segment size

    + processing overhead • Transcode to all desired bitrates ahead of time, even if they aren’t used • Transcoding segments to avoid lossy encoding ‘gaps’ is tricky • HA segmenter is problematic Monday, 13 May 13
  10. Future • Reporting, billing tools • Reusable html5 player for

    stations • Update PBS and Dial apps • Commercial possibilities • Big (Meta)data - Elasticsearch • Video Streaming • Raspberry Pi - Cheap, in-studio appliance Monday, 13 May 13
  11. Call for help • We need volunteers to help our

    effort (coding, design, promotion) • Anyone with deep ffmpeg, libfdk_aac, mpegts and adts knowledge? • Investment / Funding to grow the project and pursue commercial options Monday, 13 May 13