Jump between mpv playlist entries using your terminal. Use a fuzzy search to quickly find the entry you are looking for.
If you are watching IPTV, you can provide an EPG file in XMLTV format to see the title of the current TV program and the title and start time of the next one.
Tested only on Linux.
-
Works on Linux.
Other operating systems are untested.
-
Start your mpv instance with the
--input-ipc-serveroption, for example:mpv --input-ipc-server=/tmp/mpvsocket playlist.m3u8 -
Make sure that you have installed:
Copy the mpvpl script somewhere in your PATH.
To see the current playlist and switch playlist entries, run the following:
mpvpl
If you are watching IPTV, you can pass an EPG in XMLTV format to see the current and the next TV program:
The names of channels in your playlist and in an XMLTV file must match. Otherwise, TV programs will not be listed.
mpvpl https://example.com/xmltv.xml.gz
You can press Ctrl+R to reload a playlist and programs.
The provided URL will be cached and will be downloaded again only if it has changed on the server.
Internally, an xml.gz file will be converted to json.gz to make it possible to query
it using jq.
You can convert an XMLTV file with the `xml.gz` extension to `json.gz` using the following command:
gzip -cd xmltv.xml.gz | xq -c --xml-force-list display-name '(now | strflocaltime("%Y%m%d%H%M%S %z")) as $now | .tv.channel[],null,([.tv.programme[] | select(.["@stop"] >= $now)] | sort_by(.["@channel"], .["@stop"]) | .[])' - | gzip > xmltv.json.gz
The conversion can be time-consuming and memory hungry for large files.
You can provide a path to the local XMLTV file:
mpvpl /path/to/xmltv.xml.gz
# Path to a JSON file converted using the xq command above
mpvpl /path/to/xmltv.json.gz
demo.mp4
- Conversion from XML to JSON is needed to be able to query TV programs using
jq. It may take a lot of time depending on the EPG size, but it's done only once for each URL.

