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

Leveraging Open Source to Create Virtual Live C...

Leveraging Open Source to Create Virtual Live Channels from On-Demand Video

Flávio Ribeiro

July 01, 2020
Tweet

More Decks by Flávio Ribeiro

Other Decks in Programming

Transcript

  1. WHY? • recycle on-demand catalog • possible new revenue streams

    • pop-up channels • personalized channels • cheap "rundown/playout" alternative • cheap (no encoding) streaming alternative
  2. Architecture AWS S3 Scheduler Playout MP4 MP4 MP4 Google Cloud

    Storage MP4 MP4 MP4 File Streamer https://github.com/nytimes/gcs-helper https://github.com/crunchyroll/evs-s3helper
  3. SCHEDULER $ http POST http://scheduler <<< ' { "title": "STAR

    TREK SEASON 01 EP 01", "airing_time_start": "2020-07-01T18:14:52Z", "renditions": [ { "label": "720p", "url": "http://gcs-helper:2000/proxy/STARTREK_S01E01_720p.mp4" }, { "label": "540p", "url": "http://gcs-helper:2000/proxy/STARTREK_S01E01_540p.mp4" }, { "label": "360p", "url": "http://gcs-helper:2000/proxy/STARTREK_S01E01_360p.mp4" }, ]
  4. PLAYOUT • fetch & display "rolling window" of scheduled content

    • format JSON payload expected by the NGINX VOD Module
  5. PLAYOUT $ http GET http://playout { "clipSegments": [305, 305], "durations":

    [3045000, 3049000], "clipTimes": [ 1593174206000, 1593618600000, ], "currentTime": 1593618583000, "discontinuity": true, "initialClipIndex": 890, "initialSegmentIndex": 84913, "playlistType": "live", "sequences": [ { "clips": [ {"path": "/proxy/STARTREK_S01E01_720p.mp4", "type": "source"}, {"path": "/proxy/STARTREK_S01E02_720p.mp4", "type": "source"} ], "language": "eng" }, { "clips": [ {"path": "/proxy/STARTREK_S01E01_640p.mp4", "type": "source"}, {"path": "/proxy/STARTREK_S01E02_640p.mp4", "type": "source"} ], "language": "eng" } ] }
  6. PLAYOUT $ http GET http://playout { "clipSegments": [305, 305], "durations":

    [3045000, 3049000], "clipTimes": [ 1593174206000, 1593618600000, ], "currentTime": 1593618583000, "discontinuity": true, "initialClipIndex": 890, "initialSegmentIndex": 84913, "playlistType": "live", "sequences": [ { "clips": [ {"path": "/proxy/STARTREK_S01E01_720p.mp4", "type": "source"}, {"path": "/proxy/STARTREK_S01E02_720p.mp4", "type": "source"} ], "language": "eng" }, { "clips": [ {"path": "/proxy/STARTREK_S01E01_640p.mp4", "type": "source"}, {"path": "/proxy/STARTREK_S01E02_640p.mp4", "type": "source"} ], "language": "eng" } ] } from scheduler airing time since epoch # of clips in the past (+1) # of segments in the past sum(clip durations) / segment length
  7. NGINX http { vod_mode mapped; vod_upstream_location /goofy-playout-map; vod_hls_segment_file_name_prefix "segment"; vod_segment_duration

    10000; vod_align_segments_to_key_frames on; vod_live_window_duration 60000; upstream goofy-playout { server playout:2828; } server { listen 80; server_name localhost; location /goofy-playout-map { rewrite ^/goofy-playout-map/h/(.*)$ /$2 break; proxy_pass http://goofy-playout; proxy_http_version 1.1; proxy_set_header Connection ""; } location /h { vod hls; add_header Access-Control-Allow-Headers '*'; add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS'; add_header Access-Control-Allow-Origin '*'; } }
  8. NGINX http { vod_mode mapped; vod_upstream_location /goofy-playout-map; vod_hls_segment_file_name_prefix "segment"; vod_segment_duration

    10000; vod_align_segments_to_key_frames on; vod_live_window_duration 60000; upstream goofy-playout { server playout:2828; } server { listen 80; server_name localhost; location /goofy-playout-map { rewrite ^/goofy-playout-map/h/(.*)$ /$2 break; proxy_pass http://goofy-playout; proxy_http_version 1.1; proxy_set_header Connection ""; } location /h { vod hls; add_header Access-Control-Allow-Headers '*'; add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS'; add_header Access-Control-Allow-Origin '*'; } } point vod module to the playout service Initiate vod module in mapped mode create a location for the hls delivery
  9. FUTURE • UI/CMS for linear "programming" • ads support (via

    scte-35 manifest decoration) • support for mixed "real" live and virtual live
  10. FUTURE • UI/CMS for linear "programming" • ads support (via

    scte-35 manifest decoration) • support for mixed "real" live and virtual live • support for personalized slots on the linear feed • DASH (variant bitrates on the VOD library)