moq-wg / catalog-format

A common catalog format for streaming formats operating over moq-transport
Other
5 stars 0 forks source link

Track types #51

Open kixelated opened 1 month ago

kixelated commented 1 month ago

In the current draft, there's one track type that spans both audio and video. However, some fields are valid for audio only, and some fields are valid for video only.

Could we make it more type safe and add a "type" field, where a value of "audio" or "video" adds their respective fields? Obviously we can add more types in the future, but I don't want a "width" on my audio track. This change would make the draft easier to implement in type-safe languages.

kixelated commented 1 month ago

Additionally, I think "catalog" should be a track type.

kixelated commented 1 month ago

I realize that a track could contain both audio and video, so maybe it could be a field instead of a kind.

For example:

{
  "name": "muxed",
  "container": "mp4",
  "video": {
    "codec": "av1",
    "width": 1980,
    "height": 1080
  },
  "audio": {
    "codec": "opus",
    "sampleRate": 44100,
  }
}