All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 5m13s
新增 tools/asset-pipeline/ 用于把 public/portraits & videos 压缩成桶友好体积: - sharp: PNG → WebP q82, 最大宽 1600 (-view 三视图 2400) - ffmpeg: MP4 → libx264 CRF 28, 最大宽 1920, AAC 96k, faststart - pack.mjs: tar -czf 整目录 → cyber-star-assets.tar.gz 效果 (146 portraits + 33 videos): - 立绘: 768.6MB → 26.8MB (-96%) - 视频: 251.7MB → 76.1MB (-70%) - 总计: 1020MB → 103MB 压缩到 1/10, 95s 跑完 输出位于仓库外 ../assets-compressed/ 与 ../cyber-star-assets.tar.gz, 不入 git。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
415 B
JSON
17 lines
415 B
JSON
{
|
|
"name": "cyber-star-asset-pipeline",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Compress portraits (PNG -> WebP) and videos (mp4 re-encode) before uploading to TOS bucket.",
|
|
"scripts": {
|
|
"compress": "node compress.mjs",
|
|
"pack": "node pack.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
"p-limit": "^6.2.0",
|
|
"sharp": "^0.34.2"
|
|
}
|
|
}
|