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>
25 #include "renderjob.h"
27 int main(int argc, char **argv) {
28 QCoreApplication app(argc, argv);
29 QStringList args = app.arguments();
32 if (!args.isEmpty()) args.takeFirst();
33 if (args.count() >= 4) {
35 if (args.at(0) == "-erase") {
39 if (args.at(0).startsWith("in=")) {
40 in = args.at(0).section('=', -1).toInt();
43 if (args.at(0).startsWith("out=")) {
44 out = args.at(0).section('=', -1).toInt();
47 QString render = args.at(0);
49 QString rendermodule = args.at(0);
51 QString player = args.at(0);
53 QString src = args.at(0);
55 QString dest = args.at(0);
57 RenderJob *job = new RenderJob(erase, render, rendermodule, player, src, dest, args, in, out);
61 fprintf(stderr, "Kdenlive video renderer for MLT.\nUsage: "
62 "kdenlive_render [-erase] [in=pos] [out=pos] [renderer] [player] [src] [dest] [[arg1] [arg2] ...]\n"
63 " -erase: if that parameter is present, src file will be erased at the end\n"
64 " in=pos: start rendering at frame pos\n"
65 " out=pos: end rendering at frame pos\n"
66 " render: path to inigo rendrer\n"
67 " rendermodule: the MLT consumer used for rendering, usually it is avformat\n"
68 " player: path to video player to play when rendering is over, use '-' to disable playing\n"
69 " src: source file (usually westley playlist)\n"
70 " dest: destination file\n"
71 " args: space separated libavformat arguments\n");