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

[Scene Split] reimplement threshold

parent 2a44964b
Pipeline #195726 passed with stage
in 7 minutes and 39 seconds
......@@ -27,8 +27,9 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <klocalizedstring.h>
#include <project/projectmanager.h>
SceneSplitTask::SceneSplitTask(const ObjectId &owner, double threshold, int markersCategory, bool addSubclips, int minDuration, QObject* object)
SceneSplitTask::SceneSplitTask(const ObjectId &owner, double threshold, int markersCategory, bool addSubclips, int minDuration, QObject *object)
: AbstractTask(owner, AbstractTask::ANALYSECLIPJOB, object)
, m_threshold(threshold)
, m_jobDuration(0)
, m_markersType(markersCategory)
, m_subClips(addSubclips)
......@@ -129,8 +130,20 @@ void SceneSplitTask::run()
}
m_jobDuration = int(binClip->duration().seconds());
int producerDuration = binClip->frameDuration();
//QStringList parameters = {QStringLiteral("-loglevel"),QStringLiteral("info"),QStringLiteral("-i"),source,QStringLiteral("-filter:v"),QString("scdet"),QStringLiteral("-f"),QStringLiteral("null"),QStringLiteral("-")};
QStringList parameters = {QStringLiteral("-y"),QStringLiteral("-loglevel"),QStringLiteral("info"),QStringLiteral("-i"),source,QStringLiteral("-filter:v"),QString("select='gt(scene,0.1)',showinfo"),QStringLiteral("-vsync"),QStringLiteral("vfr"),QStringLiteral("-f"),QStringLiteral("null"),QStringLiteral("-")};
// QStringList parameters =
// {QStringLiteral("-loglevel"),QStringLiteral("info"),QStringLiteral("-i"),source,QStringLiteral("-filter:v"),QString("scdet"),QStringLiteral("-f"),QStringLiteral("null"),QStringLiteral("-")};
QStringList parameters = {QStringLiteral("-y"),
QStringLiteral("-loglevel"),
QStringLiteral("info"),
QStringLiteral("-i"),
source,
QStringLiteral("-filter:v"),
QString("select='gt(scene,%1)',showinfo").arg(m_threshold),
QStringLiteral("-vsync"),
QStringLiteral("vfr"),
QStringLiteral("-f"),
QStringLiteral("null"),
QStringLiteral("-")};
m_jobProcess.reset(new QProcess);
//m_jobProcess->setStandardErrorFile("/tmp/test_settings.txt");
......
......@@ -25,6 +25,7 @@ private slots:
void processLogErr();
private:
double m_threshold;
int m_jobDuration;
int m_markersType;
bool m_subClips;
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>366</width>
<width>369</width>
<height>194</height>
</rect>
</property>
......@@ -77,7 +77,7 @@
<number>1</number>
</property>
<property name="value">
<number>30</number>
<number>10</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
......
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