1 /***************************************************************************
2 * Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
21 #include <QCoreApplication>
22 #include <QStringList>
26 #include "renderjob.h"
28 int main(int argc, char **argv) {
29 QCoreApplication app(argc, argv);
30 QStringList args = app.arguments();
34 if (!args.isEmpty()) args.takeFirst();
35 if (args.count() >= 4) {
37 if (args.at(0) == "-erase") {
41 bool usekuiserver = false;
42 if (args.at(0) == "-kuiserver") {
46 if (args.at(0).startsWith("in=")) {
47 in = args.at(0).section('=', -1).toInt();
50 if (args.at(0).startsWith("out=")) {
51 out = args.at(0).section('=', -1).toInt();
54 if (args.at(0).startsWith("preargs=")) {
55 QString a = args.at(0).section('=', 1);
56 preargs = a.split(" ", QString::SkipEmptyParts);
59 QString render = args.at(0);
61 QString profile = args.at(0);
63 QString rendermodule = args.at(0);
65 QString player = args.at(0);
67 QString src = args.at(0);
69 QString dest = args.at(0);
71 qDebug() << "//STARTING RENDERING: " << erase << "," << usekuiserver << "," << render << "," << profile << "," << rendermodule << "," << player << "," << src << "," << dest << "," << preargs << "," << args << "," << in << "," << out ;
72 RenderJob *job = new RenderJob(erase, usekuiserver, render, profile, rendermodule, player, src, dest, preargs, args, in, out);
76 fprintf(stderr, "Kdenlive video renderer for MLT.\nUsage: "
77 "kdenlive_render [-erase] [-kuiserver] [in=pos] [out=pos] [render] [profile] [rendermodule] [player] [src] [dest] [[arg1] [arg2] ...]\n"
78 " -erase: if that parameter is present, src file will be erased at the end\n"
79 " -kuiserver: if that parameter is present, use KDE job tracker\n"
80 " in=pos: start rendering at frame pos\n"
81 " out=pos: end rendering at frame pos\n"
82 " render: path to inigo render\n"
83 " profile: the MLT video profile\n"
84 " rendermodule: the MLT consumer used for rendering, usually it is avformat\n"
85 " player: path to video player to play when rendering is over, use '-' to disable playing\n"
86 " src: source file (usually westley playlist)\n"
87 " dest: destination file\n"
88 " args: space separated libavformat arguments\n");