Put all of these files (not this readme) into your mpv's scripts
directory, then open a video and press alt+a
.
This file contains 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
--[[ | |
Simple script to fix sub-delay on offset subs | |
First, framestep to where the desired subtitle (sign) SHOULD start, press ALT+Z | |
Next, framestep to where the desired subtitle (sign) DOES start, press ALT+Z | |
Done. | |
You may press ALT+Z twice in succession to zero out sub-delay. | |
]]-- |
This file contains 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 assdraw = require 'mp.assdraw' | |
local msg = require 'mp.msg' | |
local opt = require 'mp.options' | |
local utils = require 'mp.utils' | |
--[[ | |
Simple script to expose a command to write a line to a file. | |
Example bind: | |
v script-message write-to-file "/tmp/some_file" "Now playing: ${path} at ${playback-position}" | |
]]-- |
This file contains 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
--[[ | |
Simple script to display the end-time for the current file. | |
Example input.conf bind: | |
E script-message display-eta | |
]]-- | |
local utils = require("mp.utils") | |
local SCRIPT_COMMAND_NAME = 'display-eta' | |
function display_eta() |
This file contains 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
--[[ | |
mpv_geometry_freezer.lua | |
Sets the geometry property when window size changes, | |
avoiding Windows' maximized windows detaching. | |
- AMM | |
]]-- | |
local msg = require 'mp.msg' | |
local UPDATE_INTERVAL = 0.5 | |
local screen_w, screen_h = mp.get_osd_size() |
This file contains 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
// ==UserScript== | |
// @name Discord Embed grid | |
// @namespace https://gist.github.com/TheAMM/147be5001e43b7d8c60151716bbef703 | |
// @version 0.5.4 | |
// @description Adjust message embed CSS to display them as packed rows | |
// @author AMM | |
// @match https://discord.com/* | |
// @downloadURL https://gist.github.com/TheAMM/147be5001e43b7d8c60151716bbef703/raw/discord_embed_grid.user.js | |
// @grant none | |
// @run-at document-end |
This file contains 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
def dump_hex(binary, width=16, group_width=8, address_offset=0, print_func=print): | |
groups_size = int(width / group_width + 0.5) | |
if isinstance(binary, (bytes, bytearray, memoryview)): | |
binary_iterator = (binary[i:i+width] for i in range(0, len(binary), width)) | |
else: | |
# Assume iterator, receive arbitrary-sized byte chunks and reassemble them | |
def _iter_wrapper(): | |
extra = b'' | |
for chunk in binary: |
This file contains 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
// ==UserScript== | |
// @name Twitter Media Source | |
// @namespace https://gist.github.com/TheAMM | |
// @downloadURL https://gist.github.com/TheAMM/de48c152076fec4c0ba530ad09081f40/raw/twitter_media_source.user.js | |
// @updateURL https://gist.github.com/TheAMM/de48c152076fec4c0ba530ad09081f40/raw/twitter_media_source.user.js | |
// @version 2.1.5 | |
// @description Allows copying direct full-size image/video links on Twitter (with a #tweetid source suffix), downloading media, and navigating back to a Tweet from a media URL. | |
// @author AMM | |
// @match https://twitter.com/* | |
// @match https://x.com/* |
This file contains 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 utils = require 'mp.utils' | |
local msg = require 'mp.msg' | |
--[[ | |
Simple script to dump all available properties, optionally to a file. | |
Open console and type: | |
script-message dump-properties | |
Append a filename to write to: | |
script-message dump-properties props.txt |