This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)) ): |