Skip to content

Playlist Format

RePod edited this page Jun 28, 2017 · 11 revisions

How to create a playlist:

  • Figure out what you want to make a playlist of.
  • Know a bit of web development (not required, but will really help)
  • Read the format template below.
  • Read the breakdown of the template further below.
  • Examine additional resources at the bottom.
  • Create your playlist.
  • Submit a pull request to get it added.

Generally acceptable playlists (bonus points if YouTube) are encouraged.

Custom user playlists without the repository are expected in the future.


{
    "info": {
        "name": "Playlist title",
        "start_epoch_gtm": 0,
        "end_epoch_gtm": 0,
        "service": "youtube"
    },
    "playlist": [
        {
            "name": "Video Title",
            "duration": 420,
            "qualities": [
                {"src": "dQw4w9WgXcQ"},
                {...}
            ]
        },
        {...}
    ]
}

The playlist has and requires two aptly named top-level sections: info and playlist.

In this example snippet, info.service is youtube so playlist[0].qualities[0].src is just the video ID (explained below).

Info section

Key Type Example Description
name string Top 10 Anime Battles The title of the playlist, or like a channel. Whatever! 1
start_epoch_gtm integer 1488329934 Epoch/UNIX time to sync the playlist and wrap to. 2
end_epoch_gtm integer 0 Same as above, but the intended end time. Currently unused.
service string youtube Indicates this playlist uses the YouTube HTML5 player. 3

1 Can be empty, "name": "".
2 Optional, otherwise it will sync to literally 0 (Thursday, 1 January 1970 00:00:00).
3 Optional, otherwise playlists will use the HTML5 player which accepts direct links to videos like .mp4.

name is the only one required, even if empty or 0. service must be set properly if using a service like YouTube.

Playlist section

Key Type Example Description
name string Number 10 The title of the item. 1
duration integer 420 Duration, in seconds, of the item. 2
qualities array [...] Contains the sources to load.
qualities{}[#] object {"src":"vid.mp4"} The source. 3

1 Can be empty, "name": "".
2 Required, used to determine loop and sync status. A wrong value will cause an incorrect sync and in some cases skip parts or all of an item.
3 Required. If info.service is youtube, the value is just the video ID: {"src": "dQw4w9WgXcQ"}

Additional resources

Clone this wiki locally