摘要: 將本機開發的 360° 全景影片播放器納入版控,同時把執行環境從 Windows 切換到 Synology NAS,改以 Docker 部署。 根本原因: 專案原本只在有 NVIDIA 顯卡的 Windows 機器上跑,config.json 寫死了 Windows 磁碟機路徑 W:/photo/Badminton,NAS 上無法直接啟動。 另外 DSM 內建的 ffmpeg 拿掉了 VAAPI 編碼器,裸跑只能走 libx264, Celeron J4025 雙核轉 4K 360 影片的速度無法接受。 影響: - 在 NAS 上 npm start 會因為找不到影片資料夾而列不出任何影片 - 即使把路徑改對,轉檔仍只能用 CPU,82 分鐘的 4K 360 影片要跑十幾小時 修法: - config.json 的 videoDir 改為 NAS 實際路徑 /volume1/photo/Badminton - docker-compose.yml 啟用 devices: /dev/dri,讓容器取得 Intel UHD 600 的 render node;容器內 Alpine 版 ffmpeg 保有完整 VAAPI 支援,啟動時 會自動偵測成 vaapi 模式,並保留 libx264 當備援 - .env(不進版控)提供 VIDEO_DIR / CACHE_DIR 等 NAS 路徑給 compose 使用 驗證: 容器啟動 log 顯示「轉檔引擎:VAAPI 硬體編碼(Intel/AMD,/dev/dri)」, /api/config 回傳 modes: ["vaapi","cpu"],/api/videos 正確辨識來源影片為 3840x1920 equirectangular。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
29 lines
647 B
JSON
29 lines
647 B
JSON
{
|
|
"permissions": {
|
|
"deny": [
|
|
"Bash(rm -rf *)",
|
|
"Bash(rm -fr *)",
|
|
"Bash(rm -r *)",
|
|
"Bash(rm -R *)",
|
|
"Bash(rm -f *)",
|
|
"Bash(sudo *)",
|
|
"Bash(dd *)",
|
|
"Bash(mkfs*)",
|
|
"Bash(diskutil erase*)",
|
|
"Bash(chmod 777 *)",
|
|
"Bash(chmod -R 777 *)",
|
|
"Bash(git reset --hard*)",
|
|
"Bash(git push --force*)",
|
|
"Bash(git push -f *)",
|
|
"Bash(git clean -f*)",
|
|
"Bash(git branch -D*)",
|
|
"Bash(shutdown*)",
|
|
"Bash(reboot*)",
|
|
"Bash(: >*)",
|
|
"Bash(truncate *)"
|
|
],
|
|
"defaultMode": "bypassPermissions"
|
|
},
|
|
"skipDangerousModePermissionPrompt": true
|
|
}
|