On this page

← All documentation

The .pvplaylist file and its share code

The JSON schema of a shared playlist (pvng-playlist v1), the rates extension, limits, errors, and the one-line share code.

A .pvplaylist is a JSON file that names an ordered list of maps by their chart hash. The same content travels as a text share code. It holds identities only, no chart and no audio. Importing a playlist creates it, adds the maps you own and reports how many are missing; it never starts a play.

The file

The file is UTF-8 JSON. Keys are camelCase. Unknown top-level fields are ignored.

Field Type Rule
format string Exactly "pvng-playlist"
version integer 1. Zero or missing is invalid; above 1 is refused as newer
name string 1 to 64 characters, no control characters, no leading or trailing space
entries array The maps in playlist order. At most 200
extensions object, optional Optional data. At most 32 keys, each at most 64 characters

Each entry is a chart identity:

Field Type Rule
hash string The chart hash: 64 lowercase hexadecimal characters
title, artist, difficulty, creator string Each at most 256 characters, no control characters. They are fallbacks for display when the map is missing
keys integer 1 to 64

Maps are matched by hash. The other fields only name a map you do not have.

{
  "format": "pvng-playlist",
  "version": 1,
  "name": "Warm-up",
  "entries": [
    {
      "hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
      "title": "Example Song",
      "artist": "Example Artist",
      "difficulty": "Easy",
      "creator": "mapper",
      "keys": 4
    },
    {
      "hash": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
      "title": "Another Song",
      "artist": "Another Artist",
      "difficulty": "Hard",
      "creator": "mapper",
      "keys": 7
    }
  ],
  "extensions": {
    "rates": [1.0, 1.25]
  }
}

The rates extension

extensions.rates gives each map its playback rate. It is an array of numbers, one per entry, in order, each from 0.5 to 2. The game leaves it out when every map plays at 1. A reader that does not know the extension plays every map at 1. When the key is present and the array does not have exactly one valid rate per map, the whole file is invalid.

Limits

Limit Value
File 1 MiB, checked before parsing
Maps 200
Name 64 characters
Extensions 32, keys of at most 64 characters
Texts of an entry 256 characters
Share code 512 Ki characters (524288)

The catalogue accepts a .pvplaylist of at most 1 MiB, runs the same validation on the server, and lists it as a third kind next to mods and skins. See Catalogue.

The share code

A share code is the file as one line of text, for a message:

pvng-playlist-1:<base64url>.<crc32>
  • pvng-playlist-1: is the prefix; the 1 is the code version. A code of another version is refused by its prefix.
  • <base64url> is the file's bytes compressed with zstd (level 19), then encoded in base64url without padding.
  • <crc32> is the CRC-32 of the uncompressed file bytes, as 8 lowercase hexadecimal digits.

When a code is pasted, whitespace is ignored. A code longer than 524288 characters is refused before it is decoded. The decoded bytes then go through the same validation as a file.

Errors

For a file:

Message Cause
The playlist file is too large (N bytes, at most 1048576) Over 1 MiB
The file is not a playlist: <json error> Not JSON
The file is not a Prism playlist (format is not "pvng-playlist") Wrong format, or not an object
The playlist was made by a newer version of the game (format version N, this build reads up to 1) version above 1
Invalid playlist file: missing or invalid format version version absent or 0
Invalid playlist file: the playlist name needs 1 to 64 characters, without control characters or surrounding spaces Bad name
Invalid playlist file: a playlist holds at most 200 maps, this one has N Too many entries
Invalid playlist file: map K: <reason> Entry K (counted from 1) is invalid. The reason is the chart hash is not 64 lowercase hexadecimal digits, the chart title is too long or has control characters (or artist, difficulty, creator), or N keys is not a chart size
Invalid playlist file: too many extensions, or an extension with an invalid name More than 32 extensions, or a bad key
Invalid playlist file: the "rates" extension needs one rate between 0.5 and 2 for each of the N maps Bad rates

For a code:

Message Cause
This is not a Prism playlist code (it starts with "pvng-playlist-1:") Wrong prefix
The playlist code is too long (N characters, at most 524288) Too long
The playlist code is damaged: copy it again, whole Bad base64, bad zstd frame, or a CRC mismatch
The playlist is too large to share as a code Writing side: the code would exceed the limit

If a file or a code is valid, the game reports how many maps were added and how many are missing.

Pitfalls

  • A hash is the chart hash, not the note hash. A playlist from another player finds your map only if your copy has the same notes and timing.
  • Edit the JSON by hand only if you keep entries and rates the same length. The error names the count it wanted.
  • A playlist file you send by chat is easier as a code, but a very long playlist can exceed the code limit while its file still fits.
  • Marathons are another format: see The .pvmarathon file.

Source in the game repository: crates/core/src/playlist_share.rs,crates/core/src/playlist.rs,crates/core/src/chart_identity.rs,crates/core/src/rate.rs,services/api/src/catalog/playlist.rs