From 6b12eddfba654300833e3806d83011d978480f2c Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 2 Feb 2020 16:46:42 -0800 Subject: [PATCH] FFmpeg: Add more presets --- CHANGES | 1 + src/platform/qt/VideoView.cpp | 17 +++++++++++++++++ src/platform/qt/VideoView.ui | 24 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/CHANGES b/CHANGES index 2d05514df..74c367ca8 100644 --- a/CHANGES +++ b/CHANGES @@ -32,6 +32,7 @@ Other fixes: - Qt: Fix GIF view not allowing manual filename entry - Util: Fix crash reading invalid ELFs Misc: + - FFmpeg: Add more presets - Qt: Renderer can be changed while a game is running - Qt: Fix non-SDL build (fixes mgba.io/i/1656) - Switch: Make OpenGL scale adjustable while running diff --git a/src/platform/qt/VideoView.cpp b/src/platform/qt/VideoView.cpp index 94557900c..9f3767ea2 100644 --- a/src/platform/qt/VideoView.cpp +++ b/src/platform/qt/VideoView.cpp @@ -112,6 +112,15 @@ VideoView::VideoView(QWidget* parent) void VideoView::updatePresets() { m_presets.clear(); + addPreset(m_ui.preset4K, { + .container = QString(), + .vcodec = QString(), + .acodec = QString(), + .vbr = 0, + .abr = 0, + .dims = maintainAspect(QSize(3840, 2160)) + }); + addPreset(m_ui.preset1080, { .container = QString(), .vcodec = QString(), @@ -177,6 +186,14 @@ void VideoView::updatePresets() { .abr = 128 }); + addPreset(m_ui.presetMP4, { + .container = "MP4", + .vcodec = "h.264", + .acodec = "AAC", + .vbr = 800, + .abr = 128 + }); + if (m_nativeWidth && m_nativeHeight) { addPreset(m_ui.presetLossless, { .container = "MKV", diff --git a/src/platform/qt/VideoView.ui b/src/platform/qt/VideoView.ui index 24a3c5e75..0b1536e48 100644 --- a/src/platform/qt/VideoView.ui +++ b/src/platform/qt/VideoView.ui @@ -133,6 +133,13 @@ + + + + MP4 + + + @@ -150,6 +157,13 @@ + + + + 4K + + + @@ -289,6 +303,11 @@ FFV1 + + + None + + @@ -326,6 +345,11 @@ Uncompressed + + + None + +