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 if (args.at(0).startsWith("in=")) {
42 in = args.at(0).section('=', -1).toInt();
45 if (args.at(0).startsWith("out=")) {
46 out = args.at(0).section('=', -1).toInt();
49 if (args.at(0).startsWith("preargs=")) {
50 QString a = args.at(0).section('=', 1);
51 preargs = a.split(" ", QString::SkipEmptyParts);
54 QString render = args.at(0);
56 QString profile = args.at(0);
58 QString rendermodule = args.at(0);
60 QString player = args.at(0);
62 QString src = args.at(0);
64 QString dest = args.at(0);
66 qDebug() << "//STARTING RENDERING: " << erase << "," << render << "," << profile << "," << rendermodule << "," << player << "," << src << "," << dest << "," << preargs << "," << args << "," << in << "," << out;
67 RenderJob *job = new RenderJob(erase, render, profile, rendermodule, player, src, dest, preargs, args, in, out);
71 fprintf(stderr, "Kdenlive video renderer for MLT.\nUsage: "
72 "kdenlive_render [-erase] [in=pos] [out=pos] [render] [profile] [rendermodule] [player] [src] [dest] [[arg1] [arg2] ...]\n"
73 " -erase: if that parameter is present, src file will be erased at the end\n"
74 " in=pos: start rendering at frame pos\n"
75 " out=pos: end rendering at frame pos\n"
76 " render: path to inigo render\n"
77 " profile: the MLT video profile\n"
78 " rendermodule: the MLT consumer used for rendering, usually it is avformat\n"
79 " player: path to video player to play when rendering is over, use '-' to disable playing\n"
80 " src: source file (usually westley playlist)\n"
81 " dest: destination file\n"
82 " args: space separated libavformat arguments\n");