Commit e8a7a30b authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

Fix missing audio with "WebM-VP9/Opus (libre)" preset

Related to #1439

CCBUG: 452950
FIXED-IN: 22.04.1
parent 6e3a0c21
Pipeline #181448 passed with stage
in 9 minutes and 41 seconds
......@@ -19,8 +19,8 @@
<group name="Ultra-High Definition (4K)" renderer="avformat" type="av">
<profile name="WebM-VP9/Opus (libre)" extension="webm"
qualities="15,45" defaultquality="25"
audioqualities="7,3" defaultaudioquality="5"
args="f=webm vcodec=libvpx-vp9 crf=%quality vb=15M qcomp=1 g=15 row-mt=1 tile-columns=4 frame-parallel=1 acodec=libopus aq=%audioquality"/>
audioqualities="10,0" defaultaudioquality="5"
args="f=webm vcodec=libvpx-vp9 crf=%quality vb=15M qcomp=1 g=15 row-mt=1 tile-columns=4 frame-parallel=1 acodec=libopus compression_level=%audioquality"/>
<profile name="WebM-AV1/Opus (libre)" extension="webm"
qualities="15,45" defaultquality="25"
audiobitrates="256,64" defaultaudiobitrate="160"
......
......@@ -64,6 +64,7 @@ RenderPresetDialog::RenderPresetDialog(QWidget *parent, RenderPresetModel *prese
QStringLiteral("qp_b"),
QStringLiteral("ab"),
QStringLiteral("aq"),
QStringLiteral("compression_level"),
QStringLiteral("vbr"),
QStringLiteral("ar"),
QStringLiteral("display_aspect_num"),
......@@ -307,6 +308,9 @@ RenderPresetDialog::RenderPresetDialog(QWidget *parent, RenderPresetModel *prese
audioSampleRate->setCurrentText(preset->getParam(QStringLiteral("ar")));
QString aqParam = preset->getParam(QStringLiteral("aq"));
if (aqParam.isEmpty()) {
aqParam = preset->getParam(QStringLiteral("compression_level"));
}
if (aqParam.contains(QStringLiteral("%audioquality"))) {
aQuality->setValue(preset->defaultAQuality().toInt());
} else {
......@@ -704,9 +708,7 @@ void RenderPresetDialog::slotUpdateParams() {
}
} else if (acodec == "libopus") {
params.append(QStringLiteral("vbr=on"));
// TODO
//params.append(QStringLiteral("compression_level= "));
//setIfNotSet(p, "compression_level", TO_ABSOLUTE(0, 10, ui->audioQualitySpinner->value()));
params.append(QStringLiteral("compression_level=%audioquality"));
} else {
params.append(QStringLiteral("aq=%audioquality"));
}
......
......@@ -279,7 +279,7 @@ QStringList RenderPresetModel::audioQualities() const
QString acodec = getParam(QStringLiteral("acodec")).toLower();
if (acodec == "libmp3lame") {
return {"0", "9"};
} else if (acodec == "libvorbis" || acodec == "vorbis") {
} else if (acodec == "libvorbis" || acodec == "vorbis" || acodec == "libopus") {
return {"10", "0"};
} else {
return {"500", "0"};
......
......@@ -44,10 +44,10 @@
<layout class="QGridLayout" name="gridLayout_2">
<item row="8" column="0">
<widget class="KMessageWidget" name="infoMessage">
<property name="wordWrap" stdset="0">
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="closeButtonVisible" stdset="0">
<property name="closeButtonVisible">
<bool>false</bool>
</property>
</widget>
......@@ -105,13 +105,19 @@
</widget>
</item>
<item>
<widget class="KUrlRequester" name="out_file" native="true">
<widget class="KUrlRequester" name="out_file">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="toolTip">
<string>Select output destination</string>
</property>
<property name="mode">
<set>KFile::File</set>
</property>
<property name="acceptMode">
<enum>QFileDialog::AcceptSave</enum>
</property>
</widget>
</item>
</layout>
......@@ -438,8 +444,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>354</width>
<height>853</height>
<width>334</width>
<height>855</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
......@@ -936,7 +942,7 @@
</item>
<item row="2" column="0" colspan="6">
<widget class="KMessageWidget" name="jobInfo">
<property name="closeButtonVisible" stdset="0">
<property name="closeButtonVisible">
<bool>false</bool>
</property>
</widget>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment