From 4cdc9a4d8314d58aeba708de3592dc1d8647b664 Mon Sep 17 00:00:00 2001 From: Phil Cluff Date: Thu, 2 May 2019 15:46:28 +0100 Subject: [PATCH 1/4] More cleanup --- 0.2/sash-simple-template.json | 4 +- 0.2/sash-simple-timeline-with-disco.json | 4 +- 2019-notes.md | 14 +--- README.md | 96 ++++++++++++++++++------ 4 files changed, 80 insertions(+), 38 deletions(-) diff --git a/0.2/sash-simple-template.json b/0.2/sash-simple-template.json index e6bf6c9..f764bab 100644 --- a/0.2/sash-simple-template.json +++ b/0.2/sash-simple-template.json @@ -3,7 +3,7 @@ "presentation_duration": 300, "video" : [ { - "container" : "fmp4", + "mime_type" : "video/mp4", "segment_template" : { "duration": 1.960, "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", @@ -23,7 +23,7 @@ ], "audio": [ { - "container" : "fmp4", + "mime_type" : "video/mp4", "segment_template": { "duration": 1.996, "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", diff --git a/0.2/sash-simple-timeline-with-disco.json b/0.2/sash-simple-timeline-with-disco.json index 837c671..0da15d2 100644 --- a/0.2/sash-simple-timeline-with-disco.json +++ b/0.2/sash-simple-timeline-with-disco.json @@ -3,7 +3,7 @@ "presentation_duration": 300, "video" : [ { - "container" : "fmp4", + "mime_type" : "video/mp4", "segment_timeline" : { "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", "timeline" : [ @@ -29,7 +29,7 @@ ], "audio": [ { - "container" : "fmp4", + "mime_type" : "video/mp4", "segment_template": { "duration": 1.996, "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", diff --git a/2019-notes.md b/2019-notes.md index a7bf173..4a16583 100644 --- a/2019-notes.md +++ b/2019-notes.md @@ -8,14 +8,6 @@ I've also started putting together what I think the resulting manifests for thes We should be container and codec agnostic. SASH should be a solution for people delivering any media, in any container a user wants. We're opinionated about manifest formats and nothing else. -That said, I think being explicit about signalling codec and container is important. DASH's signalling of container is poor (communicated via MIME type), and currently we're using the same approach. I'd suggest we rename `mime_type` to `container`, and make it simple enum of: -* webm -* fmp4 -* cmaf -* ts - -FIXME: I just re-read the MSE specification, and actually, we should use MIME type because that's what you need to pass to `MediaSource.isTypeSupported` - TODO: Can/should you have mixed container adaptation sets or manifests? ## Ad insertion / Discos @@ -68,6 +60,8 @@ Some thought needs to be put into future extensibility if we do this, along with We could extend this further however to make each adaptation set a named key, but I think this takes it too far. +TODO: What should we do about muxed audio / video usecases? + ## "User Data" For the longest time when I've built systems, providing a specific space for vendor-specific data has been a life-saver. Usually we've implemented this as a list of key-value pairs that have no reserved function. @@ -97,9 +91,7 @@ Lots of people want segment lists or timelines, and I can understand why. Could I don't think we should use DASH terminology if there's better industry terminology. -Replacing `representation` with `rendition` is an obvious improvement in my book. I think removing adaptation_sets is easy if we [make the changes I suggested above](# Adaptation set grouping). - -Coming up with better/alternative name for segment_template / segment_timeline might be harder. +Consider coming up with better/alternative name for segment_template / segment_timeline. ## Progressive MP4/WebM etc. diff --git a/README.md b/README.md index 7acec1b..783376b 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,94 @@ -# SASH -## Simple Adaptive Streaming over HTTP +# SASH - Simple Adaptive Streaming over HTTP > The nice thing about standards is that you have so many to choose from. *— Andrew S. Tanenbaum* -### Overview +## Overview -SASH is a new standard for adaptive HTTP streaming. SASH is inspired by [MPEG DASH](TODO) and [Apple HLS](TODO), and is intended to complement them. Its aims are to provide a simpler, JSON based manifest format which learns from DASH and HLS's manifest design, but delivers something Javascript and Media Source Extension friendly. +SASH is a new standard for adaptive HTTP streaming. SASH is inspired by [MPEG DASH](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP) and [Apple HLS](https://en.wikipedia.org/wiki/HTTP_Live_Streaming), and is intended to complement them. -SASH is designed to be owned and developed by the community, and not be limited by patent pools or restrictions. +Its aims are to provide a simpler, JSON based manifest format which learns from DASH and HLS's manifest design, but delivers something Javascript and Media Source Extensions friendly. -### Design Goals +SASH is designed to be owned and developed by the community, and not be limited by patent pools or usage restrictions. + +## Design Goals 1. Be 100% JSON. -2. Designed for MSE and native clients. -3. Use the good parts of DASH and HLS. Skip the bad parts. -4. One way to do things. Follow the Python approach (There should be one -- and preferably only one --obvious way to do it.) rather than the Perl approach (TMTOWTDI). +2. Be friendly to both Media Source Extensions (MSE) and native clients. +3. Use the good concepts from DASH and HLS. Skip the bad parts. +4. Have one way to do things. 5. Eliminate ambiguity. All client behavior should be defined. Client implementations should never guess. 6. Usable and readable. Don't make developers think. 7. Be codec and container agnostic. -8. Be compatible with HLS and DASH media that you've already created. - -### Examples - -* [Muxed audio and video manifest for VOD](0.1/sash-mbr-muxed-video-audio.json) (Show muxed video and audio) -* [Separate audio and video](0.1/sash-mbr-video-single-audio.json) (A common real world scenario, compatible with ISO DASH Media) -* [Multi angle, MBR Video, Multi language MBR Audio for VOD](0.1/sash-mbr-video-mbr-audio-multi-language-audio.json) (Multi-language audio, multiple camera angles) -* [Audio, video, and subtitles](0.1/sash-mbr-video-single-audio-single-subtitle.json) (What about subtitles?) - -TODO: Live exmples! - -### How does SASH compare to HLS and DASH? +8. Be compatible with most HLS and DASH media that you've already created. + +## Examples + +Here's a simple SASH manifest, with 1 audio track and 1 video track, using fragmented MP4 segments. + +```json +{ + "sash_version" : 2, + "presentation_duration": 300, + "video" : [ + { + "mime_type" : "video/mp4", + "segment_template" : { + "duration": 1.960, + "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", + "media": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/segment$number$.m4f", + "start_number": 0, + "end_number" : 154 + }, + "renditions" : { + "video-540p-800k" : { + "bandwidth": 800000, + "codecs": "avc1.4d401e", + "height": 480, + "width": 852 + } + } + } + ], + "audio": [ + { + "mime_type" : "video/mp4", + "segment_template": { + "duration": 1.996, + "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", + "media": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/segment$number$.m4f", + "start_number": 0, + "end_number": 154 + }, + "renditions": { + "audio-64k" : { + "bandwidth": 64000, + "codecs": "mp4a.40.2" + } + } + } + ] +} + +``` + +Also see: +* [Separate audio and video](0.2/sash-mbr-video-single-audio.json) (A common real world scenario, compatible with ISO DASH Media) +* [A prototype implementation of a segment-timeline approach, featuring discontinuities](0.2/sash-simple-timeline-with-disco.json) + +## 2019 updates TODO list + +[I returned to this project after a break. The changes I want to make are documented here.](2019-notes.md) + +## How does SASH compare to HLS and DASH? [How does SASH compare to HLS and DASH?](comparison.md) -### Is a new standard the solution? +## Is a new standard the solution? Always. See also [https://xkcd.com/927](https://xkcd.com/927/) and the election of [Antipope Alexander V](http://en.wikipedia.org/wiki/Antipope_Alexander_V). -### Is this a Joke? +## Is this a Joke? No. From 9ea333d0d1191690736733ba7c74dfb84692913c Mon Sep 17 00:00:00 2001 From: Phil Cluff Date: Thu, 2 May 2019 15:49:22 +0100 Subject: [PATCH 2/4] bbb --- 0.2/sash-simple-template.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/0.2/sash-simple-template.json b/0.2/sash-simple-template.json index f764bab..8a6a2a7 100644 --- a/0.2/sash-simple-template.json +++ b/0.2/sash-simple-template.json @@ -6,8 +6,8 @@ "mime_type" : "video/mp4", "segment_template" : { "duration": 1.960, - "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", - "media": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/segment$number$.m4f", + "init": "http://example.com/big-buck-bunny/$rendition$/init.m4f", + "media": "http://example.com/big-buck-bunny/$rendition$/segment$number$.m4f", "start_number": 0, "end_number" : 154 }, @@ -26,8 +26,8 @@ "mime_type" : "video/mp4", "segment_template": { "duration": 1.996, - "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", - "media": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/segment$number$.m4f", + "init": "http://example.com/big-buck-bunny/$rendition$/init.m4f", + "media": "http://example.com/big-buck-bunny/$rendition$/segment$number$.m4f", "start_number": 0, "end_number": 154 }, From f7ef0c960a9bc48f60e8105bfbcbc785bf6d4d3f Mon Sep 17 00:00:00 2001 From: Phil Cluff Date: Thu, 2 May 2019 15:50:03 +0100 Subject: [PATCH 3/4] bbb --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 783376b..048d287 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ Here's a simple SASH manifest, with 1 audio track and 1 video track, using fragm "mime_type" : "video/mp4", "segment_template" : { "duration": 1.960, - "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", - "media": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/segment$number$.m4f", + "init": "http://example.com/big-buck-bunny/$rendition$/init.m4f", + "media": "http://example.com/big-buck-bunny/$rendition$/segment$number$.m4f", "start_number": 0, "end_number" : 154 }, @@ -54,8 +54,8 @@ Here's a simple SASH manifest, with 1 audio track and 1 video track, using fragm "mime_type" : "video/mp4", "segment_template": { "duration": 1.996, - "init": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/init.m4f", - "media": "http://example.com/ace6123d-021d-41e2-bc31-4a082df189f9/$rendition$/segment$number$.m4f", + "init": "http://example.com/big-buck-bunny/$rendition$/init.m4f", + "media": "http://example.com/big-buck-bunny/$rendition$/segment$number$.m4f", "start_number": 0, "end_number": 154 }, From 2e7b87b18b9e048cba1ee4a15aec57120f062209 Mon Sep 17 00:00:00 2001 From: Phil Cluff Date: Fri, 8 Nov 2019 11:26:42 +0900 Subject: [PATCH 4/4] Minor typo. Co-Authored-By: Simran --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 048d287..0de1873 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ SASH is a new standard for adaptive HTTP streaming. SASH is inspired by [MPEG DASH](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP) and [Apple HLS](https://en.wikipedia.org/wiki/HTTP_Live_Streaming), and is intended to complement them. -Its aims are to provide a simpler, JSON based manifest format which learns from DASH and HLS's manifest design, but delivers something Javascript and Media Source Extensions friendly. +Its aims are to provide a simpler, JSON based manifest format which learns from DASH and HLS's manifest design, but delivers something JavaScript and Media Source Extensions friendly. SASH is designed to be owned and developed by the community, and not be limited by patent pools or usage restrictions.