diff --git a/src/app/(dashboard)/tools/video-frames/layout.tsx b/src/app/(dashboard)/tools/video-frames/layout.tsx index 15eb4fb..2d69ced 100644 --- a/src/app/(dashboard)/tools/video-frames/layout.tsx +++ b/src/app/(dashboard)/tools/video-frames/layout.tsx @@ -7,13 +7,13 @@ export async function generateMetadata(): Promise { const lang = acceptLanguage.includes("zh") ? "zh" : "en"; const titles = { - en: "Video to Frames - Extract Frames from Videos", - zh: "视频抽帧 - 从视频中提取帧", + en: "Video to Frame Sequence - Extract Frame Sequences from Videos", + zh: "视频转序列帧 - 从视频中提取序列帧", }; const descriptions = { - en: "Extract frames from videos with customizable frame rates. Perfect for sprite animations and game asset preparation. Supports MP4, MOV, AVI, WebM.", - zh: "从视频中提取帧,可自定义帧率。非常适合精灵动画制作和游戏素材准备。支持 MP4、MOV、AVI、WebM。", + en: "Extract frame sequences from videos with customizable frame rates. Perfect for sprite animations and game asset preparation. Supports MP4, MOV, AVI, WebM.", + zh: "从视频中提取序列帧,可自定义帧率。非常适合精灵动画制作和游戏素材准备。支持 MP4、MOV、AVI、WebM。", }; return { diff --git a/src/app/(dashboard)/tools/video-frames/page.tsx b/src/app/(dashboard)/tools/video-frames/page.tsx index c937d9d..5b74d0d 100644 --- a/src/app/(dashboard)/tools/video-frames/page.tsx +++ b/src/app/(dashboard)/tools/video-frames/page.tsx @@ -61,7 +61,7 @@ export default function VideoToFramesPage() { // 设置相关状态 const [frameRate, setFrameRate] = useState(15); - const [format, setFormat] = useState<'image/png' | 'image/jpeg'>('image/png'); + const [format, setFormat] = useState<'image/png' | 'image/jpeg' | 'image/webp'>('image/png'); const [jpegQuality, setJpegQuality] = useState(0.92); // 提取状态 @@ -360,7 +360,7 @@ export default function VideoToFramesPage() { try { const zip = new JSZip(); - const ext = format === 'image/png' ? 'png' : 'jpg'; + const ext = format === 'image/png' ? 'png' : format === 'image/webp' ? 'webp' : 'jpg'; for (const frame of selectedFrames) { // 将 dataUrl 转为 Blob @@ -441,6 +441,14 @@ export default function VideoToFramesPage() { > JPG + {videoFile && (