Skip to content

JSON STREAMS format

Michaël Arnauts edited this page Jun 6, 2020 · 19 revisions

The JSON-STREAMS format is an alternative format for the M3U8 format (as used by Kodi's PVR IPTV Simple add-on) to list TV and Radio channels with all required metadata in JSON format.

JSON-STREAMS format

This is a draft for version 1 of the standard.

The JSON structure for the playlist is a list of dictionaries, with each dictionary consisting of the following information.

Attributes

Attribute Required Description
name Yes The display name of the channel.
stream Yes The plugin://-endpoint to call to play the live stream.
id No A unique id that maps to a key in the JSON-EPG.
logo No The logo for the channel.
preset No The channel's preferred number.
group No The group name. Defaults to the name of the Add-on.
radio No Defines if this is a Radio channel. Defaults to false
vod No The plugin://-endpoint with a {date} placeholder to play a video on demand stream by air date.

More information

  • stream
    This is the endpoint that will be called when the channel should play. If no live channel is available, an appropriate error should be shown instead.
    Example: plugin://plugin.video.example/play/id/vualto_een_geo

  • logo
    This can be an URL to an online image, or a special://-URI for a logo embedded in the Add-on itself.
    Example: special://home/addons/plugin.video.example/resources/logos/radio1.png

  • vod
    This is the endpoint that will be called when video on demand content is requested from the EPG. The endpoint should contain a {date} placeholder that will be filled in with the starting time of the program in the YYYY-MM-DDTHH:MM:SS format. It's the responsibility of the Add-on to lookup the right program and start playback.
    Example: plugin://plugin.video.example/play/bbc1/airdate/{date}

Example

{
  "version": 1,
  "streams": [
    {
      "id": "een.be",
      "name": "Eén",
      "stream": "plugin://plugin.video.example/play/id/vualto_een_geo",
      "logo": "https://example.com/logo/een.png",
      "group": "VRT TV",
      "radio": false,
      "vod": "plugin://plugin.video.example/play/eenbe/airdate/{date}"
    },
    {
      "id": "radio1.be",
      "name": "Radio 1",
      "stream": "http://icecast.vrtcdn.be/radio1-high.mp3",
      "logo": "special://home/addons/plugin.video.example/resources/logos/radio1.png",
      "group": "VRT Radio",
      "radio": true
    }
  ]
}
Clone this wiki locally