Commit ac3152fa authored by Vincent Pinon's avatar Vincent Pinon

Render transparent videos

parent b2080c4c
Pipeline #1603 passed with stage
in 21 minutes and 45 seconds
......@@ -10,6 +10,7 @@
audiobitrates="192,64" defaultaudiobitrate="160"
args="properties=x264-medium f=mp4 vcodec=libx264 acodec=aac g=120 crf=%quality ab=%audiobitrate+'k'"
speeds="preset=slower;preset=medium;preset=faster;preset=ultrafast"/>
<profile name="Transparent" extension="mov" args="vcodec=qtrle pix_fmt=argb"/>
<profile name="MPEG-2" extension="mpg"
qualities="3,15" defaultquality="5"
audioqualities="3,7" defaultaudioquality="3"
......
......@@ -1425,6 +1425,31 @@ void RenderWidget::generateRenderFiles(QDomDocument doc, const QString &playlist
exportAudio = selectedAudioExport();
}
if (renderArgs.contains(QLatin1String("pix_fmt=argb"))
|| renderArgs.contains(QLatin1String("pix_fmt=abgr"))
|| renderArgs.contains(QLatin1String("pix_fmt=bgra"))
|| renderArgs.contains(QLatin1String("pix_fmt=gbra"))
|| renderArgs.contains(QLatin1String("pix_fmt=rgba"))
|| renderArgs.contains(QLatin1String("pix_fmt=yuva"))
|| renderArgs.contains(QLatin1String("pix_fmt=ya" ))
|| renderArgs.contains(QLatin1String("pix_fmt=ayuv"))) {
auto prods = doc.elementsByTagName(QStringLiteral("producer"));
for (int i = 0; i < prods.count(); ++i) {
auto prod = prods.at(i).toElement();
if (prod.attribute(QStringLiteral("id")) == QStringLiteral("black_track")) {
auto props = prod.elementsByTagName(QStringLiteral("property"));
for (int j = 0; j < props.count(); ++j) {
auto prop = props.at(i).toElement();
if (prop.attribute(QStringLiteral("name")) == QStringLiteral("resource")) {
prop.firstChild().setNodeValue(QStringLiteral("transparent"));
break;
}
}
break;
}
}
}
// disable audio if requested
if (!exportAudio) {
consumer.setAttribute(QStringLiteral("an"), 1);
......
......@@ -1372,9 +1372,6 @@ void MainWindow::setupActions()
m_saveAction = KStandardAction::save(pCore->projectManager(), SLOT(saveFile()), actionCollection());
m_saveAction->setIcon(QIcon::fromTheme(QStringLiteral("document-save")));
addAction(QStringLiteral("save_selection"), i18n("Save Selection"), pCore->projectManager(), SLOT(slotSaveSelection()),
QIcon::fromTheme(QStringLiteral("document-save")));
QAction *sentToLibrary = addAction(QStringLiteral("send_library"), i18n("Add Timeline Selection to Library"), pCore->library(), SLOT(slotAddToLibrary()),
QIcon::fromTheme(QStringLiteral("bookmark-new")));
sentToLibrary->setEnabled(false);
......
Markdown is supported
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