Created
December 19, 2014 16:22
-
-
Save hcooper/f33fc6deb92fd50c7b56 to your computer and use it in GitHub Desktop.
fix video stabilization in kdenlive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /tmp/kdenlive-0.9.10/src/project/projectlist.cpp 2014-10-05 10:55:35.000000000 +0100 | |
+++ src/project/projectlist.cpp 2014-12-19 16:05:33.906585717 +0000 | |
@@ -3648,9 +3648,10 @@ | |
// producer params | |
preParams << jobParams.takeFirst(); | |
// filter name | |
- preParams << jobParams.takeFirst(); | |
+ QString filterName = jobParams.takeFirst(); | |
+ preParams << filterName; | |
// filter params | |
- preParams << jobParams.takeFirst(); | |
+ QString filterParams = jobParams.takeFirst(); | |
// consumer | |
QString consumer = jobParams.takeFirst(); | |
@@ -3667,11 +3668,25 @@ | |
} | |
jobArgs << preParams; | |
if (ids.count() == 1) { | |
- jobArgs << consumer + ':' + destination; | |
+ // Append a 'filename' paramater for saving vidstab data | |
+ if (filterName == "vidstab") { | |
+ QString trffile = destination + ".trf"; | |
+ jobArgs << filterParams + QString(" filename=%1").arg(trffile) << consumer + ':' + destination; | |
+ } else { | |
+ jobArgs << filterParams << consumer + ':' + destination; | |
+ } | |
} | |
else { | |
- jobArgs << consumer + ':' + destination + item->clipUrl().fileName() + ".mlt"; | |
+ QString mltfile = destination + item->clipUrl().fileName() + ".mlt"; | |
+ if (filterName == "vidstab") { | |
+ QString trffile = mltfile + ".trf"; | |
+ jobArgs << filterParams + QString(" filename=%1").arg(trffile) << consumer + ':' + mltfile; | |
+ } else { | |
+ jobArgs << filterParams << consumer + ':' + mltfile; | |
+ } | |
} | |
+ | |
+ kDebug() << jobArgs; | |
jobArgs << jobParams; | |
MeltJob *job = new MeltJob(item->clipType(), id, jobArgs, extraParams); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context: https://forum.kde.org/viewtopic.php?f=265&t=124082