You can download Postman collection and environment here
For safety reasons computer actions route not included!
Default response:
{ "message": "success or error message" }
- MPV Status
- Playback controls
- Playlist
- Tracks
- Filebrowser
- Collection handling
- Computer actions
Methods: GET
Gets info about MPV. MPV remote plugin settings also included.
Methods: GET
Gets status of the player.
Query parameters:
exclude: You can provide properties to exclude as list.
- example value: exclude=playlist,track-list
Example response:
{
"pause": true,
"mute": false,
"filename": "Dorohedoro 02 - In the Bag - Eat Quietly During Meals - My Neighbor the Sorcerer.mkv",
"duration": 1422.061,
"position": 71.787,
"remaining": 1350.274,
"media-title": "Dorohedoro 02 - In the Bag | Eat Quietly During Meals | My Neighbor the Sorcerer",
"playlist": [
{
"index": 0,
"id": 1,
"filePath": "V:\\anime\\Vivy - Fluorite Eye's Song S01 1080p\\Vivy - Fluorite Eye's Song - E02.mkv",
"filename": "Vivy - Fluorite Eye's Song - E02.mkv"
},
{
"index": 1,
"id": 2,
"filePath": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)\\Dorohedoro 02 - In the Bag - Eat Quietly During Meals - My Neighbor the Sorcerer.mkv",
"current": true,
"filename": "Dorohedoro 02 - In the Bag - Eat Quietly During Meals - My Neighbor the Sorcerer.mkv"
}
],
"chapter": 0,
"chapter-list": [
{
"title": "Intro",
"time": 0
},
{
"title": "OP",
"time": 68.986
},
{
"title": "Part A",
"time": 159.034
},
{
"title": "Part B",
"time": 589.089
},
{
"title": "ED",
"time": 1316.023
},
{
"title": "Preview",
"time": 1406.03
}
],
"volume": 100,
"max-volume": 100,
"fullscreen": false,
"speed": 1,
"sub-delay": 0,
"sub-visibility": true,
"track-list": [
{
"index": 0,
"id": 1,
"type": "video",
"selected": true,
"codec": "hevc",
"demux-w": 1920,
"demux-h": 1080
},
{
"index": 1,
"id": 1,
"type": "audio",
"selected": true,
"codec": "opus",
"demux-channel-count": 2,
"demux-channels": "unknown2",
"demux-samplerate": 48000,
"lang": "jpn"
},
{
"index": 2,
"id": 2,
"type": "audio",
"selected": false,
"codec": "opus",
"demux-channel-count": 2,
"demux-channels": "unknown2",
"demux-samplerate": 48000,
"lang": "eng"
},
{
"index": 3,
"id": 1,
"type": "sub",
"selected": true,
"codec": "subrip",
"lang": "hun"
},
{
"index": 4,
"id": 2,
"type": "sub",
"selected": false,
"codec": "ass",
"lang": "eng"
},
{
"index": 5,
"id": 3,
"type": "sub",
"selected": false,
"codec": "ass",
"lang": "eng"
}
],
"audio-delay": 0,
"sub-font-size": 55,
"sub-ass-override": true,
"metadata": {}
}
Methods: POST
Cycles between play and pause
Methods: POST
Start playback
Methods: POST
Pause playback
Methods: POST
Stops the playback, also clears playlist
Alias for /playlist/prev
Alias for /playlist/next
Methods: POST
Toggles fullscreen mode
Methods: POST
Mutes volume
Methods: POST
Sets volume
Methods: POST
Seek
Request JSON:
{
"target": 10.0,
"flag": "absolute-percent" // if no flag provided defaults to relative
}
- relative (Default)
- absolute
Methods: GET, POST
Related MPV documentation: https://mpv.io/manual/master/#command-interface-[%3Coptions%3E]
Gets Playlist items.
Response JSON:
[
{
"index": 0,
"id": 1,
"filePath": "V:\\anime\\Vivy - Fluorite Eye's Song S01 1080p\\Vivy - Fluorite Eye's Song - E02.mkv",
"current": true,
"filename": "Vivy - Fluorite Eye's Song - E02.mkv"
},
{
"index": 1,
"id": 2,
"filePath": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)\\Dorohedoro 02 - In the Bag - Eat Quietly During Meals - My Neighbor the Sorcerer.mkv",
"filename": "Dorohedoro 02 - In the Bag - Eat Quietly During Meals - My Neighbor the Sorcerer.mkv"
}
]
Puts an item to playlist.
Request JSON:
{
"filename": "V:\\anime\\Vivy - Fluorite Eye's Song S01 1080p\\Vivy - Fluorite Eye's Song - E02.mkv",
"flag": "replace",
"seekTo": 60.0, // seekTo works only if flag is replace. Format seconds
"file-local-options": [
"http-header-fields": "'MyHeader: 1234', 'MyHeader2: 5678'"
]
}
flag possible values:
- replace
- append
- append-play (Default)
Methods: DELETE
Deletes a playlist item.
Methods: POST
Related MPV documentation: https://mpv.io/manual/master/#command-interface-playlist-move
Query parameters:
- fromIndex (REQUIRED): Moves this item.
- toIndex (REQUIRED): To this index.
Moves a playlist item (fromIndex), to desired destination (toIndex).
Methods: POST
Plays playlist item.
Note: index can be current too, whcih gonna reload the current entry.
Methods: POST
Playlist previous item on playlist
Methods: POST
Playlist next item on playlist
Methods: POST
Clears playlist.
Methods: POST
Shuffle the playlist.
Methods: GET
Gets all audio, video, subtitle tracks.
Example response:
[
{
"index": 0,
"id": 1,
"type": "video",
"selected": true,
"codec": "hevc",
"demux-w": 1920,
"demux-h": 1080
},
{
"index": 1,
"id": 1,
"type": "audio",
"selected": true,
"codec": "opus",
"demux-channel-count": 2,
"demux-channels": "unknown2",
"demux-samplerate": 48000,
"lang": "jpn"
},
{
"index": 2,
"id": 2,
"type": "audio",
"selected": false,
"codec": "opus",
"demux-channel-count": 2,
"demux-channels": "unknown2",
"demux-samplerate": 48000,
"lang": "eng"
},
{
"index": 3,
"id": 1,
"type": "sub",
"selected": true,
"codec": "subrip",
"lang": "hun"
},
{
"index": 4,
"id": 2,
"type": "sub",
"selected": false,
"codec": "ass",
"lang": "eng"
},
{
"index": 5,
"id": 3,
"type": "sub",
"selected": false,
"codec": "ass",
"lang": "eng"
}
]
Methods: POST
Loads desired audio track ID
Methods: POST
Cycles through audio tracks
Methods: POST
Adds an audio track
Request JSON:
{
"filename": "/home/usr/myaudio.mp3",
"flag": "select" // if no flag provided defaults to select
}
- select
- auto
- cached
Methods: POST
Sets audio delay to provided second, can be negative.
Methods: POST
Loads desired subtitle track ID
Methods: POST
Sets sub delay to provided value, can be negative number.
Methods: POST
Changes default behaviour of rendering ASS/SSA subtitles. MPV mostly renders ASS/SSA subtitles correctly, but if you need it, use it.
MPV related documentation: https://mpv.io/manual/master/#options-sub-ass-override
BE VERY CAREFUL SOME VALUES CAN BREAK PLAYBACK CHECK DOCUMENTATION ABOVE
Possible values:
- no
- yes
- force
- scale
- strip
Methods: POST
Toggles subtitle visibility
Methods: POST Sets subtitle visibility
Values can be:
- true
- false
Methods: POST
Add subtitle file.
Request JSON:
{
"filename": "/home/usr/mysub.srt",
"flag": "select" // if no flag provided defaults to select
}
- select
- auto
- cached
Basic filebrowser which only accepts paths which included at server configured variable mpvremote-filebrowserpaths
Methods: GET
Returns content of mpvremote-filebrowserpaths
option paths indexed.
Response JSON:
[
{
"index": 0,
"path": "/home/usr/media1"
},
{
"index": 1,
"path": "/home/usr/media2"
},
{
"index": 2,
"path": "/home/usr/media3"
}
]
Methods: POST
Browse a path or collection.
Request JSON:
"path": "/home/usr/media2"
// Or
"collection_id": 1
Methods: GET
Note: Only MPV supported fileformats will return. Supported file formats
Returns files with types:
{
"content": [
{
"priority": 1,
"type": "directory",
"name": "Feliratok",
"fullPath": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)\\Feliratok",
"lastModified": "2021-05-03T19:10:16.008Z"
},
{
"priority": 2,
"type": "video",
"name": "Dorohedoro 01 - Caiman.mkv",
"fullPath": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)\\Dorohedoro 01 - Caiman.mkv",
"lastModified": "2021-05-03T19:09:21.857Z",
"mediaStatus": {
// Media status appears only when localdb enabled!
"id": 2,
"directory": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)",
"file_name": "Dorohedoro 01 - Caiman.mkv",
"current_time": 1422.0545,
"finished": 1
}
},
{
"priority": 2,
"type": "video",
"name": "Dorohedoro 02 - In the Bag - Eat Quietly During Meals - My Neighbor the Sorcerer.mkv",
"fullPath": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)\\Dorohedoro 02 - In the Bag - Eat Quietly During Meals - My Neighbor the Sorcerer.mkv",
"lastModified": "2021-05-03T19:04:05.410Z",
"mediaStatus": {
"id": 1,
"directory": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)",
"file_name": "Dorohedoro 02 - In the Bag - Eat Quietly During Meals - My Neighbor the Sorcerer.mkv",
"current_time": 596.853,
"finished": 0
}
},
{
"priority": 2,
"type": "video",
"name": "Dorohedoro 03 - Night of the Dead ~ Duel! ~ In Front of the Main Department Store.mkv",
"fullPath": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)\\Dorohedoro 03 - Night of the Dead ~ Duel! ~ In Front of the Main Department Store.mkv",
"lastModified": "2021-05-03T19:04:26.434Z"
}
],
"dirname": "Dorohedoro S01+OVA (BD 1080p)",
"prevDir": "V:\\anime",
"cwd": "V:\\anime\\Dorohedoro S01+OVA (BD 1080p)"
}
Gets drives from server.
Only if mpvremote-unsafefilebrowsing=1
.
If unsafe filebrowsing is disabled returns an error.
Note for Linux users: snap, flatpak virtual drives will be excluded!
Response JSON:
// Windows Example
[
{
"path": "C"
},
{
"path": "D:"
}
]
// Unix systems
[
{
"path": "/"
},
{
"path": "/home"
}
]
Local collection handling. Collections only works if you have enabled mpvremote-uselocaldb
Collections entries only can be opened if mpvremote-filebrowserpaths
contains the required paths.
Methods: GET, POST
Get all collections
Response JSON:
Array of collection.
Creates a collection
type variable/enum created for future use:
- 1: Movies
- 2: TVShows
- 3: Music
Request JSON:
"name": "Anime",
"type": 1,
"paths": [
{
"path": "/home/usr/media1"
},
{
"path": "/home/usr/media2"
}
]
Methods: GET, PATCH, DELETE
Gets collection
Response JSON:
{
"id": 1,
"name": "Anime",
"type": 1,
"paths": [
{
"id": 1
"path": "/home/usr/media1"
},
{
"id": 2,
"path": "/home/usr/media2"
}
]
}
Updates collection.
Request JSON:
{
"name": "Anime ja nai",
"type": 2,
"paths": [
{
"path": "/home/usr/media3" // Adds new path
},
{
"id": 2,
"path": "/home/usr/media2_other" // Updates existing path
}
]
}
Deletes collection.
Methods: DELETE
Deletes a collection entry.
Adds collection entry to collection.
Methods: POST
Request JSON:
{
"collection_id": 1,
"path": "/home/usr/media4"
}
Methods: POST
action can be:
- shutdown
- reboot
- quit