]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/NexuizDemoRecorder/main/src/main/resources/help/html/plugin-architecture.html
Merge branch 'master' of ssh://git.xonotic.org/xonotic
[xonotic/xonotic.git] / misc / tools / NexuizDemoRecorder / main / src / main / resources / help / html / plugin-architecture.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
2
3 <html>
4   <head>
5     <meta name="generator" content="HTML Tidy, see www.w3.org">
6
7     <title></title>
8   </head>
9
10   <body>
11 <H1>Plug-in architecture</H1>
12 <H2>Introduction</H2>
13 <P>While the Nexuiz Demo Recorder (NDR)
14 saves you a lot of time, what many video editors still need to do is
15 to transcode/convert/encode/you-name-it the resulting huge avi clip
16 to another (lossless) format. Or, if you are not an editor but just a
17 player who wants to distribute the recorded clip, unless you had
18 Nexuiz encode the clip in the Ogg Theora codec (cl_capturevideo_ogg
19 1), you might want to encode it in XviD, H.264 or some other lossy
20 codec. For encoding people use all different kinds of tools. Some
21 have a GUI, some don't. Some are available on just one platform, some
22 are cross-platform to some extent. However, since this release the
23 NDR is now able to also encode clips to whatever format you like by
24 the use of <B>encoder plug-ins</B>. For this the NDR has been
25 extended with a plug-in architecture that will look for plug-ins in
26 the &ldquo;plugins&rdquo; folder. NDR plug-ins are basically just a
27 bridge between the NDR application and an actual encoder. Examples
28 for actual encoders are <B>VirtualDub</B> for MS Windows, or <B>mencoder</B>
29 for Linux. What a plug-in will do is to assemble a command line that
30 will execute this encoder and hand it the required parameters.</P>
31 <H2>Extension is easy</H2>
32 <P>In this release the NDR ships with
33 just one plug-in: the VirtualDub plug-in. However, if you are a Java
34 developer it is really easy for you to write your own plug-ins that
35 will be able to handle whatever encoder you want to use. If you are
36 interested, have a look into the <B>src</B> folder at the <B>Sample
37 Plugin</B>. All you need to do is to implement an interface, edit
38 some meta-information files and build a jar file that is being put
39 into the <B>plugins</B> directory of the NDR.</P>
40 <H2>Plug-in settings</H2>
41 <P>Each plug-in allows the user to
42 interact with it, by offering settings (or &ldquo;preferences&rdquo;).
43 There are 2 kinds of settings:</P>
44 <UL>
45         <LI><P>Global settings, which will be
46         shown in the File &rarr; Preferences dialog</P>
47         <LI><P>Job/template-specific settings,
48         which will be shown in the dialog you use when creating or editing
49         jobs or templates</P>
50 </UL>
51 <H2>Use plug-ins later on</H2>
52 <P>In order to invoke the functionality
53 of the plug-in you are not required to set up everything at the very
54 beginning (before the clip has actually been recorded). Of course,
55 you can do so, and in this case the job would be recorded and, right
56 after that, be encoded as well. But you can also choose to have jobs
57 recorded first, and then later when you see the need to encode them,
58 edit the job settings (add your plug-in settings there), and then
59 right-click the job and select &ldquo;just run the xyz plug-in&rdquo;.
60 Basically this menu item will work on any job with status = <B>done</B>.</P>
61 <P>Of course you may not move the
62 recorded clip from the destination that you set up, because otherwise
63 the plug-in would not find the file to encode it.</P>
64 <H2>Error handling</H2>
65 <P>In case something went wrong during
66 the execution of the plug-in itself, you will see a &ldquo;plug-in
67 error&rdquo; in the <B>status</B> column of the jobs table. Like for
68 normal &ldquo;errors&rdquo;, you can right-click the job and click on
69 &ldquo;show error message&rdquo; in order to see the error message of
70 the plug-in. In case you can repair whatever went wrong, do so, then
71 right-click the job and click on &ldquo;reset job status to <B>done</B>&rdquo;.
72 Then you can run the plug-in again.</P>
73 <P>If a plug-in appeared to do its job
74 just fine but you suspect that something went wrong, you might want
75 to have a look at the <B>logs</B> directory in the NDR folder.
76 Depending on whether the one who created the plug-in implemented it,
77 you might see log files which are basically text files containing the
78 output of the encoder itself.</P>
79   </body>
80 </html>
81