Skip to content

Instantly share code, notes, and snippets.

local on = false
function slideshow_handler()
if on == false then
mp.osd_message("Starting slideshow")
on = true
mp.command("playlist_next")
if sl_timer then
sl_timer:resume()
-- Simple hook that converts .bpg files as you open them with mpv
-- libbpg needs to be installed on your system
-- You can specify the output format (.ppm or .png) but conversion
-- to .png is slower. You can also increase the bit depth for .png
-- by passing "-b 16" and it supports transparency.
-- It seems animated files are not yet supported by bpgdec.
local msg = require 'mp.msg'