Skip to content

Instantly share code, notes, and snippets.

@HedioKojima
HedioKojima / thumbnailer.lua
Last active June 6, 2026 02:08
thumbnailer (screenshot-mosaic) by chatgpt
-- thumbnailer.lua
-- Windows版:生成 x*y 缩略图,左上角写入视频信息
-- 输出到 ~~/screenshots/ (通常就是 portable_config 下对应目录)
-- input.conf可以Ctrl+Shift+s script-binding thumbnailer/generate_thumbnails
-- 依赖:ffmpeg
local mp = require("mp")
local utils = require("mp.utils")
local msg = require("mp.msg")
@HedioKojima
HedioKojima / webdav.lua osd版
Last active July 2, 2026 02:57
mpv WebDAV lua 由Qwen3.7-Max编写的osd版 功能灵感来自https://github.com/Ladersbt/mpv-config/blob/master/scripts/uosc_webdav.lua 🖖
local mp = require('mp')
local msg = require('mp.msg')
local options = require('mp.options')
local utils = require('mp.utils')
local commandv = mp.commandv
local command_native_async = mp.command_native_async
local set_property = mp.set_property
local get_property = mp.get_property
local osd_message = mp.osd_message
import vapoursynth as vs
core = vs.core
clip = video_in
vfps = int(container_fps*1e8)
dfps = 60000
#dfps = 0
def ffps(fps):
rfps = int('%.0f' % fps)
if ( abs(fps - (rfps/1.001)) < abs(fps - (rfps/1.000)) ):