26.10.2025, 13:53
32k is just a random limit for the chunk size. (I needed to set some limit)
At the moment the amount of chunks, is determined by:
a. the length of the video
b. the number of scene changes
c. the minimal chunk size (= minimal number of frames in a chunk). This needed to avoid creating tons of chunks due to scene changes.
What Hybrid does is run a scene change detection.
Go through these scene changes and create a list of trims, which respecting 'minimal chunk size'.
For each of the resulting trims, Hybrid will later create a separate chunk to encode.
Yes, other code to create trims could be written, but I don't plan on doing that atm. .
(no time, trying to get Hybrids build and deploy scripts working atm.)
I also don't see why using a decent chunk size and limiting the number of parallel processed sub jobs isn't enough.
Cu Selur
At the moment the amount of chunks, is determined by:
a. the length of the video
b. the number of scene changes
c. the minimal chunk size (= minimal number of frames in a chunk). This needed to avoid creating tons of chunks due to scene changes.
What Hybrid does is run a scene change detection.
Go through these scene changes and create a list of trims, which respecting 'minimal chunk size'.
For each of the resulting trims, Hybrid will later create a separate chunk to encode.
void JobGeneration::collectedSceneChanges(const QStringList& sceneChanges)
{
int minSceneChangeSize = m_currentParameters.modelHandler()->getGlobalDataModel()->intValue(QString("minChunkSceneSize"));
m_sceneChangeTrims.clear();
int current = -1;
int previous = -1;
int count = sceneChanges.count();
if (count == 0) {
sendMessage(HERROR, QString("Failed detecting scene changes,.."));
return;
}
count = 0;
foreach(QString line, sceneChanges) {
line = line.trimmed();
if (line.isEmpty() || line.startsWith(HASH)) {
continue;
}
current++;
if (!line.startsWith(QString("i"))) {
continue;
}
if (previous == -1) {
previous = current;
continue;
}
if ((current-previous) < minSceneChangeSize) {
continue;
}
count++;
m_sceneChangeTrims << QString("%1,%2").arg(previous).arg(current-1);
previous = current;
}
sendMessage(HLOG, QString("Found %1 scene changes,..").arg(count));
m_sceneChangeTrims << QString("%1,%2").arg(previous).arg(current);
this->createJob();
}Yes, other code to create trims could be written, but I don't plan on doing that atm. .
(no time, trying to get Hybrids build and deploy scripts working atm.)
I also don't see why using a decent chunk size and limiting the number of parallel processed sub jobs isn't enough.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.

