Commit 97608921 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix proxy resize with nvenc

parent b3e78332
Pipeline #211503 passed with stage
in 7 minutes and 58 seconds
......@@ -265,6 +265,7 @@ void ProxyTask::run()
// Automatic setting, decide based on hw support
proxyParams = pCore->currentDoc()->getAutoProxyProfile();
}
int proxyResize = pCore->currentDoc()->getDocumentProperty(QStringLiteral("proxyresize")).toInt();
bool nvenc = proxyParams.contains(QStringLiteral("%nvcodec"));
if (nvenc) {
QString pix_fmt = binClip->videoCodecProperty(QStringLiteral("pix_fmt"));
......@@ -282,7 +283,7 @@ void ProxyTask::run()
supported = false;
}
if (proxyParams.contains(QStringLiteral("%frameSize"))) {
int w = 640;
int w = proxyResize;
int h = 0;
int oW = binClip->getProducerProperty(QStringLiteral("meta.media.width")).toInt();
int oH = binClip->getProducerProperty(QStringLiteral("meta.media.height")).toInt();
......@@ -300,14 +301,13 @@ void ProxyTask::run()
proxyParams.replace(QStringLiteral("%nvcodec"), codec);
} else {
proxyParams = proxyParams.section(QStringLiteral("-i"), 1);
proxyParams.replace(QStringLiteral("scale_cuda"), QStringLiteral("scale"));
proxyParams.replace(QStringLiteral("scale_npp"), QStringLiteral("scale"));
if (!supportedPixFmts.contains(pix_fmt)) {
proxyParams.prepend(QStringLiteral("-pix_fmt yuv420p"));
proxyParams.prepend(QStringLiteral("-pix_fmt yuv420p "));
}
proxyParams.replace(QStringLiteral("scale_cuda"), QStringLiteral("scale"));
proxyParams.replace(QStringLiteral("scale_npp"), QStringLiteral("scale"));
}
}
int proxyResize = pCore->currentDoc()->getDocumentProperty(QStringLiteral("proxyresize")).toInt();
proxyParams.replace(QStringLiteral("%width"), QString::number(proxyResize));
bool disableAutorotate = binClip->getProducerProperty(QStringLiteral("autorotate")) == QLatin1String("0");
if (disableAutorotate || proxyParams.contains(QStringLiteral("-noautorotate"))) {
......
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