Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

feat(export): one bitrate field instead of three cards, and the resolution a fact, not a menu

Jareerafe8383cef9e
diff --git a/src/crates/concat/locales/ar.json b/src/crates/concat/locales/ar.json
index c0c804ff..ba8f385c 100644
--- a/src/crates/concat/locales/ar.json
+++ b/src/crates/concat/locales/ar.json
@@ -199,8 +199,6 @@
"export.format": "الصيغة",
"export.halfTheSize": "نصف الحجم",
"export.hardware": "عتاد",
- "export.higher": "أعلى",
- "export.lower": "أقل",
"export.mixingAudio": "جارٍ مزج الصوت",
"export.nameNeedsToBeAFileName": "يجب أن يكون الاسم اسم ملف: غير فارغ، ولا يحتوي أيًّا من / \\ : * ? \" < > |",
"export.notOnThisDevice": "غير متوفر على هذا الجهاز",
@@ -208,7 +206,6 @@
"export.nothingToExport": "لا شيء للتصدير",
"export.output": "الإخراج",
"export.playsEverywhere": "يعمل في كل مكان",
- "export.recommended": "موصى به",
"export.renderingVideo": "جارٍ تصيير الفيديو",
"export.replace": "استبدال",
"export.replaceFileMessage": "{0} موجود بالفعل. سيستبدله التصدير.",
@@ -217,7 +214,6 @@
"export.showInFolder": "إظهار في المجلد",
"export.smallest": "الأصغر",
"export.summary": "الملخّص",
- "export.targetBitrate": "معدّل البت المستهدف",
"export.tenBitColour": "لون 10 بت",
"export.timelineSize": "المخطط الزمني",
"export.toneMapped": "مُعيَّن الدرجات، يعمل في أي مكان",
diff --git a/src/crates/concat/locales/bn.json b/src/crates/concat/locales/bn.json
index 7cbd863f..93d95d1a 100644
--- a/src/crates/concat/locales/bn.json
+++ b/src/crates/concat/locales/bn.json
@@ -199,8 +199,6 @@
"export.format": "ফরম্যাট",
"export.halfTheSize": "অর্ধেক আকার",
"export.hardware": "হার্ডওয়্যার",
- "export.higher": "বেশি",
- "export.lower": "কম",
"export.mixingAudio": "অডিও মিক্স করা হচ্ছে",
"export.nameNeedsToBeAFileName": "নামটি একটি ফাইলের নাম হতে হবে: খালি নয়, এবং / \\ : * ? \" < > | এগুলো থাকবে না",
"export.notOnThisDevice": "এই ডিভাইসে নেই",
@@ -208,7 +206,6 @@
"export.nothingToExport": "এক্সপোর্ট করার মতো কিছু নেই",
"export.output": "আউটপুট",
"export.playsEverywhere": "সব জায়গায় চলে",
- "export.recommended": "প্রস্তাবিত",
"export.renderingVideo": "ভিডিও রেন্ডার হচ্ছে",
"export.replace": "প্রতিস্থাপন করুন",
"export.replaceFileMessage": "{0} ইতিমধ্যে বিদ্যমান। এক্সপোর্ট করলে এটি প্রতিস্থাপিত হবে।",
@@ -217,7 +214,6 @@
"export.showInFolder": "ফোল্ডারে দেখান",
"export.smallest": "সবচেয়ে ছোট",
"export.summary": "সারসংক্ষেপ",
- "export.targetBitrate": "টার্গেট বিটরেট",
"export.tenBitColour": "10-বিট রঙ",
"export.timelineSize": "টাইমলাইন",
"export.toneMapped": "টোন-ম্যাপড, সব জায়গায় চলে",
diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.json
index 071fa581..a592bac7 100644
--- a/src/crates/concat/locales/de.json
+++ b/src/crates/concat/locales/de.json
@@ -199,8 +199,6 @@
"export.format": "Format",
"export.halfTheSize": "Halb so groß",
"export.hardware": "Hardware",
- "export.higher": "Höher",
- "export.lower": "Niedriger",
"export.mixingAudio": "Ton wird gemischt",
"export.nameNeedsToBeAFileName": "Der Name muss ein Dateiname sein: nicht leer und ohne / \\ : * ? \" < > |",
"export.notOnThisDevice": "Nicht auf diesem Gerät",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Nichts zu exportieren",
"export.output": "Ausgabe",
"export.playsEverywhere": "Läuft überall",
- "export.recommended": "Empfohlen",
"export.renderingVideo": "Video wird gerendert",
"export.replace": "Ersetzen",
"export.replaceFileMessage": "{0} ist schon da. Der Export ersetzt sie.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Im Ordner zeigen",
"export.smallest": "Am kleinsten",
"export.summary": "Zusammenfassung",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "10-Bit-Farbe",
"export.timelineSize": "Zeitleiste",
"export.toneMapped": "Tonegemappt, läuft überall",
diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.json
index 4260a025..0bd529f2 100644
--- a/src/crates/concat/locales/en.json
+++ b/src/crates/concat/locales/en.json
@@ -199,8 +199,6 @@
"export.format": "Format",
"export.halfTheSize": "Half the size",
"export.hardware": "hardware",
- "export.higher": "Higher",
- "export.lower": "Lower",
"export.mixingAudio": "Mixing audio",
"export.nameNeedsToBeAFileName": "The name has to be a file name: not empty, and none of / \\ : * ? \" < > |",
"export.notOnThisDevice": "Not on this device",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Nothing to export",
"export.output": "Output",
"export.playsEverywhere": "Plays everywhere",
- "export.recommended": "Recommended",
"export.renderingVideo": "Rendering video",
"export.replace": "Replace",
"export.replaceFileMessage": "{0} is already there. Exporting replaces it.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Show in folder",
"export.smallest": "Smallest",
"export.summary": "Summary",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "10-bit colour",
"export.timelineSize": "Timeline",
"export.toneMapped": "Tone-mapped, plays anywhere",
diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.json
index 6d59bc51..e3009867 100644
--- a/src/crates/concat/locales/es.json
+++ b/src/crates/concat/locales/es.json
@@ -199,8 +199,6 @@
"export.format": "Formato",
"export.halfTheSize": "La mitad de tamaño",
"export.hardware": "hardware",
- "export.higher": "Más alta",
- "export.lower": "Más baja",
"export.mixingAudio": "Mezclando el audio",
"export.nameNeedsToBeAFileName": "El nombre tiene que ser un nombre de archivo: no vacío y sin / \\ : * ? \" < > |",
"export.notOnThisDevice": "No disponible en este dispositivo",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Nada que exportar",
"export.output": "Salida",
"export.playsEverywhere": "Se reproduce en todas partes",
- "export.recommended": "Recomendada",
"export.renderingVideo": "Renderizando el vídeo",
"export.replace": "Reemplazar",
"export.replaceFileMessage": "{0} ya existe. Exportar lo reemplaza.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Mostrar en la carpeta",
"export.smallest": "El más pequeño",
"export.summary": "Resumen",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "Color de 10 bits",
"export.timelineSize": "Línea de tiempo",
"export.toneMapped": "Convertido a SDR, se ve en todas partes",
diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.json
index fc1e71e7..c17e7726 100644
--- a/src/crates/concat/locales/fa.json
+++ b/src/crates/concat/locales/fa.json
@@ -199,8 +199,6 @@
"export.format": "فرمت",
"export.halfTheSize": "نصف اندازه",
"export.hardware": "سخت‌افزار",
- "export.higher": "بیشتر",
- "export.lower": "کمتر",
"export.mixingAudio": "در حال میکس کردن صدا",
"export.nameNeedsToBeAFileName": "نام باید نام یک فایل باشد: خالی نباشد و بدون / \\ : * ? \" < > |",
"export.notOnThisDevice": "در این دستگاه نیست",
@@ -208,7 +206,6 @@
"export.nothingToExport": "چیزی برای خروجی گرفتن وجود ندارد",
"export.output": "خروجی",
"export.playsEverywhere": "همه‌جا قابل پخش است",
- "export.recommended": "پیشنهادی",
"export.renderingVideo": "در حال رندر کردن ویدئو",
"export.replace": "جایگزینی",
"export.replaceFileMessage": "{0} از قبل وجود دارد. خروجی گرفتن آن را جایگزین می‌کند.",
@@ -217,7 +214,6 @@
"export.showInFolder": "نمایش در پوشه",
"export.smallest": "کوچک‌ترین",
"export.summary": "خلاصه",
- "export.targetBitrate": "نرخ بیت هدف",
"export.tenBitColour": "رنگ 10-bit",
"export.timelineSize": "خط زمان",
"export.toneMapped": "با Tone Mapping، همه‌جا پخش می‌شود",
diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.json
index 8f86bff3..34eaeead 100644
--- a/src/crates/concat/locales/fr.json
+++ b/src/crates/concat/locales/fr.json
@@ -199,8 +199,6 @@
"export.format": "Format",
"export.halfTheSize": "Deux fois plus petit",
"export.hardware": "matériel",
- "export.higher": "Plus élevé",
- "export.lower": "Plus faible",
"export.mixingAudio": "Mixage de l'audio",
"export.nameNeedsToBeAFileName": "Le nom doit être un nom de fichier : non vide et sans / \\ : * ? \" < > |",
"export.notOnThisDevice": "Pas sur cet appareil",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Rien à exporter",
"export.output": "Sortie",
"export.playsEverywhere": "Lisible partout",
- "export.recommended": "Recommandée",
"export.renderingVideo": "Rendu de la vidéo",
"export.replace": "Remplacer",
"export.replaceFileMessage": "{0} existe déjà. L’export le remplace.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Afficher dans le dossier",
"export.smallest": "Le plus petit",
"export.summary": "Résumé",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "Couleur 10 bits",
"export.timelineSize": "Timeline",
"export.toneMapped": "Ramené en SDR, lisible partout",
diff --git a/src/crates/concat/locales/he.json b/src/crates/concat/locales/he.json
index 2e84eb95..ac061e66 100644
--- a/src/crates/concat/locales/he.json
+++ b/src/crates/concat/locales/he.json
@@ -199,8 +199,6 @@
"export.format": "פורמט",
"export.halfTheSize": "חצי מהגודל",
"export.hardware": "חומרה",
- "export.higher": "גבוה יותר",
- "export.lower": "נמוך יותר",
"export.mixingAudio": "מערבב שמע",
"export.nameNeedsToBeAFileName": "השם חייב להיות שם קובץ: לא ריק, ובלי אף אחד מהתווים / \\ : * ? \" < > |",
"export.notOnThisDevice": "לא במכשיר הזה",
@@ -208,7 +206,6 @@
"export.nothingToExport": "אין מה לייצא",
"export.output": "פלט",
"export.playsEverywhere": "מתנגן בכל מקום",
- "export.recommended": "מומלץ",
"export.renderingVideo": "מרנדר וידאו",
"export.replace": "החלפה",
"export.replaceFileMessage": "{0} כבר קיים. הייצוא יחליף אותו.",
@@ -217,7 +214,6 @@
"export.showInFolder": "הצגה בתיקייה",
"export.smallest": "הקטן ביותר",
"export.summary": "סיכום",
- "export.targetBitrate": "קצב סיביות יעד",
"export.tenBitColour": "צבע 10 סיביות",
"export.timelineSize": "ציר זמן",
"export.toneMapped": "עם מיפוי טונים, מתנגן בכל מקום",
diff --git a/src/crates/concat/locales/hi.json b/src/crates/concat/locales/hi.json
index 75e0d3aa..eb3e85d8 100644
--- a/src/crates/concat/locales/hi.json
+++ b/src/crates/concat/locales/hi.json
@@ -199,8 +199,6 @@
"export.format": "फ़ॉर्मेट",
"export.halfTheSize": "आधा साइज़",
"export.hardware": "हार्डवेयर",
- "export.higher": "ज़्यादा",
- "export.lower": "कम",
"export.mixingAudio": "ऑडियो मिक्स हो रहा है",
"export.nameNeedsToBeAFileName": "नाम एक फ़ाइल नाम होना चाहिए: खाली नहीं, और इनमें से कोई चिह्न नहीं: / \\ : * ? \" < > |",
"export.notOnThisDevice": "इस डिवाइस पर उपलब्ध नहीं",
@@ -208,7 +206,6 @@
"export.nothingToExport": "एक्सपोर्ट करने के लिए कुछ नहीं",
"export.output": "आउटपुट",
"export.playsEverywhere": "हर जगह चलता है",
- "export.recommended": "सुझाया गया",
"export.renderingVideo": "वीडियो रेंडर हो रहा है",
"export.replace": "बदलें",
"export.replaceFileMessage": "{0} पहले से मौजूद है। एक्सपोर्ट करने पर यह बदल जाएगी।",
@@ -217,7 +214,6 @@
"export.showInFolder": "फ़ोल्डर में दिखाएं",
"export.smallest": "सबसे छोटा",
"export.summary": "सारांश",
- "export.targetBitrate": "लक्ष्य बिटरेट",
"export.tenBitColour": "10-बिट रंग",
"export.timelineSize": "टाइमलाइन",
"export.toneMapped": "टोन-मैप्ड, हर जगह चलता है",
diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.json
index 84c78b6b..7db1d197 100644
--- a/src/crates/concat/locales/hr.json
+++ b/src/crates/concat/locales/hr.json
@@ -199,8 +199,6 @@
"export.format": "Format",
"export.halfTheSize": "Upola manje",
"export.hardware": "hardver",
- "export.higher": "Viša",
- "export.lower": "Niža",
"export.mixingAudio": "Miksanje zvuka",
"export.nameNeedsToBeAFileName": "Naziv mora biti naziv datoteke: ne prazan i bez / \\ : * ? \" < > |",
"export.notOnThisDevice": "Nije na ovom uređaju",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Ništa za izvoz",
"export.output": "Izlaz",
"export.playsEverywhere": "Radi svugdje",
- "export.recommended": "Preporučeno",
"export.renderingVideo": "Renderiranje videa",
"export.replace": "Zamijeni",
"export.replaceFileMessage": "{0} već postoji. Izvoz će je zamijeniti.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Prikaži u mapi",
"export.smallest": "Najmanje",
"export.summary": "Sažetak",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "10-bitna boja",
"export.timelineSize": "Vremenska crta",
"export.toneMapped": "Mapirano u SDR, radi svugdje",
diff --git a/src/crates/concat/locales/id.json b/src/crates/concat/locales/id.json
index c16a1360..411293da 100644
--- a/src/crates/concat/locales/id.json
+++ b/src/crates/concat/locales/id.json
@@ -199,8 +199,6 @@
"export.format": "Format",
"export.halfTheSize": "Setengah ukuran",
"export.hardware": "perangkat keras",
- "export.higher": "Lebih tinggi",
- "export.lower": "Lebih rendah",
"export.mixingAudio": "Mencampur audio",
"export.nameNeedsToBeAFileName": "Nama harus berupa nama file: tidak kosong, dan tanpa / \\ : * ? \" < > |",
"export.notOnThisDevice": "Tidak tersedia di perangkat ini",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Tidak ada yang bisa diekspor",
"export.output": "Keluaran",
"export.playsEverywhere": "Dapat diputar di mana saja",
- "export.recommended": "Disarankan",
"export.renderingVideo": "Merender video",
"export.replace": "Ganti",
"export.replaceFileMessage": "{0} sudah ada. Mengekspor akan menggantinya.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Tampilkan di folder",
"export.smallest": "Terkecil",
"export.summary": "Ringkasan",
- "export.targetBitrate": "Laju bit target",
"export.tenBitColour": "Warna 10-bit",
"export.timelineSize": "Linimasa",
"export.toneMapped": "Dipetakan nada, dapat diputar di mana saja",
diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.json
index 1e4d6cbb..f1f213a3 100644
--- a/src/crates/concat/locales/it.json
+++ b/src/crates/concat/locales/it.json
@@ -199,8 +199,6 @@
"export.format": "Formato",
"export.halfTheSize": "Metà delle dimensioni",
"export.hardware": "hardware",
- "export.higher": "Più alta",
- "export.lower": "Più bassa",
"export.mixingAudio": "Mixaggio dell'audio",
"export.nameNeedsToBeAFileName": "Il nome deve essere un nome di file: non vuoto e senza / \\ : * ? \" < > |",
"export.notOnThisDevice": "Non su questo dispositivo",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Niente da esportare",
"export.output": "Uscita",
"export.playsEverywhere": "Si riproduce ovunque",
- "export.recommended": "Consigliata",
"export.renderingVideo": "Rendering del video",
"export.replace": "Sostituisci",
"export.replaceFileMessage": "{0} esiste già. L’esportazione lo sostituisce.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Mostra nella cartella",
"export.smallest": "Il più piccolo",
"export.summary": "Riepilogo",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "Colore a 10 bit",
"export.timelineSize": "Timeline",
"export.toneMapped": "Convertito in SDR, si vede ovunque",
diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.json
index 32df5b4e..f092d184 100644
--- a/src/crates/concat/locales/ja.json
+++ b/src/crates/concat/locales/ja.json
@@ -199,8 +199,6 @@
"export.format": "形式",
"export.halfTheSize": "半分のサイズ",
"export.hardware": "ハードウェア",
- "export.higher": "高め",
- "export.lower": "低め",
"export.mixingAudio": "オーディオをミックス中",
"export.nameNeedsToBeAFileName": "名前はファイル名にしてください。空にせず、/ \\ : * ? \" < > | は使えません",
"export.notOnThisDevice": "このデバイスでは使用不可",
@@ -208,7 +206,6 @@
"export.nothingToExport": "書き出すものがありません",
"export.output": "出力",
"export.playsEverywhere": "どこでも再生可能",
- "export.recommended": "推奨",
"export.renderingVideo": "映像をレンダリング中",
"export.replace": "置き換える",
"export.replaceFileMessage": "{0} はすでにあります。書き出すと置き換えられます。",
@@ -217,7 +214,6 @@
"export.showInFolder": "フォルダーで表示",
"export.smallest": "最小",
"export.summary": "概要",
- "export.targetBitrate": "目標ビットレート",
"export.tenBitColour": "10ビットカラー",
"export.timelineSize": "タイムライン",
"export.toneMapped": "トーンマッピング済み、どこでも再生可",
diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.json
index a3c69135..c6bdd1bb 100644
--- a/src/crates/concat/locales/ko.json
+++ b/src/crates/concat/locales/ko.json
@@ -199,8 +199,6 @@
"export.format": "형식",
"export.halfTheSize": "절반 크기",
"export.hardware": "하드웨어",
- "export.higher": "높게",
- "export.lower": "낮게",
"export.mixingAudio": "오디오 믹싱 중",
"export.nameNeedsToBeAFileName": "이름은 파일 이름이어야 합니다. 비워 둘 수 없고 / \\ : * ? \" < > | 는 쓸 수 없습니다",
"export.notOnThisDevice": "이 기기에서 사용 불가",
@@ -208,7 +206,6 @@
"export.nothingToExport": "내보낼 것이 없습니다",
"export.output": "출력",
"export.playsEverywhere": "어디서나 재생",
- "export.recommended": "권장",
"export.renderingVideo": "영상 렌더링 중",
"export.replace": "바꾸기",
"export.replaceFileMessage": "{0} 이(가) 이미 있습니다. 내보내면 바뀝니다.",
@@ -217,7 +214,6 @@
"export.showInFolder": "폴더에서 보기",
"export.smallest": "가장 작음",
"export.summary": "요약",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "10비트 색상",
"export.timelineSize": "타임라인",
"export.toneMapped": "톤 매핑, 어디서나 재생",
diff --git a/src/crates/concat/locales/nl.json b/src/crates/concat/locales/nl.json
index d015eb7e..552a7d5c 100644
--- a/src/crates/concat/locales/nl.json
+++ b/src/crates/concat/locales/nl.json
@@ -199,8 +199,6 @@
"export.format": "Indeling",
"export.halfTheSize": "Half zo groot",
"export.hardware": "hardware",
- "export.higher": "Hoger",
- "export.lower": "Lager",
"export.mixingAudio": "Audio mixen",
"export.nameNeedsToBeAFileName": "De naam moet een bestandsnaam zijn: niet leeg, en zonder / \\ : * ? \" < > |",
"export.notOnThisDevice": "Niet op dit apparaat",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Niets om te exporteren",
"export.output": "Uitvoer",
"export.playsEverywhere": "Speelt overal af",
- "export.recommended": "Aanbevolen",
"export.renderingVideo": "Video renderen",
"export.replace": "Vervangen",
"export.replaceFileMessage": "{0} bestaat al. Exporteren vervangt het.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Tonen in map",
"export.smallest": "Kleinst",
"export.summary": "Overzicht",
- "export.targetBitrate": "Doelbitsnelheid",
"export.tenBitColour": "10-bits kleur",
"export.timelineSize": "Tijdlijn",
"export.toneMapped": "Omgezet naar SDR, speelt overal af",
diff --git a/src/crates/concat/locales/pl.json b/src/crates/concat/locales/pl.json
index 2b63682f..72f355de 100644
--- a/src/crates/concat/locales/pl.json
+++ b/src/crates/concat/locales/pl.json
@@ -199,8 +199,6 @@
"export.format": "Format",
"export.halfTheSize": "O połowę mniejszy",
"export.hardware": "sprzętowo",
- "export.higher": "Wyższa",
- "export.lower": "Niższa",
"export.mixingAudio": "Miksowanie dźwięku",
"export.nameNeedsToBeAFileName": "Nazwa musi być nazwą pliku: niepusta i bez znaków / \\ : * ? \" < > |",
"export.notOnThisDevice": "Niedostępne na tym urządzeniu",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Nic do wyeksportowania",
"export.output": "Wyjście",
"export.playsEverywhere": "Odtwarza się wszędzie",
- "export.recommended": "Zalecane",
"export.renderingVideo": "Renderowanie wideo",
"export.replace": "Zastąp",
"export.replaceFileMessage": "{0} już istnieje. Eksport go zastąpi.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Pokaż w folderze",
"export.smallest": "Najmniejszy",
"export.summary": "Podsumowanie",
- "export.targetBitrate": "Docelowa szybkość transmisji",
"export.tenBitColour": "Kolor 10-bitowy",
"export.timelineSize": "Oś czasu",
"export.toneMapped": "Zmapowane do SDR, odtwarza się wszędzie",
diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.json
index 0676afd0..4b307dca 100644
--- a/src/crates/concat/locales/pt-BR.json
+++ b/src/crates/concat/locales/pt-BR.json
@@ -199,8 +199,6 @@
"export.format": "Formato",
"export.halfTheSize": "Metade do tamanho",
"export.hardware": "hardware",
- "export.higher": "Mais alta",
- "export.lower": "Mais baixa",
"export.mixingAudio": "Mixando o áudio",
"export.nameNeedsToBeAFileName": "O nome precisa ser um nome de arquivo: não vazio e sem / \\ : * ? \" < > |",
"export.notOnThisDevice": "Indisponível neste dispositivo",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Nada para exportar",
"export.output": "Saída",
"export.playsEverywhere": "Reproduz em qualquer lugar",
- "export.recommended": "Recomendada",
"export.renderingVideo": "Renderizando o vídeo",
"export.replace": "Substituir",
"export.replaceFileMessage": "{0} já existe. Exportar o substitui.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Mostrar na pasta",
"export.smallest": "O menor",
"export.summary": "Resumo",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "Cor de 10 bits",
"export.timelineSize": "Linha do tempo",
"export.toneMapped": "Convertido para SDR, toca em qualquer lugar",
diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.json
index 0183d961..380178e6 100644
--- a/src/crates/concat/locales/ru.json
+++ b/src/crates/concat/locales/ru.json
@@ -199,8 +199,6 @@
"export.format": "Формат",
"export.halfTheSize": "Вдвое меньше",
"export.hardware": "аппаратно",
- "export.higher": "Выше",
- "export.lower": "Ниже",
"export.mixingAudio": "Сведение звука",
"export.nameNeedsToBeAFileName": "Имя должно быть именем файла: не пустым и без / \\ : * ? \" < > |",
"export.notOnThisDevice": "Недоступно на этом устройстве",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Нечего экспортировать",
"export.output": "Вывод",
"export.playsEverywhere": "Воспроизводится везде",
- "export.recommended": "Рекомендуется",
"export.renderingVideo": "Рендеринг видео",
"export.replace": "Заменить",
"export.replaceFileMessage": "{0} уже есть. Экспорт заменит его.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Показать в папке",
"export.smallest": "Самый маленький",
"export.summary": "Сводка",
- "export.targetBitrate": "Целевой битрейт",
"export.tenBitColour": "10-битный цвет",
"export.timelineSize": "Таймлайн",
"export.toneMapped": "Приведено к SDR, играет везде",
diff --git a/src/crates/concat/locales/th.json b/src/crates/concat/locales/th.json
index 78036b1c..aafd2364 100644
--- a/src/crates/concat/locales/th.json
+++ b/src/crates/concat/locales/th.json
@@ -199,8 +199,6 @@
"export.format": "รูปแบบ",
"export.halfTheSize": "ขนาดครึ่งเดียว",
"export.hardware": "ฮาร์ดแวร์",
- "export.higher": "สูงขึ้น",
- "export.lower": "ต่ำลง",
"export.mixingAudio": "กำลังมิกซ์เสียง",
"export.nameNeedsToBeAFileName": "ชื่อต้องเป็นชื่อไฟล์ที่ใช้ได้: ห้ามว่าง และห้ามมี / \\ : * ? \" < > |",
"export.notOnThisDevice": "ไม่มีในอุปกรณ์นี้",
@@ -208,7 +206,6 @@
"export.nothingToExport": "ไม่มีอะไรให้ส่งออก",
"export.output": "เอาต์พุต",
"export.playsEverywhere": "เล่นได้ทุกที่",
- "export.recommended": "แนะนำ",
"export.renderingVideo": "กำลังเรนเดอร์วิดีโอ",
"export.replace": "แทนที่",
"export.replaceFileMessage": "มี {0} อยู่แล้ว การส่งออกจะแทนที่ไฟล์นี้",
@@ -217,7 +214,6 @@
"export.showInFolder": "แสดงในโฟลเดอร์",
"export.smallest": "เล็กที่สุด",
"export.summary": "สรุป",
- "export.targetBitrate": "บิตเรตเป้าหมาย",
"export.tenBitColour": "สี 10 บิต",
"export.timelineSize": "ไทม์ไลน์",
"export.toneMapped": "แมปโทนแล้ว เล่นได้ทุกที่",
diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.json
index 85b5329b..988b83a5 100644
--- a/src/crates/concat/locales/tr.json
+++ b/src/crates/concat/locales/tr.json
@@ -199,8 +199,6 @@
"export.format": "Biçim",
"export.halfTheSize": "Yarı boyut",
"export.hardware": "donanım",
- "export.higher": "Daha yüksek",
- "export.lower": "Daha düşük",
"export.mixingAudio": "Ses karıştırılıyor",
"export.nameNeedsToBeAFileName": "Ad bir dosya adı olmalı: boş olmamalı ve / \\ : * ? \" < > | içermemeli",
"export.notOnThisDevice": "Bu cihazda yok",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Dışa aktarılacak bir şey yok",
"export.output": "Çıktı",
"export.playsEverywhere": "Her yerde oynatılır",
- "export.recommended": "Önerilen",
"export.renderingVideo": "Video işleniyor",
"export.replace": "Değiştir",
"export.replaceFileMessage": "{0} zaten var. Dışa aktarma onu değiştirir.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Klasörde göster",
"export.smallest": "En küçük",
"export.summary": "Özet",
- "export.targetBitrate": "Target bitrate",
"export.tenBitColour": "10 bit renk",
"export.timelineSize": "Zaman çizelgesi",
"export.toneMapped": "Ton eşlemeli, her yerde oynar",
diff --git a/src/crates/concat/locales/uk.json b/src/crates/concat/locales/uk.json
index f7330895..8cb161ca 100644
--- a/src/crates/concat/locales/uk.json
+++ b/src/crates/concat/locales/uk.json
@@ -199,8 +199,6 @@
"export.format": "Формат",
"export.halfTheSize": "Удвічі менший розмір",
"export.hardware": "апаратно",
- "export.higher": "Вища",
- "export.lower": "Нижча",
"export.mixingAudio": "Зведення аудіо",
"export.nameNeedsToBeAFileName": "Назва має бути іменем файлу: не порожньою й без символів / \\ : * ? \" < > |",
"export.notOnThisDevice": "Недоступно на цьому пристрої",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Нічого експортувати",
"export.output": "Вихід",
"export.playsEverywhere": "Відтворюється всюди",
- "export.recommended": "Рекомендовано",
"export.renderingVideo": "Рендеринг відео",
"export.replace": "Замінити",
"export.replaceFileMessage": "{0} уже існує. Експорт замінить його.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Показати в папці",
"export.smallest": "Найменший",
"export.summary": "Підсумок",
- "export.targetBitrate": "Цільовий бітрейт",
"export.tenBitColour": "10-бітний колір",
"export.timelineSize": "Часова шкала",
"export.toneMapped": "Тонове відображення, відтворюється будь-де",
diff --git a/src/crates/concat/locales/ur.json b/src/crates/concat/locales/ur.json
index a847e532..6a146cc4 100644
--- a/src/crates/concat/locales/ur.json
+++ b/src/crates/concat/locales/ur.json
@@ -199,8 +199,6 @@
"export.format": "فارمیٹ",
"export.halfTheSize": "آدھا سائز",
"export.hardware": "ہارڈویئر",
- "export.higher": "زیادہ",
- "export.lower": "کم",
"export.mixingAudio": "آڈیو مکس ہو رہا ہے",
"export.nameNeedsToBeAFileName": "نام فائل کا نام ہونا چاہیے: خالی نہ ہو، اور اس میں / \\ : * ? \" < > | میں سے کچھ نہ ہو",
"export.notOnThisDevice": "اس ڈیوائس پر نہیں",
@@ -208,7 +206,6 @@
"export.nothingToExport": "ایکسپورٹ کے لیے کچھ نہیں",
"export.output": "آؤٹ پٹ",
"export.playsEverywhere": "ہر جگہ چلتا ہے",
- "export.recommended": "تجویز کردہ",
"export.renderingVideo": "ویڈیو رینڈر ہو رہی ہے",
"export.replace": "تبدیل کریں",
"export.replaceFileMessage": "{0} پہلے سے موجود ہے۔ ایکسپورٹ اسے تبدیل کر دے گا۔",
@@ -217,7 +214,6 @@
"export.showInFolder": "فولڈر میں دکھائیں",
"export.smallest": "سب سے چھوٹا",
"export.summary": "خلاصہ",
- "export.targetBitrate": "ہدف بٹ ریٹ",
"export.tenBitColour": "10 بٹ رنگ",
"export.timelineSize": "ٹائم لائن",
"export.toneMapped": "ٹون میپڈ، کہیں بھی چلتا ہے",
diff --git a/src/crates/concat/locales/vi.json b/src/crates/concat/locales/vi.json
index 372127ea..197994c1 100644
--- a/src/crates/concat/locales/vi.json
+++ b/src/crates/concat/locales/vi.json
@@ -199,8 +199,6 @@
"export.format": "Định dạng",
"export.halfTheSize": "Một nửa kích thước",
"export.hardware": "phần cứng",
- "export.higher": "Cao hơn",
- "export.lower": "Thấp hơn",
"export.mixingAudio": "Đang trộn âm thanh",
"export.nameNeedsToBeAFileName": "Tên phải là tên tệp: không được để trống và không chứa / \\: * ? \" < > |",
"export.notOnThisDevice": "Không có trên thiết bị này",
@@ -208,7 +206,6 @@
"export.nothingToExport": "Không có gì để xuất",
"export.output": "Đầu ra",
"export.playsEverywhere": "Phát được trên mọi thiết bị",
- "export.recommended": "Đề xuất",
"export.renderingVideo": "Đang kết xuất video",
"export.replace": "Thay thế",
"export.replaceFileMessage": "{0} đã tồn tại. Khi xuất, tệp này sẽ bị thay thế.",
@@ -217,7 +214,6 @@
"export.showInFolder": "Hiện trong thư mục",
"export.smallest": "Nhỏ nhất",
"export.summary": "Tóm tắt",
- "export.targetBitrate": "Tốc độ bit mục tiêu",
"export.tenBitColour": "Màu 10-bit",
"export.timelineSize": "Dòng thời gian",
"export.toneMapped": "Ánh xạ tông màu, phát được ở mọi nơi",
diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.json
index ae0ac896..cfd44498 100644
--- a/src/crates/concat/locales/zh-Hans.json
+++ b/src/crates/concat/locales/zh-Hans.json
@@ -199,8 +199,6 @@
"export.format": "格式",
"export.halfTheSize": "缩小一半",
"export.hardware": "硬件",
- "export.higher": "更高",
- "export.lower": "更低",
"export.mixingAudio": "正在混合音频",
"export.nameNeedsToBeAFileName": "名称必须是文件名:不能为空,也不能含有 / \\ : * ? \" < > |",
"export.notOnThisDevice": "此设备不支持",
@@ -208,7 +206,6 @@
"export.nothingToExport": "没有可导出的内容",
"export.output": "输出",
"export.playsEverywhere": "随处可播",
- "export.recommended": "推荐",
"export.renderingVideo": "正在渲染视频",
"export.replace": "替换",
"export.replaceFileMessage": "{0} 已经存在。导出会将其替换。",
@@ -217,7 +214,6 @@
"export.showInFolder": "在文件夹中显示",
"export.smallest": "最小",
"export.summary": "摘要",
- "export.targetBitrate": "目标码率",
"export.tenBitColour": "10 位色彩",
"export.timelineSize": "时间线",
"export.toneMapped": "色调映射,随处可播",
diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.json
index a719601b..bda01020 100644
--- a/src/crates/concat/locales/zh-TW.json
+++ b/src/crates/concat/locales/zh-TW.json
@@ -199,8 +199,6 @@
"export.format": "格式",
"export.halfTheSize": "檔案大小減半",
"export.hardware": "硬體",
- "export.higher": "更高",
- "export.lower": "更低",
"export.mixingAudio": "正在混合音訊",
"export.nameNeedsToBeAFileName": "名稱必須是檔案名稱:不能為空,也不能含有 / \\ : * ? \" < > |",
"export.notOnThisDevice": "此裝置不支援",
@@ -208,7 +206,6 @@
"export.nothingToExport": "沒有可匯出的內容",
"export.output": "輸出",
"export.playsEverywhere": "隨處可播",
- "export.recommended": "推薦",
"export.renderingVideo": "正在渲染影片",
"export.replace": "取代",
"export.replaceFileMessage": "{0} 已經存在。匯出會將其取代。",
@@ -217,7 +214,6 @@
"export.showInFolder": "在資料夾中顯示",
"export.smallest": "最小",
"export.summary": "摘要",
- "export.targetBitrate": "目標位元率",
"export.tenBitColour": "10 位元色彩",
"export.timelineSize": "時間軸",
"export.toneMapped": "色調映射,到處可播",
diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rs
index 64444096..dbf21d55 100644
--- a/src/crates/concat/src/lib.rs
+++ b/src/crates/concat/src/lib.rs
@@ -1536,15 +1536,9 @@ fn start(project: Option<std::path::PathBuf>, smoke: bool) -> Result<(), slint::
app.on_export_name_edited(on_window!(|state, name: SharedString| {
state.handle(Msg::Export(ExportMsg::NameEdited(name.to_string())));
}));
- app.on_export_resolution_changed(on_window!(|state, index: i32| {
- state.handle(Msg::Export(ExportMsg::ResolutionChanged(index)));
- }));
app.on_export_rate_changed(on_window!(|state, index: i32| {
state.handle(Msg::Export(ExportMsg::RateChanged(index)));
}));
- app.on_export_quality_changed(on_window!(|state, index: i32| {
- state.handle(Msg::Export(ExportMsg::QualityChanged(index)));
- }));
app.on_export_codec_changed(on_window!(|state, index: i32| {
state.handle(Msg::Export(ExportMsg::CodecChanged(index)));
}));
@@ -1554,8 +1548,8 @@ fn start(project: Option<std::path::PathBuf>, smoke: bool) -> Result<(), slint::
app.on_export_ten_bit_changed(on_window!(|state, on: bool| {
state.handle(Msg::Export(ExportMsg::TenBitChanged(on)));
}));
- app.on_export_bitrate_changed(on_window!(|state, text: SharedString| {
- state.handle(Msg::Export(ExportMsg::BitrateChanged(text.to_string())));
+ app.on_export_bitrate_changed(on_window!(|state, mbps: f32| {
+ state.handle(Msg::Export(ExportMsg::BitrateChanged(mbps)));
}));
app.on_export_again(on_window!(|state| {
state.handle(Msg::Export(ExportMsg::Again));
diff --git a/src/crates/concat/src/panes/export.rs b/src/crates/concat/src/panes/export.rs
index 7bdbb913..66bc175a 100644
--- a/src/crates/concat/src/panes/export.rs
+++ b/src/crates/concat/src/panes/export.rs
@@ -33,16 +33,13 @@ pub enum ExportMsg {
/// The sheet is dismissed.
Close,
NameEdited(String),
- ResolutionChanged(i32),
RateChanged(i32),
- QualityChanged(i32),
CodecChanged(i32),
TenBitChanged(bool),
/// For an HDR timeline: written HDR (true), or tone-mapped to SDR.
HdrChanged(bool),
- /// The target bitrate field, in Mbps as typed: the bitrate becomes a
- /// custom one.
- BitrateChanged(String),
+ /// The target bitrate field, in Mbps: the bitrate becomes a custom one.
+ BitrateChanged(f32),
/// Back to the form after a finished or failed render.
Again,
/// Pick the destination folder.
@@ -76,14 +73,15 @@ pub struct ExportPane {
pub folder: String,
pub resolution: usize,
pub rate: usize,
- /// The bitrate: 0 higher, 1 recommended, 2 lower, 3 the typed one.
- pub quality: usize,
+ /// The bitrate is the typed one, not the recommended one for the
+ /// frame and the rate.
+ pub custom: bool,
/// Index into `VideoCodec::ALL`.
pub codec: usize,
pub ten_bit: bool,
/// An HDR timeline written tone-mapped to SDR rather than as it is.
pub sdr: bool,
- /// The typed bitrate in kbps, the one written when `quality` is 3.
+ /// The typed bitrate in kbps, the one written when `custom`.
pub bitrate: u32,
pub phase: ExportPhase,
pub progress: f32,
@@ -103,7 +101,7 @@ impl Default for ExportPane {
folder: home_folder("Movies"),
resolution: 2,
rate: 0,
- quality: 1,
+ custom: false,
codec: 0,
ten_bit: false,
sdr: false,
@@ -136,26 +134,9 @@ impl ExportPane {
}
ExportMsg::Close => self.open = false,
ExportMsg::NameEdited(name) => self.name = name,
- ExportMsg::ResolutionChanged(index) => {
- // Only the timeline's own rung is taken; the sheet greys the
- // rest, and this is the same rule for a caller that did not.
- let index = index.max(0) as usize;
- if index == Self::own_rung(studio) {
- self.resolution = index;
- }
- }
ExportMsg::RateChanged(index) => {
self.rate = (index.max(0) as usize).min(Self::rates(studio).len() - 1);
}
- ExportMsg::QualityChanged(index) => {
- let index = (index.max(0) as usize).min(CUSTOM);
- // The typed field starts from what the card had, so a
- // custom bitrate is an edit of the last one, not 8 Mbps.
- if index == CUSTOM && self.quality != CUSTOM {
- self.bitrate = self.target_kbps(studio, self.quality);
- }
- self.quality = index;
- }
// A codec this device cannot encode is not taken: the picker
// says so under it, and the choice before stands.
ExportMsg::CodecChanged(index) => {
@@ -166,10 +147,10 @@ impl ExportPane {
}
ExportMsg::TenBitChanged(on) => self.ten_bit = on,
ExportMsg::HdrChanged(on) => self.sdr = !on,
- ExportMsg::BitrateChanged(text) => {
- if let Some(kbps) = typed_kbps(&text) {
- self.bitrate = kbps;
- self.quality = CUSTOM;
+ ExportMsg::BitrateChanged(mbps) => {
+ if mbps.is_finite() {
+ self.bitrate = ((mbps * 1000.0).round() as u32).clamp(500, 400_000);
+ self.custom = true;
}
}
ExportMsg::Again => {
@@ -337,15 +318,16 @@ impl ExportPane {
Self::frame_for(studio, short)
}
- /// The bitrate a choice aims for, in kbps. Recommended is what YouTube
- /// asks uploads at for the frame - 5 Mbps at 720p, 8 at 1080p, 16 at
- /// 1440p and 40 at 4K, half again above 30 fps - which every other
- /// platform takes too, less for HEVC and AV1, which spend fewer bits
- /// on the same picture, and a quarter more at ten bits. Higher is
- /// twice it, a master to keep or to grade again; Lower half, a draft
- /// or a message. Rounded to half a megabit, as a person would say it.
- pub fn target_kbps(&self, studio: &Studio, choice: usize) -> u32 {
- if choice >= CUSTOM {
+ /// The bitrate the file is written at, in kbps: the typed one, or the
+ /// one YouTube asks uploads at for the frame - 5 Mbps at 720p, 8 at
+ /// 1080p, 16 at 1440p and 40 at 4K, half again above 30 fps - which
+ /// every other platform takes too, less for HEVC and AV1, which spend
+ /// fewer bits on the same picture, and a quarter more at ten bits.
+ /// Rounded to half a megabit, as a person would say it. The
+ /// recommended one follows the frame, the rate and the codec until a
+ /// bitrate is typed.
+ pub fn target_kbps(&self, studio: &Studio) -> u32 {
+ if self.custom {
return self.bitrate;
}
let (width, height) = self.size(studio);
@@ -360,14 +342,14 @@ impl ExportPane {
};
let motion = if fps > 30.5 { 1.5 } else { 1.0 };
let deep = if self.deep(studio) { 1.25 } else { 1.0 };
- let kbps = base * motion * self.codec(studio).size_factor() * deep * TIERS[choice];
+ let kbps = base * motion * self.codec(studio).size_factor() * deep;
((kbps / 500.0).round() * 500.0).max(500.0) as u32
}
- /// The file's size at one choice, in bytes: the bitrate is an average
- /// the encoder keeps to, so this is what is written, give or take.
- pub fn size_bytes(&self, studio: &Studio, choice: usize) -> f32 {
- let video = self.target_kbps(studio, choice) as f32 * 1000.0;
+ /// The file's size, in bytes: the bitrate is an average the encoder
+ /// keeps to, so this is what is written, give or take.
+ pub fn size_bytes(&self, studio: &Studio) -> f32 {
+ let video = self.target_kbps(studio) as f32 * 1000.0;
(video + AUDIO_BPS) * studio.duration().max(1.0) / 8.0
}
@@ -460,7 +442,7 @@ impl ExportPane {
codec: self.codec(studio),
ten_bit: self.deep(studio),
rate_mode: concat_media::RateMode::Average,
- bitrate_kbps: self.target_kbps(studio, self.quality),
+ bitrate_kbps: self.target_kbps(studio),
// Video range, what every player and every platform expects.
color_range: ColorRange::Limited,
hdr: self.hdr(studio),
@@ -571,26 +553,6 @@ impl ExportPane {
.collect();
ModelRc::new(VecModel::from(sizes))
},
- resolution_details: {
- let names: Vec<SharedString> = Self::ladder(studio)
- .iter()
- .map(|rung| match rung {
- 2160 => "4K".into(),
- 1440 => "QHD".into(),
- 1080 => "1080p".into(),
- 720 => "720p".into(),
- _ => t("export.timelineSize").into(),
- })
- .collect();
- ModelRc::new(VecModel::from(names))
- },
- resolution_disabled: {
- let own = Self::own_rung(studio);
- let off: Vec<bool> = (0..Self::ladder(studio).len())
- .map(|rung| rung != own)
- .collect();
- ModelRc::new(VecModel::from(off))
- },
rate: self.rate as i32,
rates: {
let names: Vec<SharedString> = Self::rates(studio)
@@ -605,7 +567,6 @@ impl ExportPane {
details[0] = t("export.timelineSize").into();
ModelRc::new(VecModel::from(details))
},
- quality: self.quality as i32,
codec: concat_media::VideoCodec::ALL
.iter()
.position(|codec| *codec == self.codec(studio))
@@ -624,10 +585,7 @@ impl ExportPane {
_ => "HDR (HLG)",
}
.into(),
- target: mbps_number(self.target_kbps(studio, self.quality)).into(),
- rate_high: mbps(self.target_kbps(studio, 0)).into(),
- rate_balanced: mbps(self.target_kbps(studio, 1)).into(),
- rate_small: mbps(self.target_kbps(studio, 2)).into(),
+ target: self.target_kbps(studio) as f32 / 1000.0,
encoding: {
// "HEVC 10-bit · hardware": the standard, the depth when it
// is the deeper one, and whether the platform's own encoder
@@ -652,10 +610,7 @@ impl ExportPane {
words.join(" ")
}
.into(),
- size_high: bytes(self.size_bytes(studio, 0)).into(),
- size_balanced: bytes(self.size_bytes(studio, 1)).into(),
- size_small: bytes(self.size_bytes(studio, 2)).into(),
- size_chosen: bytes(self.size_bytes(studio, self.quality)).into(),
+ size_chosen: bytes(self.size_bytes(studio)).into(),
phase: self.phase,
progress: self.progress,
stage: self.stage.as_str().into(),
@@ -670,45 +625,12 @@ impl ExportPane {
slint::SharedString::new()
},
message: self.message.as_str().into(),
- done_size: bytes(self.size_bytes(studio, self.quality)).into(),
+ done_size: bytes(self.size_bytes(studio)).into(),
empty: clips == 0,
}
}
}
-/// The bitrate choices as multiples of the recommended one: higher,
-/// recommended, lower. Index [`CUSTOM`] is the typed bitrate.
-const TIERS: [f32; 3] = [2.0, 1.0, 0.5];
-const CUSTOM: usize = 3;
-
-/// "8 Mbps", "7.5 Mbps": a bitrate as the sheet says it.
-fn mbps(kbps: u32) -> String {
- format!("{} Mbps", mbps_number(kbps))
-}
-
-/// The number alone, for the field that takes it back: "8", "7.5".
-fn mbps_number(kbps: u32) -> String {
- let value = kbps as f32 / 1000.0;
- if (value - value.round()).abs() < 0.05 {
- format!("{}", value.round() as u32)
- } else {
- format!("{value:.1}")
- }
-}
-
-/// A typed bitrate in Mbps - "12", "7.5", "7,5 Mbps" - as kbps, between
-/// half a megabit and 400; `None` for nothing a number can be read from.
-fn typed_kbps(text: &str) -> Option<u32> {
- let number: String = text
- .trim()
- .chars()
- .map(|c| if c == ',' { '.' } else { c })
- .take_while(|c| c.is_ascii_digit() || *c == '.')
- .collect();
- let value: f32 = number.parse().ok()?;
- Some(((value * 1000.0).round() as u32).clamp(500, 400_000))
-}
-
/// The typed name as the file's, or `None` for one that cannot be: empty
/// once trimmed, a dot or two, or holding a character no file system
/// here takes. The set is Windows' - a slash and a backslash, the colon,
@@ -759,23 +681,4 @@ mod tests {
assert_eq!(ExportPane::rate_name((15, 1)), "15 fps");
assert_eq!(ExportPane::rate_name((12500, 1000)), "12.5 fps");
}
-
- /// A bitrate reads back as a person would type it, and what is typed
- /// is read the way it was meant: a decimal comma, a unit after it,
- /// and nothing below half a megabit or past 400.
- #[test]
- fn a_bitrate_is_said_and_read_in_megabits() {
- assert_eq!(mbps(8000), "8 Mbps");
- assert_eq!(mbps(7500), "7.5 Mbps");
- assert_eq!(mbps_number(40_000), "40");
- assert_eq!(typed_kbps("12"), Some(12_000));
- assert_eq!(typed_kbps("7,5 Mbps"), Some(7_500));
- assert_eq!(typed_kbps(" 7.5 "), Some(7_500));
- assert_eq!(typed_kbps("0.1"), Some(500));
- assert_eq!(typed_kbps("9000"), Some(400_000));
- assert_eq!(typed_kbps("Mbps"), None);
- assert_eq!(typed_kbps(""), None);
- // What the field shows is what it takes back.
- assert_eq!(typed_kbps(&mbps(7500)), Some(7500));
- }
}
diff --git a/src/crates/concat/ui/app.slint b/src/crates/concat/ui/app.slint
index f8e4ab54..e0839338 100644
--- a/src/crates/concat/ui/app.slint
+++ b/src/crates/concat/ui/app.slint
@@ -226,13 +226,11 @@ export component App inherits Window {
callback export-closed();
callback export-name-edited(name: string);
callback export-browse();
- callback export-resolution-changed(index: int);
callback export-rate-changed(index: int);
- callback export-quality-changed(index: int);
callback export-codec-changed(index: int);
callback export-ten-bit-changed(on: bool);
callback export-hdr-changed(on: bool);
- callback export-bitrate-changed(text: string);
+ callback export-bitrate-changed(mbps: float);
callback export-start();
callback export-cancel();
callback export-reveal();
@@ -751,13 +749,11 @@ export component App inherits Window {
closed => { root.export-closed(); }
name-edited(name) => { root.export-name-edited(name); }
browse => { root.export-browse(); }
- resolution-changed(index) => { root.export-resolution-changed(index); }
rate-changed(index) => { root.export-rate-changed(index); }
- quality-changed(index) => { root.export-quality-changed(index); }
codec-changed(index) => { root.export-codec-changed(index); }
ten-bit-changed(on) => { root.export-ten-bit-changed(on); }
hdr-changed(on) => { root.export-hdr-changed(on); }
- bitrate-changed(text) => { root.export-bitrate-changed(text); }
+ bitrate-changed(mbps) => { root.export-bitrate-changed(mbps); }
begin => { root.export-start(); }
cancel => { root.export-cancel(); }
reveal => { root.export-reveal(); }
diff --git a/src/crates/concat/ui/dialogs/export.slint b/src/crates/concat/ui/dialogs/export.slint
index 1d0f0b55..d18edc4f 100644
--- a/src/crates/concat/ui/dialogs/export.slint
+++ b/src/crates/concat/ui/dialogs/export.slint
@@ -5,6 +5,7 @@ import { I18n } from "../i18n.slint";
import { Theme } from "../theme/theme.slint";
import { Glyph, Icon } from "../icons.slint";
import { Button, CopyChip, DialogRow, DialogSection, Field, Progress } from "../primitives/modal.slint";
+import { NumberField } from "../primitives/number-field.slint";
import { Select } from "../primitives/select.slint";
import { Switch } from "../inspector/controls.slint";
import { PaneScroll } from "../workspace/pane.slint";
@@ -12,10 +13,9 @@ import { Fmt } from "../util.slint";
// The export sheet.
//
-// It states the format, asks where the file goes, offers three quality
-// presets and starts. The deciding number sits *on* each preset — what the
-// file will actually weigh — because that is the thing the choice hinges on,
-// and it belongs where the choice is made.
+// It states the format, asks where the file goes and at what bitrate, and
+// starts. What the file will weigh is on the Export button, because that is
+// the thing the bitrate decides.
//
// It covers the window and slides up from the bottom edge, and its groups
// are laid out across the width rather than down it: three columns on a
@@ -41,14 +41,11 @@ export struct ExportData {
/// rung - "1080 × 1920" on a 9:16 edit - with its names, and which
/// rungs cannot be picked: every one but the timeline's own
resolutions: [string],
- resolution-details: [string],
- resolution-disabled: [bool],
rate: int,
/// the rates offered, the timeline's own first, with its name under
/// it; the export is at the timeline's rate unless another is picked
rates: [string],
rate-details: [string],
- quality: int,
/// index into the codec list: H.264, HEVC, AV1
codec: int,
/// Which of them this device can encode. A phone's chip may lack
@@ -66,21 +63,11 @@ export struct ExportData {
deep-available: bool,
/// "HDR (HLG)" or "HDR (PQ)": the timeline's own.
hdr-label: string,
- /// The bitrate the file is written at, in Mbps, as the field shows
- /// it: "8", "7.5".
- target: string,
- /// What each choice aims for: "16 Mbps", "8 Mbps", "4 Mbps".
- rate-high: string,
- rate-balanced: string,
- rate-small: string,
+ /// The bitrate the file is written at, in Mbps.
+ target: float,
/// "HEVC 10-bit · hardware": what the file will be encoded as
encoding: string,
- /// What each preset would weigh. Three strings rather than a list: a Slint
- /// struct cannot hold an array.
- size-high: string,
- size-balanced: string,
- size-small: string,
- /// What the chosen bitrate would weigh, the typed one included.
+ /// What the file will weigh at the bitrate.
size-chosen: string,
phase: ExportPhase,
/// 0..1
@@ -133,64 +120,6 @@ component Fact inherits Rectangle {
}
}
-// One of the three quality presets. The estimate is on the card, in the accent
-// when the card is the chosen one, because it is what the choice is actually
-// being made on.
-component QualityCard inherits Rectangle {
- in property <string> label;
- in property <string> note;
- in property <string> size;
- in property <bool> current;
-
- callback clicked();
-
- horizontal-stretch: 1;
- height: 72px;
- border-radius: Theme.r;
- border-width: 1px;
- border-color: root.current ? Theme.accent
- : touch.has-hover ? Theme.line-strong
- : Theme.line;
- background: root.current ? Theme.accent-soft : Theme.raised;
-
- animate background, border-color { duration: 120ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }
-
- VerticalLayout {
- padding: 10px;
- spacing: 1px;
-
- Text {
- text: root.label;
- color: Theme.fg;
- font-size: Theme.fs;
- font-weight: Theme.weight-title;
- overflow: elide;
- }
-
- Text {
- text: root.note;
- color: Theme.fg-dim;
- font-size: Theme.fs-sm;
- overflow: elide;
- }
-
- Rectangle { vertical-stretch: 1; }
-
- Text {
- text: "~" + root.size;
- color: root.current ? Theme.accent : Theme.fg;
- font-family: Theme.font-technical;
- font-size: Theme.fs;
- font-weight: Theme.weight-title;
- }
- }
-
- touch := TouchArea {
- mouse-cursor: pointer;
- clicked => { root.clicked(); }
- }
-}
-
// ── the groups ───────────────────────────────────────────────────────────
//
// One component each, so the sheet can deal them into however many columns
@@ -341,8 +270,8 @@ component DestinationSection inherits DialogSection {
component OutputSection inherits DialogSection {
in property <ExportData> data;
- callback resolution-changed(index: int);
callback rate-changed(index: int);
+ callback bitrate-changed(mbps: float);
callback codec-changed(index: int);
callback ten-bit-changed(on: bool);
callback hdr-changed(on: bool);
@@ -351,16 +280,18 @@ component OutputSection inherits DialogSection {
DialogRow {
label: I18n.t("export.resolution");
- // The timeline's own size, and the ladder it sits on for scale:
- // a 9:16 edit is 1080 × 1920, not 1920 × 1080, and it exports at
- // the size it was cut at - the other rungs are shown and cannot be
- // picked. https://github.com/jub0t/Concat/issues/109
- Select {
- current: root.data.resolution;
- options: root.data.resolutions;
- details: root.data.resolution-details;
- disabled: root.data.resolution-disabled;
- changed(index) => { root.resolution-changed(index); }
+ // The timeline's own size, which is the size it exports at: a
+ // 9:16 edit is 1080 × 1920. A fact, not a choice.
+ // https://github.com/jub0t/Concat/issues/109
+ HorizontalLayout {
+ alignment: end;
+ Text {
+ text: root.data.resolutions[root.data.resolution];
+ color: Theme.fg;
+ font-family: Theme.font-technical;
+ font-size: Theme.fs;
+ vertical-alignment: center;
+ }
}
}
@@ -417,6 +348,28 @@ component OutputSection inherits DialogSection {
}
}
+ // The bitrate: what this frame and rate are uploaded at (YouTube's
+ // recommendation, which every platform takes) until it is dragged,
+ // stepped or typed to another. The encoder keeps to it as an average,
+ // so the size on the Export button is the size written.
+ DialogRow {
+ label: I18n.t("export.bitrate");
+ HorizontalLayout {
+ alignment: end;
+ NumberField {
+ width: 120px;
+ value: root.data.target;
+ minimum: 0.5;
+ maximum: 400;
+ step: 0.5;
+ precision: 1;
+ px-per-step: 4px;
+ unit: "Mbps";
+ changed(value) => { root.bitrate-changed(value); }
+ }
+ }
+ }
+
// HDR is ten bits always, so the switch is for SDR alone.
if !root.data.hdr && root.data.deep-available: DialogRow {
label: I18n.t("export.tenBitColour");
@@ -433,58 +386,6 @@ component OutputSection inherits DialogSection {
}
}
-// The bitrate, as every editor asks for it: recommended for the frame and
-// the rate, twice that or half it, or a number typed. The encoder keeps to
-// an average, so the size on each card is the size written, give or take.
-component QualitySection inherits DialogSection {
- in property <ExportData> data;
-
- callback quality-changed(index: int);
- callback bitrate-changed(text: string);
-
- title: I18n.t("export.bitrate");
-
- VerticalLayout {
- spacing: 8px;
-
- HorizontalLayout {
- spacing: 6px;
-
- QualityCard {
- label: I18n.t("export.higher");
- note: root.data.rate-high;
- size: root.data.size-high;
- current: root.data.quality == 0;
- clicked => { root.quality-changed(0); }
- }
- QualityCard {
- label: I18n.t("export.recommended");
- note: root.data.rate-balanced;
- size: root.data.size-balanced;
- current: root.data.quality == 1;
- clicked => { root.quality-changed(1); }
- }
- QualityCard {
- label: I18n.t("export.lower");
- note: root.data.rate-small;
- size: root.data.size-small;
- current: root.data.quality == 2;
- clicked => { root.quality-changed(2); }
- }
- }
-
- // The number the file is written at, whichever card set it; a
- // number typed here is a bitrate of its own.
- DialogRow {
- label: I18n.t("export.targetBitrate");
- Field {
- value: root.data.target + " Mbps";
- edited(text) => { root.bitrate-changed(text); }
- }
- }
- }
-}
-
// What is under the groups: the failure, the progress, the result, and
// the button that starts it all.
component ExportFooter inherits VerticalLayout {
@@ -661,13 +562,11 @@ export component ExportDialog inherits Rectangle {
callback closed();
callback name-edited(name: string);
callback browse();
- callback resolution-changed(index: int);
callback rate-changed(index: int);
- callback quality-changed(index: int);
callback codec-changed(index: int);
callback ten-bit-changed(on: bool);
callback hdr-changed(on: bool);
- callback bitrate-changed(text: string);
+ callback bitrate-changed(mbps: float);
callback begin();
callback cancel();
callback reveal();
@@ -799,24 +698,16 @@ export component ExportDialog inherits Rectangle {
}
if !root.running: OutputSection {
data: root.data;
- resolution-changed(index) => { root.resolution-changed(index); }
+ bitrate-changed(mbps) => { root.bitrate-changed(mbps); }
rate-changed(index) => { root.rate-changed(index); }
codec-changed(index) => { root.codec-changed(index); }
ten-bit-changed(on) => { root.ten-bit-changed(on); }
hdr-changed(on) => { root.hdr-changed(on); }
}
- if !root.running: QualitySection {
- data: root.data;
- quality-changed(index) => { root.quality-changed(index); }
- bitrate-changed(text) => { root.bitrate-changed(text); }
- }
}
- // Two columns: what and where on the left with the
- // quality, how on the right.
// Two columns: the picture, what it is and where it
- // goes on the left with the quality; how on the right,
- // the advanced groups open.
+ // goes on the left; how it is written on the right.
if !root.running && root.columns == 2: HorizontalLayout {
spacing: 12px;
@@ -838,11 +729,6 @@ export component ExportDialog inherits Rectangle {
name-edited(name) => { root.name-edited(name); }
browse => { root.browse(); }
}
- QualitySection {
- data: root.data;
- quality-changed(index) => { root.quality-changed(index); }
- bitrate-changed(text) => { root.bitrate-changed(text); }
- }
}
VerticalLayout {
@@ -851,7 +737,7 @@ export component ExportDialog inherits Rectangle {
OutputSection {
first: true;
data: root.data;
- resolution-changed(index) => { root.resolution-changed(index); }
+ bitrate-changed(mbps) => { root.bitrate-changed(mbps); }
rate-changed(index) => { root.rate-changed(index); }
codec-changed(index) => { root.codec-changed(index); }
ten-bit-changed(on) => { root.ten-bit-changed(on); }
@@ -860,9 +746,8 @@ export component ExportDialog inherits Rectangle {
}
}
- // Three columns: the picture and what it is; what
- // shape and where it goes; how good, the advanced
- // groups open under it.
+ // Three columns: the picture and what it is; how it is
+ // written; where it goes.
if !root.running && root.columns == 3: HorizontalLayout {
spacing: 12px;
@@ -886,28 +771,23 @@ export component ExportDialog inherits Rectangle {
OutputSection {
first: true;
data: root.data;
- resolution-changed(index) => { root.resolution-changed(index); }
+ bitrate-changed(mbps) => { root.bitrate-changed(mbps); }
rate-changed(index) => { root.rate-changed(index); }
codec-changed(index) => { root.codec-changed(index); }
ten-bit-changed(on) => { root.ten-bit-changed(on); }
hdr-changed(on) => { root.hdr-changed(on); }
}
- DestinationSection {
- data: root.data;
- phone: root.phone;
- name-edited(name) => { root.name-edited(name); }
- browse => { root.browse(); }
- }
}
VerticalLayout {
alignment: start;
horizontal-stretch: 1;
- QualitySection {
+ DestinationSection {
first: true;
data: root.data;
- quality-changed(index) => { root.quality-changed(index); }
- bitrate-changed(text) => { root.bitrate-changed(text); }
+ phone: root.phone;
+ name-edited(name) => { root.name-edited(name); }
+ browse => { root.browse(); }
}
}
}