札记 RSS feed
-
-
Mac 定时开机
查看计划
pmset -g sched设置每天下午18时开机
sudo pmset repeat poweron MTWRFSU 18:00:00取消所有计划
sudo pmset repeat cancel -
adb 电池
Terminal window adb shell dumpsys batteryTerminal window adb -s 192.168.2.122:33873 shell dumpsys battery -
目录下mp4,提高15分贝
find . -maxdepth 1 -type f -name "*.mp4" ! -name "*_up.mp4" ! -name "._*" | while read -r file; doffmpeg -nostdin -i "$file" -filter:a "volume=15dB" -c:v copy "${file%.*}_up.mp4"done -
竖屏视频复制变横屏
Terminal window ffmpeg -i input.mp4 -filter_complex "[0:v][0:v][0:v]hstack=3" output_final.mp4 -
Windows 激活
Terminal window irm https://massgrave.dev/get | iexWindows11 家庭版升级专业版
J8WVF-9X3GM-4WVYC-VDHQG-42CXT7Y64F-88DCY-Y6WTC-H33D2-64QHF -
video html hls
nginx
server {listen 35005;server_name _; # 或者你的域名或 IP# 设置根目录为 Windows 的视频文件夹root C:/Users/Administrator/Videos/s01e01;index index.html;# HLS 配置location /hls {types {application/vnd.apple.mpegurl m3u8;video/mp2t ts;}add_header Cache-Control no-cache;add_header Access-Control-Allow-Origin *;}}Windows文件夹大小
Terminal window $size = (Get-ChildItem -Path "s01e01" -Recurse -File | Measure-Object -Property Length -Sum).Sum;if ($size -gt 1GB) { "{0:N2} GB" -f ($size / 1GB) } elseif ($size -gt 1MB) { "{0:N2} MB" -f ($size / 1MB) } elseif ($size -gt 1KB) { "{0:N2} KB" -f ($size / 1KB) } else { "$size 字节" }ffmpeg
Terminal window ffmpeg -i Forged.In.Fire.S01e01.Japanese.Katana.1080P.Amzn.Web-Dl.Ddp2.0.H.264-Playweb.mkv -c:v copy -c:a copy -f hls -hls_time 10 -hls_list_size 0 -hls_segment_type mpegts -hls_segment_filename "s01e01/segment_%03d.ts" s01e01.m3u8html
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>HLS Video Player</title><!-- 引入 Tailwind CSS --><script src="https://cdn.tailwindcss.com"></script></head><body class="bg-gradient-to-br from-blue-900 to-indigo-800 text-white flex flex-col items-center justify-center min-h-screen"><!-- 标题 --><h1 class="text-3xl md:text-4xl font-bold mb-6 text-center text-gray-100">HLS Video Player</h1><!-- 视频播放器容器 --><div class="w-full max-w-4xl p-4"><video id="videoPlayer" class="w-full rounded-lg shadow-lg" controls><source src="/hls/output.m3u8" type="application/vnd.apple.mpegurl">Your browser does not support the video tag.</video></div><!-- Hls.js 脚本 --><script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script><script>if (Hls.isSupported()) {var video = document.getElementById('videoPlayer');var hls = new Hls();hls.loadSource('/hls/output.m3u8');hls.attachMedia(video);hls.on(Hls.Events.MANIFEST_PARSED, function() {video.play();});}</script></body></html> -
markdown 代码折叠
<details><summary>Title</summary>内容 ...</details> -
docker 坚果云
curl -u 邮箱:密码 -T ./3.txt https://dav.jianguoyun.com/dav/dockerscp /Users/macm4/Downloads/filebrowser_filebrowser_linux_amd64.tar.gz root@192.168.2.100:/root/docker
cd /root/docker
gzip -d filebrowser_filebrowser_linux_amd64.tar.gz
docker load -i filebrowser_filebrowser_linux_amd64.tar
curl -u username:password -o output_file https://dav.jianguoyun.com/dav/docker/
-
AI添加描述
python3 '/Users/macm4/code/Cloudflare-AI/为md添加描述.py'