Skip to content

Commit

Permalink
use null file for first pass of dual pass encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Oct 20, 2020
1 parent ddfb53b commit 927de3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/docks/encodedock.cpp
Expand Up @@ -45,6 +45,11 @@
static const int kOpenCaptureFileDelayMs = 1500;
static const qint64 kFreeSpaceThesholdGB = 25LL * 1024 * 1024 * 1024;
static const int kCustomPresetFileNameRole = Qt::UserRole + 1;
#ifdef Q_OS_WIN
static const QString kNullTarget = "nul";
#else
static const QString kNullTarget = "/dev/null";
#endif

static double getBufferSize(Mlt::Properties& preset, const char* property);

Expand Down Expand Up @@ -947,7 +952,7 @@ MeltJob* EncodeDock::createMeltJob(Mlt::Producer* service, const QString& target
else
dom.documentElement().insertAfter(consumerNode, profiles.at(profiles.length() - 1));
consumerNode.setAttribute("mlt_service", "avformat");
consumerNode.setAttribute("target", mytarget);
consumerNode.setAttribute("target", pass == 1? kNullTarget : mytarget);
collectProperties(consumerNode, realtime);
if ("libx265" == ui->videoCodecCombo->currentText()) {
if (pass == 1 || pass == 2) {
Expand Down

0 comments on commit 927de3b

Please sign in to comment.