Skip to content

Commit

Permalink
Merge pull request #7 from demuxed/cleanup
Browse files Browse the repository at this point in the history
Cleanup, examples, and much much more!
  • Loading branch information
philcluff authored Nov 8, 2019
2 parents c076378 + 2e7b87b commit 7efd808
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 42 deletions.
12 changes: 6 additions & 6 deletions 0.2/sash-simple-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"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",
"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
},
Expand All @@ -23,11 +23,11 @@
],
"audio": [
{
"container" : "fmp4",
"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
},
Expand Down
4 changes: 2 additions & 2 deletions 0.2/sash-simple-timeline-with-disco.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : [
Expand All @@ -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",
Expand Down
14 changes: 3 additions & 11 deletions 2019-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand Down
96 changes: 73 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/big-buck-bunny/$rendition$/init.m4f",
"media": "http://example.com/big-buck-bunny/$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/big-buck-bunny/$rendition$/init.m4f",
"media": "http://example.com/big-buck-bunny/$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.

0 comments on commit 7efd808

Please sign in to comment.