/**
* ExportPresets Component
*
* Компонент для выбора пресетов экспорта видео.
* Предоставляет готовые настройки для популярных платформ и форматов.
*/
import { Cpu, FileVideo, Film, HardDrive, Play, Settings2 } from "lucide-react"
import React from "react"
import { cn } from "@/lib/utils"
// Иконка TikTok
const TikTokIcon = () => (
)
// Иконка Vimeo
const VimeoIcon = () => (
)
export interface ExportPreset {
id: string
name: string
icon: React.ReactNode
description: string
settings: {
format: "mp4" | "mov" | "webm" | "quicktime"
codec: "h264" | "h265" | "prores" | "vp8" | "vp9"
codecProfile?: "main" | "main10" | "high"
resolution: "720" | "1080" | "1440" | "2160" | "timeline"
fps: "24" | "25" | "30" | "60" | "timeline"
bitrate?: number
bitrateMode?: "auto" | "cbr" | "vbr"
useVerticalResolution?: boolean
normalizeAudio?: boolean
audioTarget?: number // LKFS
uploadDirectly?: boolean
optimizeForSpeed?: boolean
useHardwareAcceleration?: boolean
}
}
const EXPORT_PRESETS: ExportPreset[] = [
{
id: "custom",
name: "Custom Export",
icon: ,
description: "Настройте параметры экспорта вручную",
settings: {
format: "mp4",
codec: "h264",
resolution: "timeline",
fps: "timeline",
},
},
{
id: "h264-master",
name: "H.264 Master",
icon: ,
description: "Высокое качество H.264 для архива",
settings: {
format: "mp4",
codec: "h264",
codecProfile: "high",
resolution: "timeline",
fps: "timeline",
bitrateMode: "cbr",
bitrate: 80000,
useHardwareAcceleration: true,
},
},
{
id: "hyperdeck",
name: "HyperDeck",
icon: ,
description: "Формат для Blackmagic HyperDeck",
settings: {
format: "mov",
codec: "h264",
codecProfile: "main",
resolution: "timeline",
fps: "timeline",
bitrateMode: "cbr",
bitrate: 50000,
},
},
{
id: "h265-master",
name: "H.265 Master",
icon: ,
description: "Высокое качество H.265/HEVC",
settings: {
format: "mp4",
codec: "h265",
codecProfile: "main10",
resolution: "timeline",
fps: "timeline",
bitrateMode: "vbr",
bitrate: 60000,
optimizeForSpeed: true,
useHardwareAcceleration: true,
},
},
{
id: "prores",
name: "ProRes 422 HQ",
icon: ,
description: "Apple ProRes для профессионального монтажа",
settings: {
format: "quicktime",
codec: "prores",
resolution: "timeline",
fps: "timeline",
},
},
{
id: "youtube",
name: "YouTube 1080p",
icon: ,
description: "Оптимизировано для YouTube",
settings: {
format: "mp4",
codec: "h264",
codecProfile: "high",
resolution: "1080",
fps: "timeline",
bitrateMode: "vbr",
bitrate: 12000,
normalizeAudio: true,
audioTarget: -14, // YouTube рекомендует -14 LKFS
uploadDirectly: true,
},
},
{
id: "vimeo",
name: "Vimeo 1080p",
icon: ,
description: "Высокое качество для Vimeo",
settings: {
format: "mp4",
codec: "h264",
codecProfile: "high",
resolution: "1080",
fps: "timeline",
bitrateMode: "vbr",
bitrate: 20000,
useHardwareAcceleration: true,
},
},
{
id: "tiktok",
name: "TikTok 1080p",
icon: ,
description: "Вертикальное видео для TikTok",
settings: {
format: "mp4",
codec: "h264",
codecProfile: "main",
resolution: "1080",
fps: "30",
bitrateMode: "auto",
useVerticalResolution: true,
uploadDirectly: true,
},
},
]
interface ExportPresetsProps {
selectedPresetId: string
onSelectPreset: (preset: ExportPreset) => void
className?: string
}
export function ExportPresets({ selectedPresetId, onSelectPreset, className }: ExportPresetsProps) {
return (
{EXPORT_PRESETS.map((preset) => (
))}
)
}
// Экспортируем пресеты для использования в других компонентах
export { EXPORT_PRESETS }