building an open source based audio streaming platform
play

Building an Open-Source based audio streaming platform Maxime - PowerPoint PPT Presentation

Building an Open-Source based audio streaming platform Maxime Bugeia 2 February 2020 We stream audio! 2 French public broadcasting service 6 national channels 47 local channels 23 music webradios 2 Million listeners per day 200k


  1. Building an Open-Source based audio streaming platform Maxime Bugeia 2 February 2020

  2. We stream audio! 2

  3. French public broadcasting service 6 national channels 47 local channels 23 music webradios 2 Million listeners per day 200k simultaneous listeners 3

  4. Before Black Box Icecast 3rd party 4

  5. After Icecast HLS Our own cloud and open source based infrastructure 5

  6. Audio streaming HLS ICECAST Segmented audio/video files Streaming server Sliding Playlist (m3u8) Master/Relay Architecture Adaptive bitrate Single bitrate Better mobile experience No cache Cacheable content Long persistent TCP Just “static” files connections 6

  7. Audio to listeners Getting audio to the cloud 7

  8. Audio to listeners Getting Icecast HLS audio to the cloud Producing stream formats 8

  9. Audio to listeners Deliver content to listeners CDN Getting Icecast HLS audio to the cloud Producing stream formats 9

  10. Audio to listeners Deliver content to listeners CDN Getting Icecast HLS audio to the cloud Producing stream formats Operate the platform 10

  11. Getting audio to the cloud! 11

  12. Transport: multicast problem NATIONAL CHANNELS LOCAL CHANNELS DIRECT CONNECT WAN MULTICAST WEBRADIOS 12

  13. Transport: multicast problem NATIONAL CHANNELS ? LOCAL CHANNELS DIRECT CONNECT WAN MULTICAST WEBRADIOS 13

  14. Transport: multicast problem NATIONAL CHANNELS ? LOCAL CHANNELS DIRECT CONNECT WAN MULTICAST WEBRADIOS No multicast in AWS! 14

  15. Transport: SRT to the rescue 15

  16. Transport: to the cloud! NATIONAL CHANNELS LOCAL CHANNELS DIRECT CONNECT WAN MULTICAST WEBRADIOS 16

  17. Transport: resiliency b a c k u p s a t m a i n SRT CALLER 1 SRT LISTENER 1 backup m a i n SRT CALLER 2 SRT LISTENER 2 backup b a c k u p s a t 5 inputs per channel 17

  18. Audio to cloud SAT BACKUP DIRECT CONNECT 18

  19. Producing stream formats! 19

  20. One program to rule them all Liquidsoap Open Source Audio & Video Streaming Language Collaboration with Radio France Receive Transcode Control Output AAC SRT listener Switch between sources Output MP3 Fallback logic Produce HLS Expose metrics Produce Icecast 20

  21. Producing the streams SAT BACKUP Icecast Transcoder Liquidsoap HLS DIRECT CONNECT 21

  22. Transcoder Architecture Icecast stream Icecast Icecast stream Liquidsoap Master Nginx HLS files HLS stream 22

  23. Radio as Code Define inputs 23

  24. Radio as Code Live: what we want to play 24

  25. Radio as Code Fallback logic 25

  26. Radio as Code Fallback logic Never fail! 26

  27. Radio as Code Output HLS Source that never fails 27

  28. Radio as Code Output HLS 28

  29. Radio as Code Output HLS 29

  30. Radio as Code Output Icecast Source that never fails 30

  31. Transcoders Architecture Icecast stream Icecast Icecast stream Liquidsoap Master HLS files live.m3u8 Nginx HLS stream live_hifi.m3u8 segment1.ts segmentxxx.ts 31

  32. Scaling to 200k listeners! 32

  33. Scale: Icecast Icecast Master Icecast Relay Icecast Relay 1 HTTP :80 HTTPS :443 Transcoder 1 https://icecast.radiofrance.fr/fip-hifi.aac Icecast Relay 2 Transcoder 2 AWS NLB Icecast Relay X 33

  34. Scale: Icecast Icecast Master Icecast Relay Icecast Relay 1 HTTP :80 HTTPS :443 Transcoder 1 https://icecast.radiofrance.fr/fip-hifi.aac Icecast Relay 2 No cache Transcoder 2 No autoscaling AWS NLB Icecast Relay automatic fallback Icecast Relay X 34

  35. Scale: HLS HLS base stream Cache layer CDN Varnish 1 Playlists Transcoder 1 https://stream.radiofrance.fr/fip/fip.m3u8 https://stream.radiofrance.fr/fip/fip_hifi.m3u8 fip_aac_hifi_2_301960_1579533023.ts Varnish 2 Segments Transcoder 2 AWS NLB Varnish X 35

  36. Scale: HLS HLS base stream Cache layer CDN Varnish 1 Playlists Transcoder 1 https://stream.radiofrance.fr/fip/fip.m3u8 https://stream.radiofrance.fr/fip/fip_hifi.m3u8 fip_aac_hifi_2_301960_1579533023.ts Varnish 2 Segments Transcoder 2 AWS NLB Autoscaling at cache layer CDN level fallback possible Varnish X 36

  37. Scale: HLS HLS base stream Cache layer CDN Varnish 1 Playlists Transcoder 1 https://stream.radiofrance.fr/fip/fip.m3u8 https://stream.radiofrance.fr/fip/fip_hifi.m3u8 fip_aac_hifi_2_301960_1579533023.ts Varnish 2 Segments Transcoder 2 AWS NLB Just like web! Varnish X 37

  38. Operate 38

  39. Transcoder Architecture Icecast stream Icecast Icecast stream Liquidsoap Master Nginx HLS stream HLS files 39

  40. Transcoder Architecture Icecast stream Icecast Icecast stream Liquidsoap Master Liquidsoap xxxx Liquidsoap xxxx Liquidsoap xxxx Liquidsoap xxxx Liquidsoap xxxx Liquidsoap xxxx Nginx HLS stream HLS files One Liquidsoap per channel 40

  41. Automate Declarative everything Generating: ● SRT callers ● Liquidsoap scripts ● Icecast master & relay conf 41

  42. Monitor Export metrics Visualize Collect Node Exporter Liquidsoap Icecast exporter 42

  43. Monitor 43

  44. Monitor: real time listeners HLS HLS access logs Custom logs Ingester HTTP POST Json Icecast Icecast prometheus Exporter 44

  45. Monitor 45

  46. Learn more https://github.com/mbugeia/srt2hls Receive SRT stream Produce HLS Prometheus Metrics HTTP API Command and fallback logic https://github.com/Haivision/srt https://www.liquidsoap.info/ 46

  47. Learn more Special thanks to the Liquidsoap team! https://www.liquidsoap.info/ 47

  48. Questions? For internal use only / prepared with love

  49. For internal use only / prepared with love

  50. HLS / DASH Compatibility 50

  51. mp3 / aac Compatibility 51

  52. ogg / flac Compatibility 52

  53. Real HLS diffusion Cluster Kubernetes Segment .ts Storekeeper Bus RabbitMQ N Transcoders Segment L Playlists Forwarder B .m3u8 Segments HLS HTTP POST PGM PostgreSQL Player 53

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend