Skip to content

Instantly share code, notes, and snippets.

@miku1958
miku1958 / ffmpeg.sh
Created March 5, 2026 13:19
ffmpeg.sh
#!/bin/zsh
main() {
local file="$1"
local filename="${file:t}"
local filestem="${file:t:r}"
local filedir="${file:h}"
local safe_name="${filename//\"/\\\"}"
# ───── probe video info ─────────────────────
@miku1958
miku1958 / ffmpeg.bat
Last active March 7, 2026 02:36
ffmpeg.bat
@echo off
chcp 65001 > nul
title Video Transcode Tool
cd /D "%~dp0"
for %%F in (%*) do call :main "%%~F"
pause
goto :eof
:main
setlocal EnableDelayedExpansion
# A shell function that mimics the defaults command using /usr/libexec/PlistBuddy
function defaults2() {
# Check the number of arguments
# If the number of arguments is less then 2, fallback to defaults command
if [ $# -lt 2 ]; then
/usr/bin/defaults "$@"
return $?
fi
@miku1958
miku1958 / MAA-auto-plans.json
Last active September 23, 2023 02:08
MAA-auto-plans
{
"plans":[
{
"rooms":{
"trading":[
{
"product":"LMD",
"operators":[
"巫恋",
"龙舌兰",