Skip to content

JSON STREAMS format

Dag Wieers edited this page Feb 3, 2021 · 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. Defaults to the add-on logo.
preset No The channel's preferred number.
group No A (list of) group name(s). The name of the add-on is always added by IPTV Manager.
radio No Defines if this is a Radio channel. Defaults to false
kodiprops No A dictionary with { "key": "value" } pairs to define optional #KODIPROPs.

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

  • id
    This is only required when you also provide EPG data in the JSON-EPG structure. The EPG data will be linked to the channel with this id.

  • logo
    This is the logo that visualy identifies the channel. When not provided, the logo defaults to the logo of your add-on

    It can be one of the following:

    • a relative path within your add-on path
    • a special://-URI for a logo embedded in the add-on itself
    • a resource://-URI for a logo embedded in a Resource add-on
    • a URL to an online image (http:// or https://)
    • an absolute path to a file

    Example: special://home/addons/plugin.video.example/resources/logos/radio1.png

  • preset
    This is the desired preset for this channel. The preset of a channel is only relevant in a regional context and therefore not very useful.

  • group
    This is a list of group names this channel belongs to.

    IPTV Manager will always add the add-on name as a group name, so you do not have to do this yourself.

  • radio
    Set this to true in case this channel is a Radio channel. When not provided, the channel is a TV channel (and it will default to false).

  • kodiprops
    This can be used to define additional #KODIPROP-lines that will be included in the generated M3U8-playlist. They can be used to give additional information to Kodi on how to play these URIs.

    Example:

    {
      "inputstream": "inputstream.ffmpegdirect",
      "inputstream.ffmpegdirect.is_realtime_stream": "true"
    }

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"
    },
    {
      "id": "example.com",
      "name": "Example channel",
      "stream": "plugin://plugin.video.example/play/id/example",
      "logo": "https://example.com/logo/example.png",
      "kodiprops": {
        "inputstream": "inputstream.ffmpegdirect",
        "inputstream.ffmpegdirect.is_realtime_stream": "true"
      }
    },
    {
      "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
    }
  ]
}

Useful references

The following links may help you understand the original M3U8 format and the kodi adaptations: