Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.
C++
Export: closes playback at start, VBR 8 Mbps default, ETA holds while paused, one ETA readout; fixed home cards; dialog-open logging
Veyra Goal Agent00deb9c79a51
diff --git a/docs/UI_FIELD_FIXES_2026-10-01.md b/docs/UI_FIELD_FIXES_2026-10-01.mdindex 613faf01..abb2506c 100644--- a/docs/UI_FIELD_FIXES_2026-10-01.md+++ b/docs/UI_FIELD_FIXES_2026-10-01.md@@ -97,6 +97,19 @@ GC573 采集延迟(`veyra-app(1).log`,1.4.4,RTX 5080,4K60 YUY2/P010)| F3 | 导出页(Codex 实现,Claude 验收) | 见 `EXPORT_PAGE_EXECUTION_2026-10-02.md` | 多文件队列、MKV、全部音轨 / 内嵌字幕、取消后可重试、完成提示音。验收修正:默认"保留全部"遇到当前封装装不下的轨道(如 MP4 + PGS 图片字幕、剪辑时的图片字幕)原来整项失败,改为跳过并提示,手动选中的轨道装不下仍报错 || F4 | 5090 8K 超分后来变红(logs8,用户补充"1.4.4 一下午没事""测完 1080p 再切回 4K 就红") | 同为 4K→8K:只开超分 + DLSS 补帧一帧约 12 ms,满 60 帧;14:12:25 起叠加降噪(4K 下 4.7 ms)→ 约 17 ms,超出 16.7 ms;之后又换 NVOF、开半速、补帧 3 倍。降噪在 1080p 下只要约 3.5 ms,所以测 1080p 时不红。超分代码与 1.4.4 完全相同;1.4.4 没有负载预算指示 | 未改代码;建议 4K 输入超分 8K 时关降噪,或超分目标降到 6K / 4K |+## 第六批(10-02)++| # | 反馈 | 原因(证据) | 修改 |+|---|------|--------------|------|+| G1 | GPU 占用把集显和独显加在一起 | 采样把所有显卡的 "GPU Engine" 计数器按引擎类型相加 | 只统计一块显卡(按 LUID 过滤);设置 → 通用与外观 → GPU 占用监控 可选,默认按 Windows"高性能"顺序取独显;没有计数器的影子显卡(虚拟显示器借用独显生成的)不列出。本机 RTX 5070 + AMD 集显实测:默认 5070,切集显读数 0 |+| G2 | 8K VR 导出中途报错(1.4.4,RTX 4070 Ti SUPER,日志 export-worker-6384) | 8K 原生 NR + 8K 光流时某一帧 GPU 超过 2 秒,导出每帧固定只等 2 秒;无法从 1.4.4 日志分辨是慢帧还是驱动重置(该卡是 40 系,社区版 NR)。出错时第 2091 帧左右(全片约 11900 帧),不在结尾 | 每帧最多等 30 秒,期间每 250 ms 检查显卡是否被系统重置,重置则立即失败并说明原因和建议;慢帧写日志(等待时长、显存)。实测注入 3 秒慢帧:导出完成;注入 31 秒:明确失败并留诊断 |+| G3 | 4070S 卡死诊断读不到位置 | 只在超时时刻读一次,设备尚未判定移除 | 呈现失败后最多等 5 秒设备移除再读一次 DRED;队列和命令列表命名,DRED 记录停止点前后的操作类型 |+| H1 | 导出时默认关闭正在播放的内容 | — | 开始导出时关闭当前播放 / 采集 / 串流并提示;导出页开关"导出时关闭正在播放的内容"(默认开) |+| H2 | 导出暂停时剩余时间还在走 | 剩余时间按"开始至今"推算,包含暂停时长 | 扣除暂停时长;暂停时显示"已暂停"。实测暂停 6 秒剩余时间不变 |+| H3 | 导出码率默认 8 Mbps | 原默认 CQ、码率 0 | 默认 VBR 8 Mbps |+| H4 | 剩余时间显示了两个 | 旧导出页同时有"预计还需"和"剩余约";新导出页一个都没有 | 底部状态行只显示一个"当前文件剩余约 …" |+| H5 | 点 Xbox 有时出来的是 PS5 窗口 | **未复现**:所有入口绑定都正确;8 次连续真实点击首页 Xbox 卡片都打开 Xbox。发现首页 6 张卡片在 Xbox / PC 串流状态每次变化时整体重建,重建瞬间的点击可能丢失 | 卡片改为固定列表,只更新副标题;日志记录首页卡片点击、菜单选择和每次打开的对话框(`ui-source` / `ui-menu` / `ui-dialog`),再出现时可确认 |+## 未解决- **40 系(4070S)开 NR 显卡卡死**:两个社区版 NR(984BEE0F、SF-v2)在 Ada 上都会卡死,NVIDIA 原版在 Ada 上不支持。待做:设备移除后再读一次卡死诊断,分清是 NR 还是光流;卡死后自动恢复,同一 NR 短时间内两次卡死就自动关 NR 并提示;请用户 A/B(光流换 AMD / NR 内部分辨率 1080p)。diff --git a/qml/Veyra/DialogHost.qml b/qml/Veyra/DialogHost.qmlindex 8976139f..84829432 100644--- a/qml/Veyra/DialogHost.qml+++ b/qml/Veyra/DialogHost.qml@@ -27,6 +27,7 @@ Item {manageDialog.mode = veyra.nodeMode === 1 ? "node" : "list"manageDialog.feedback = ""}+ veyra.logUi("ui-dialog", "open " + key + " (was " + (host.dialog || "none") + ")")host.dialog = key}function close() { host.dialog = "" }diff --git a/qml/Veyra/ExportPage.qml b/qml/Veyra/ExportPage.qmlindex 6ef8ce3d..8fba6502 100644--- a/qml/Veyra/ExportPage.qml+++ b/qml/Veyra/ExportPage.qml@@ -303,7 +303,8 @@ VPage {Note { text: veyra.imageBatchStatus }VButton { visible: veyra.imageBatchActive; text: "取消图片批次"; onClicked: veyra.cancelImageBatch() }}- Note { visible: root.exportKind === "video"; text: "点击开始时冻结本批设置;导出期间可以继续预览其他文件。" }+ Note { visible: root.exportKind === "video"; text: "点击开始时冻结本批设置。" + (veyra.preferences.exportStopsPlayback !== false ? "开始导出时会关闭正在播放的内容,显卡全部留给导出。" : "导出期间可以继续预览其他文件,会和导出抢显卡。") }+ VRow { label: "导出时关闭正在播放的内容"; VSwitch { objectName: "export-stop-playback"; checked: veyra.preferences.exportStopsPlayback !== false; onToggled: veyra.setPreference("exportStopsPlayback", checked) } }VButton { objectName: "export-target"; Layout.fillWidth: true; iconName: "folder"; text: "选择保存目录…"; onClicked: veyra.chooseExportPath() }Note { text: veyra.exportTarget; wrapMode: Text.WrapAnywhere }VRow { label: "完成提示音"; VSwitch { objectName: "export-sound"; checked: veyra.exportCompletionSound; onToggled: veyra.exportCompletionSound = checked } }@@ -330,7 +331,8 @@ VPage {VButton { objectName: "export-start"; Layout.fillWidth: !root.compact; primary: !veyra.exportRunning; text: veyra.exportRunning ? (veyra.exportPaused ? "继续导出" : "暂停导出") : "开始导出 " + veyra.exportReadyCount + " 项"; enabled: root.exportKind === "video" && (veyra.exportRunning || veyra.exportReadyCount > 0); onClicked: veyra.exportRunning ? veyra.pauseExport(!veyra.exportPaused) : veyra.startExport() }VButton { objectName: "export-cancel"; visible: veyra.exportRunning; text: "取消"; onClicked: veyra.cancelExport() }}- Note { visible: !root.compact; text: veyra.exportRunning ? "已编码 " + veyra.exportEncoded + " 帧 · 等待 " + veyra.exportQueueCount + " 项" : "取消后可重新开始;已完成文件会跳过。" }+ // The one remaining-time readout (the old page had two); it holds still while paused.+ Note { objectName: "export-eta"; visible: !root.compact; text: veyra.exportRunning ? "已编码 " + veyra.exportEncoded + " 帧" + (veyra.exportPaused ? " · 已暂停" : veyra.exportEtaSeconds > 0 ? " · 当前文件剩余约 " + veyra.formatTime(veyra.exportEtaSeconds) : "") + " · 等待 " + veyra.exportQueueCount + " 项" : "取消后可重新开始;已完成文件会跳过。" }}}@@ -370,10 +372,16 @@ VPage {onPressed: mouse => drag(mouse)onPositionChanged: mouse => { if (pressed) drag(mouse) }}+ // The engine's status line is the player's long diagnostic once a source+ // closes (the export now closes playback); the preview says what it is for.Text {anchors.centerIn: parent+ width: parent.width - 40+ horizontalAlignment: Text.AlignHCenter+ wrapMode: Text.WordWrapvisible: !veyra.hasSource- text: veyra.statusText+ text: veyra.exportRunning ? "导出进行中,预览已关闭,显卡留给导出+点左侧文件可重新预览(会和导出抢显卡)" : "点左侧文件预览"color: Theme.t3font.family: Theme.fontUifont.pixelSize: Theme.fsH3diff --git a/qml/Veyra/HomePage.qml b/qml/Veyra/HomePage.qmlindex 2b426e79..3dc5131d 100644--- a/qml/Veyra/HomePage.qml+++ b/qml/Veyra/HomePage.qml@@ -92,20 +92,30 @@ VPage {Layout.alignment: Qt.AlignHCenterLayout.preferredWidth: Math.min(1044, root.width - 48)spacing: 12+ // Subtitles name what is really there: the device of the last capture+ // session and the saved PS5 host; generic wording when there is none.+ // Only the subtitle follows the live state. The cards themselves are a fixed+ // list: when the whole array was one binding, every Xbox / PC state change+ // (polling after sign-in) destroyed and rebuilt all six cards, and a click+ // landing during the rebuild was lost (field report 2026-10-02).+ function cardSub(act) {+ switch (act) {+ case "file": return "MP4 · MKV · 图片"+ case "capture": return veyra.hasCaptureSession ? veyra.captureSessionSummary.split(" · ")[0] : "HDMI 采集设备"+ case "ps5": return veyra.remotePlayHost.length > 0 ? "已保存主机 " + veyra.remotePlayHost : "局域网串流"+ case "moonlight": return veyra.moonlight && veyra.moonlight.state.lastLabel ? veyra.moonlight.state.lastLabel : "Sunshine 主机"+ case "xbox": return veyra.xbox && veyra.xbox.state.lastLabel ? veyra.xbox.state.lastLabel : "账号登录 · 实验"+ default: return "窗口或显示器"+ }+ }Repeater {- // Subtitles name what is really there: the device of the last capture- // session and the saved PS5 host; generic wording when there is none.model: [- { glyph: "folder", title: "打开视频", sub: "MP4 · MKV · 图片", act: "file" },- { glyph: "video", title: "采集卡",- sub: veyra.hasCaptureSession ? veyra.captureSessionSummary.split(" · ")[0] : "HDMI 采集设备", act: "capture" },- { glyph: "gamepad", title: "PS5 串流",- sub: veyra.remotePlayHost.length > 0 ? "已保存主机 " + veyra.remotePlayHost : "局域网串流", act: "ps5" },- { glyph: "cast", title: "PC 串流",- sub: veyra.moonlight && veyra.moonlight.state.lastLabel ? veyra.moonlight.state.lastLabel : "Sunshine 主机", act: "moonlight" },- { glyph: "gamepad", title: "Xbox 串流",- sub: veyra.xbox && veyra.xbox.state.lastLabel ? veyra.xbox.state.lastLabel : "账号登录 · 实验", act: "xbox" },- { glyph: "monitor", title: "屏幕捕获", sub: "窗口或显示器", act: "screen" }+ { glyph: "folder", title: "打开视频", act: "file" },+ { glyph: "video", title: "采集卡", act: "capture" },+ { glyph: "gamepad", title: "PS5 串流", act: "ps5" },+ { glyph: "cast", title: "PC 串流", act: "moonlight" },+ { glyph: "gamepad", title: "Xbox 串流", act: "xbox" },+ { glyph: "monitor", title: "屏幕捕获", act: "screen" }]// The layout owns the slot's position, so the card inside it is free to// move its own y for the hover lift (a y set on a layout child is@@ -159,7 +169,7 @@ VPage {font.weight: Font.Medium}Text {- text: modelData.sub+ text: srcGrid.cardSub(modelData.act)color: Theme.t3font.family: Theme.fontUifont.pixelSize: Theme.fsSmall@@ -170,6 +180,7 @@ VPage {TapHandler {id: cardTaponTapped: {+ veyra.logUi("ui-source", "home card act=" + modelData.act)switch (modelData.act) {case "file": veyra.openFileDialog(); breakcase "capture": veyra.openCaptureDialog(); breakdiff --git a/qml/Veyra/VMenu.qml b/qml/Veyra/VMenu.qmlindex a77d37b5..9e066639 100644--- a/qml/Veyra/VMenu.qml+++ b/qml/Veyra/VMenu.qml@@ -261,6 +261,6 @@ Popup {id: pickTimerproperty int index: -1interval: 130- onTriggered: { pop.close(); pop.picked(index, pop.items[index]) }+ onTriggered: { const it = pop.items[index] || {}; if (typeof veyra !== "undefined") veyra.logUi("ui-menu", (pop.title || pop.objectName || "menu") + " pick " + index + " " + (it.act || it.id || it.label || "")); pop.close(); pop.picked(index, pop.items[index]) }}}diff --git a/scripts/ui-check/export-start-pause.qml b/scripts/ui-check/export-start-pause.qmlnew file mode 100644index 00000000..1f0b43b9--- /dev/null+++ b/scripts/ui-check/export-start-pause.qml@@ -0,0 +1,47 @@+ // ---- export: closes playback at start, VBR 8 Mbps default, ETA holds while paused ----+ function uitestFind(item, name) {+ if (!item) return null+ if (item.objectName === name) return item+ const kids = item.children || []+ for (let k = 0; k < kids.length; ++k) { const f = uitestFind(kids[k], name); if (f) return f }+ return null+ }+ Connections { target: veyra; function onNotice(text, isError) { veyra.logUi("uitest-notice", (isError ? "ERR " : "") + text) } }+ Timer { interval: 150; running: true; repeat: true; onTriggered: veyra.logUi("uitest-tick", "") }+ Timer {+ interval: 1000; running: true; repeat: true+ property int ticks: 0+ property string failure: ""+ property real etaPaused: 0+ function fail(why) { if (!failure) failure = why }+ function eta() { const n = uitestFind(root.contentItem, "export-eta"); return n ? n.text : "(none)" }+ onTriggered: {+ ++ticks+ if (ticks === 2) {+ veyra.logUi("uitest", "UITEST_NOTE default rate=" + veyra.exportRateControl + " bitrate=" + veyra.exportBitrateMbps)+ if (veyra.exportRateControl !== 1 || veyra.exportBitrateMbps !== 8) fail("default not VBR 8")+ veyra.openUrl("@VIDEO@")+ }+ if (ticks === 5) {+ root.goPage("exp")++ veyra.addExportFiles(["@VIDEO@"])+ }+ if (ticks === 8) { veyra.logUi("uitest", "UITEST_NOTE before start hasSource=" + veyra.hasSource + " ready=" + veyra.exportReadyCount + " target=" + veyra.exportTarget + " items=" + JSON.stringify(veyra.exportItems.map(i => i.state + ":" + i.note))); veyra.startExport() }+ if (ticks === 10) {+ veyra.logUi("uitest", "UITEST_NOTE after start hasSource=" + veyra.hasSource + " running=" + veyra.exportRunning)+ if (veyra.hasSource) fail("playback still open after export start")+ }+ if (ticks === 16) { veyra.logUi("uitest", "UITEST_NOTE running eta=" + veyra.exportEtaSeconds.toFixed(1) + " text=" + eta()); veyra.pauseExport(true) }+ if (ticks === 18) { etaPaused = veyra.exportEtaSeconds; veyra.logUi("uitest", "UITEST_NOTE paused eta=" + etaPaused.toFixed(1) + " text=" + eta()); veyra.logUi("uitest", "UITEST_SHOT paused") }+ if (ticks === 24) {+ const later = veyra.exportEtaSeconds+ veyra.logUi("uitest", "UITEST_NOTE paused 6s later eta=" + later.toFixed(1) + " paused=" + veyra.exportPaused)+ if (Math.abs(later - etaPaused) > 1.0) fail("eta moved while paused " + etaPaused.toFixed(1) + " -> " + later.toFixed(1))+ if (eta().indexOf("已暂停") < 0) fail("paused text missing: " + eta())+ veyra.pauseExport(false)+ }+ if (ticks === 28) { veyra.logUi("uitest", "UITEST_NOTE resumed eta=" + veyra.exportEtaSeconds.toFixed(1) + " text=" + eta()); veyra.cancelExport() }+ if (ticks === 32) { veyra.logUi("uitest", failure ? "UITEST_FAIL " + failure : "UITEST_DONE"); running = false }+ }+ }diff --git a/scripts/ui-check/load-menu-position.qml b/scripts/ui-check/load-menu-position.qmlnew file mode 100644index 00000000..0470ff80--- /dev/null+++ b/scripts/ui-check/load-menu-position.qml@@ -0,0 +1,44 @@+ // ---- the 极简 pill's 载入 menu opens in the same place every time ----+ function uitestFind(item, name) {+ if (!item) return null+ if (item.objectName === name) return item+ const kids = item.children || []+ for (let k = 0; k < kids.length; ++k) { const f = uitestFind(kids[k], name); if (f) return f }+ return null+ }+ function uitestText(item, text) {+ if (!item) return null+ if (item.text === text && item.visible) return item+ const kids = item.children || []+ for (let k = 0; k < kids.length; ++k) { const f = uitestText(kids[k], text); if (f) return f }+ return null+ }+ Timer { interval: 150; running: true; repeat: true; onTriggered: veyra.logUi("uitest-tick", "") }+ Timer {+ interval: 800; running: true; repeat: true+ property int ticks: 0+ property var spots: []+ onTriggered: {+ ++ticks+ if (ticks === 2) veyra.openUrl("@VIDEO@")+ if (ticks === 6) root.goPage("min")+ const open = [9, 13, 17]+ const read = [11, 15, 19]+ if (open.indexOf(ticks) >= 0) {+ const b = uitestFind(fullBar.contentItem, "cine-load")+ const p = b.mapToGlobal(b.width / 2, b.height / 2)+ veyra.logUi("uitest", "UITEST_CLICK " + p.x + " " + p.y)+ }+ if (read.indexOf(ticks) >= 0) {+ const ov = fullBar.contentItem.Window.window.contentItem.parent+ const ps = uitestText(ov, "PS5 串流"), xb = uitestText(ov, "Xbox 串流")+ const a = ps ? ps.mapToGlobal(0, 0) : null, c = xb ? xb.mapToGlobal(0, 0) : null+ const s = (a ? Math.round(a.y) : "none") + "/" + (c ? Math.round(c.y) : "none")+ spots.push(s)+ veyra.logUi("uitest", "UITEST_NOTE open " + spots.length + " ps5/xbox y=" + s)+ veyra.logUi("uitest", "UITEST_SHOT menu" + spots.length)+ veyra.logUi("uitest", "UITEST_KEY 27")+ }+ if (ticks === 21) { veyra.logUi("uitest", spots.every(v => v === spots[0]) ? "UITEST_DONE" : "UITEST_FAIL moved " + spots.join(" ")); running = false }+ }+ }diff --git a/scripts/ui-check/xbox-card.qml b/scripts/ui-check/xbox-card.qmlnew file mode 100644index 00000000..881b59df--- /dev/null+++ b/scripts/ui-check/xbox-card.qml@@ -0,0 +1,33 @@+ // ---- home 「Xbox 串流」 card must open the Xbox dialog every time ----+ function uitestCard(item, act) {+ if (!item) return null+ if (item.modelData !== undefined && item.modelData && item.modelData.act === act && item.width === 164) return item+ const kids = item.children || []+ for (let k = 0; k < kids.length; ++k) { const f = uitestCard(kids[k], act); if (f) return f }+ return null+ }+ Timer { interval: 150; running: true; repeat: true; onTriggered: veyra.logUi("uitest-tick", "") }+ Timer {+ interval: 700; running: true; repeat: true+ property int ticks: 0+ property int round: 0+ property string seen: ""+ onTriggered: {+ ++ticks+ const phase = ticks % 4+ if (ticks < 3) return+ if (phase === 0) {+ const c = uitestCard(root.contentItem, "xbox")+ if (!c) { veyra.logUi("uitest", "UITEST_FAIL no xbox card"); running = false; return }+ const p = c.mapToGlobal(c.width / 2, c.height / 2)+ veyra.logUi("uitest", "UITEST_CLICK " + p.x + " " + p.y)+ } else if (phase === 2) {+ ++round+ seen += (seen ? "," : "") + (dialogs.dialog || "none")+ veyra.logUi("uitest", "UITEST_NOTE round " + round + " dialog=" + dialogs.dialog)+ if (round === 1) veyra.logUi("uitest", "UITEST_SHOT round1")+ dialogs.close()+ if (round >= 8) { veyra.logUi("uitest", seen.split(",").every(d => d === "xbox") ? "UITEST_DONE" : "UITEST_FAIL " + seen); running = false }+ }+ }+ }diff --git a/src/engine/ExportJobManager.cpp b/src/engine/ExportJobManager.cppindex 42e5a80d..22ff00bb 100644--- a/src/engine/ExportJobManager.cpp+++ b/src/engine/ExportJobManager.cpp@@ -39,7 +39,7 @@ struct Shared {};static_assert(std::is_trivially_copyable_v<Shared>);void close(HANDLE& h){if(h&&h!=INVALID_HANDLE_VALUE)CloseHandle(h);h=nullptr;}-const wchar_t* label(ExportState s){switch(s){case ExportState::Preparing:return L"正在准备独立导出任务";case ExportState::Running:return L"正在编码";case ExportState::Paused:return L"导出已暂停,观看继续";case ExportState::Finishing:return L"正在封装和保存输出";case ExportState::Cancelling:return L"正在取消并回收任务";case ExportState::Succeeded:return L"导出完成";case ExportState::Failed:return L"导出失败;详见独立任务日志";case ExportState::Cancelled:return L"导出已取消";default:return L"尚无导出任务";}}+const wchar_t* label(ExportState s){switch(s){case ExportState::Preparing:return L"正在准备独立导出任务";case ExportState::Running:return L"正在编码";case ExportState::Paused:return L"导出已暂停";case ExportState::Finishing:return L"正在封装和保存输出";case ExportState::Cancelling:return L"正在取消并回收任务";case ExportState::Succeeded:return L"导出完成";case ExportState::Failed:return L"导出失败;详见独立任务日志";case ExportState::Cancelled:return L"导出已取消";default:return L"尚无导出任务";}}}std::wstring reserveExportTemporaryFile(const std::wstring& output, std::wstring& error) {static std::atomic<uint64_t> sequence{0};@@ -60,6 +60,9 @@ bool removeExportTemporaryFile(const std::wstring& path, std::wstring& error) {struct ExportJobManager::Impl {HANDLE mapping=nullptr,process=nullptr,job=nullptr;Shared* shared=nullptr;ExportJobSnapshot snapshot;ULONGLONG cancelAt=0,startTick=0;+ // Time spent paused is not encoding time: the estimate left it in, so a paused+ // export's remaining time kept growing (field report 2026-10-02).+ ULONGLONG pausedAt=0,pausedTotal=0;struct Request { std::wstring input,output; EnhancementSettings settings; bool hevc=false; unsigned maxFrames=0; int audioStreamIndex=-1; double trimStart=0,trimEnd=0; sink::ExportRateControl rateControl=sink::ExportRateControl::Cq; };std::deque<Request> queue;uint64_t queueFailures=0;std::wstring lastQueueFailure;bool launchingQueued=false;@@ -132,7 +135,7 @@ bool ExportJobManager::start(const std::wstring& input,const std::wstring& outpuif(!started)return fail(L"无法启动导出进程");p_->process=pi.hProcess;if(!AssignProcessToJobObject(p_->job,p_->process)){TerminateProcess(p_->process,1);CloseHandle(pi.hThread);return fail(L"导出进程隔离失败");}if(ResumeThread(pi.hThread)==DWORD(-1)){TerminateProcess(p_->process,1);CloseHandle(pi.hThread);return fail(L"无法运行导出进程");}CloseHandle(pi.hThread);- p_->snapshot.state=ExportState::Preparing;p_->snapshot.output=output;p_->snapshot.jobId=(GetTickCount64()<<16)^pi.dwProcessId;p_->snapshot.frozenRevision=settings.revision;p_->snapshot.frozen=s.settings;p_->startTick=GetTickCount64();+ p_->snapshot.state=ExportState::Preparing;p_->snapshot.output=output;p_->snapshot.jobId=(GetTickCount64()<<16)^pi.dwProcessId;p_->snapshot.frozenRevision=settings.revision;p_->snapshot.frozen=s.settings;p_->startTick=GetTickCount64();p_->pausedAt=p_->pausedTotal=0;p_->snapshot.workerPid=pi.dwProcessId;p_->snapshot.workerLog=std::filesystem::absolute(runtime::logsDirectory()/std::format("export-worker-{}.log",pi.dwProcessId)).wstring();log::info("export-worker",std::format("started jobId={} pid={} frozenRevision={} nativeNR=true independentPlayback=true log={}",p_->snapshot.jobId,pi.dwProcessId,settings.revision,std::filesystem::path(p_->snapshot.workerLog).string()));return true;@@ -146,14 +149,19 @@ bool ExportJobManager::enqueue(const std::wstring& input,const std::wstring& outvoid ExportJobManager::clearQueue(){p_->queue.clear();}size_t ExportJobManager::queuedCount() const{return p_->queue.size();}void ExportJobManager::cancel(){if(p_->shared){InterlockedExchange(&p_->shared->cancel,1);if(!p_->cancelAt)p_->cancelAt=GetTickCount64();p_->snapshot.state=ExportState::Cancelling;p_->snapshot.message=L"正在取消并回收任务";}p_->queue.clear();}-void ExportJobManager::pause(bool v){if(p_->shared)InterlockedExchange(&p_->shared->pause,v);}+void ExportJobManager::pause(bool v){+ if(!p_->shared)return;InterlockedExchange(&p_->shared->pause,v);+ const auto now=GetTickCount64();+ if(v&&!p_->pausedAt)p_->pausedAt=now;+ else if(!v&&p_->pausedAt){p_->pausedTotal+=now-p_->pausedAt;p_->pausedAt=0;}+}void ExportJobManager::watching(bool v){if(p_->shared)InterlockedExchange(&p_->shared->watching,v);}ExportJobSnapshot ExportJobManager::poll(){if(!p_->shared&&!p_->queue.empty())p_->startNext(*this);p_->snapshot.queueFailures=p_->queueFailures;p_->snapshot.lastQueueFailure=p_->lastQueueFailure;if(!p_->shared){p_->snapshot.queuePosition=0;p_->snapshot.queued=p_->queue.size();return p_->snapshot;}auto& s=*p_->shared;p_->snapshot.sourceFrames=InterlockedCompareExchange64(&s.sourceFrames,0,0);p_->snapshot.generated=InterlockedCompareExchange64(&s.generated,0,0);p_->snapshot.holds=InterlockedCompareExchange64(&s.holds,0,0);p_->snapshot.encoded=InterlockedCompareExchange64(&s.encoded,0,0);p_->snapshot.state=static_cast<ExportState>(InterlockedCompareExchange(&s.state,0,0));p_->snapshot.progress=InterlockedCompareExchange(&s.progress,0,0)/10000.0;p_->snapshot.queued=p_->queue.size();p_->snapshot.queuePosition=p_->queue.empty()?0:1;- if(p_->snapshot.progress>0.001&&p_->startTick){const double elapsed=double(GetTickCount64()-p_->startTick)/1000.0;p_->snapshot.etaSeconds=std::max(0.0,elapsed*(1.0-p_->snapshot.progress)/p_->snapshot.progress);}else p_->snapshot.etaSeconds=0;+ if(p_->snapshot.progress>0.001&&p_->startTick){const auto now=GetTickCount64();const double elapsed=double(now-p_->startTick-p_->pausedTotal-(p_->pausedAt?now-p_->pausedAt:0))/1000.0;p_->snapshot.etaSeconds=std::max(0.0,elapsed*(1.0-p_->snapshot.progress)/p_->snapshot.progress);}else p_->snapshot.etaSeconds=0;if(p_->cancelAt&&GetTickCount64()-p_->cancelAt>5000&&WaitForSingleObject(p_->process,0)==WAIT_TIMEOUT)TerminateJobObject(p_->job,3);if(WaitForSingleObject(p_->process,0)==WAIT_OBJECT_0){DWORD code=1;GetExitCodeProcess(p_->process,&code);p_->snapshot.state=code==0?ExportState::Succeeded:code==3||p_->cancelAt?ExportState::Cancelled:ExportState::Failed;if(code==0)p_->snapshot.progress=1;// Preserve the worker's actual outcome, including codec substitutions.diff --git a/src/ui/QmlPlayerBridge.cpp b/src/ui/QmlPlayerBridge.cppindex 34367915..285253e4 100644--- a/src/ui/QmlPlayerBridge.cpp+++ b/src/ui/QmlPlayerBridge.cpp@@ -232,8 +232,9 @@ struct QmlPlayerBridge::Impl {uint64_t imageCompletionEvent=0;engine::ExportJobSnapshot exportSnapshot;bool exportHevc = false;- uint32_t exportBitrateMbps = 0;- sink::ExportRateControl exportRateControl = sink::ExportRateControl::Cq;+ // Default: VBR at 8 Mbps (field request 2026-10-02); CQ stays one tap away.+ uint32_t exportBitrateMbps = 8;+ sink::ExportRateControl exportRateControl = sink::ExportRateControl::Vbr;int exportResolutionIndex = -1;double exportTrimStartSeconds = 0.0;double exportTrimEndSeconds = 0.0;@@ -4258,7 +4259,7 @@ bool QmlPlayerBridge::setPreference(const QString& key, const QVariant& value) {{"subtitleMargin", {0, 240}}, {"subtitleLines", {0, 8}}};static const QStringList flags{"subtitleEnabled", "subtitleBackground", "subtitleFit","subtitleSecondLanguage", "audioForceStereo", "holdCompare",- "magewellLowLatency", "cinePillHidden"};+ "magewellLowLatency", "cinePillHidden", "exportStopsPlayback"};QVariant stored;if (ranges.contains(key)) {bool ok = false; const int n = value.toInt(&ok);@@ -4525,6 +4526,12 @@ void QmlPlayerBridge::startExport() {emit notice(utf8Of(reason),true);emit exportChanged();return;}impl_->exportQueue.refresh();pollExport();emit navigate(QStringLiteral("exp"));+ // Leave the GPU to the export (field request 2026-10-02): whatever plays is closed,+ // unless 导出页 → 导出时关闭正在播放的内容 is off.+ if(impl_->prefBool("exportStopsPlayback",true)&&(hasSource()||impl_->openingSource)){+ veyra::log::info("qml-export","export started: closing the playing source");+ stopPlayback();emit notice(tr("已关闭正在播放的内容,显卡全部留给导出"),false);+ }}void QmlPlayerBridge::cancelExport() {impl_->exportQueue.queue().cancel();impl_->exportQueue.refresh();pollExport();emit exportChanged();