Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Mar 14, 2018
1 parent 23f49ad commit 2602711
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
49 changes: 29 additions & 20 deletions Documentation/source/plugins/fr.inria.openfx.RunScript.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,46 @@ RunScript node
Description
-----------

Run a script with the given arguments.
Run a script with the given arguments. This is mostly useful to execute an external program on a set of input images files, which outputs image files. Writers should be connected to each input, so that the image files are written before running the script, and the output of this node should be fed into one or more Readers, which read the images written by the script.

This is mostly useful to execute an external program on a set of input images files, which outputs image files.
Sample section of a node graph which uses RunScript:

Writers should be connected to each input, so that the image files are written before running the script, and the output of this node should be fed into one or more Readers, which read the images written by the script.
::

Sample node graph:
...
^
|
Write([Project]/scriptinput#####.png)
^
|
RunScript1(processes [Project]/scriptinput#####.png, output is [Project]/scriptoutput#####.png)
^
|
Read([Project]/scriptoutput#####.png, set the frame range manually)
^
|
RunScript2(deletes temporary files [Project]/scriptinput#####.png and [Project]/scriptoutput#####.png, optional)
^
|
...

... +- WriteOIIO(scriptinput#####.png) +- RunScript(processes scriptinput#####.png, output is scriptoutput#####.png) +- ReadOIIO(scriptoutput#####.png) +- ...

Keep in mind that the input and output files are never removed in the above graph.

The output of RunScript is a copy of its first input, so that it can be used to execute a script at some point, e.g. to cleanup temporary files, as in:

... +- WriteOIIO(scriptinput#####.png) +- RunScript(processes scriptinput#####.png, output is scriptoutput#####.png) +- ReadOIIO(scriptoutput#####.png) +- RunScript(deletes temporary files scriptinput#####.png and scriptoutput#####.png, optional) +- ...
Keep in mind that the input and output files are never removed in the above graph. The output of RunScript is a copy of its first input.

Each argument may be:

- A filename (connect an input to an upstream Writer, and link the parameter to the output filename of this writer, or link to the input filename of a downstream Reader)

- A floating-point value (which can be linked to any plugin)

- An integer
- A filename (RunScript1 and RunScript2 in the example above should have ``[Project]/scriptinput#####.png`` and ``[Project]/scriptoutput#####.png`` as filename parameters 1 and 2)
- A floating-point value (which can be linked to any plugin)
- An integer
- A string

- A string
Under Unix, the script should begin with a traditional shebang line, e.g. ‘#!/bin/sh’ or ‘#!/usr/bin/env python’ The arguments can be accessed as usual from the script (in a Unix shell-script, argument 1 would be accessed as “$1” - use double quotes to avoid problems with spaces). For example, the script in RunScript2 in the above example would be:

Under Unix, the script should begin with a traditional shebang line, e.g. ‘#!/bin/sh’ or ‘#!/usr/bin/env python’
::

The arguments can be accessed as usual from the script (in a Unix shell-script, argument 1 would be accessed as “$1” - use double quotes to avoid problems with spaces).
#!/bin/sh
rm "$1" "$2"

This plugin uses pstream (http://pstreams.sourceforge.net), which is distributed under the GNU LGPLv3.
This plugin uses pstream (http://pstreams.sourceforge.net), which is distributed under the Boost Software License, Version 1.0.

Inputs
------
Expand Down
4 changes: 3 additions & 1 deletion Documentation/source/plugins/fr.inria.openfx.WriteFFmpeg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ Controls
| | | | | **guess from filename (default)** |
| | | | | **AVI (Audio Video Interleaved) [avi] (avi)**: Compatible with ayuv, cinepak, ffv1, ffvhuff, flv, h263p, huffyuv, jpeg2000, jpegls, ljpeg, mjpeg, mpeg2video, mpeg4, msmpeg4v2, msmpeg4, png, svq1, targa, v308, v408, v410, vc2, libopenjpeg, libtheora, libvpx, libvpx-vp9, libx264, libx264rgb, libxvid, libopenh264. |
| | | | | **FLV (Flash Video) [flv] (flv)**: Compatible with flv, mpeg4, libx264, libx264rgb, libxvid, libopenh264. |
| | | | | **GIF Animation [gif] (gif)**: Compatible with gif. |
| | | | | **Matroska [matroska] (matroska)**: Compatible with prores_ksap4h, prores_ksapch, prores_ksapcn, prores_ksapcs, prores_ksapco, ffv1, mjpeg, mpeg2video, mpeg4, msmpeg4, vc2, libtheora, libvpx, libvpx-vp9, libx264, libx264rgb, libx265, libxvid, libopenh264. |
| | | | | **QuickTime / MOV [mov] (mov)**: Compatible with prores_ksap4h, prores_ksapch, prores_ksapcn, prores_ksapcs, prores_ksapco, avrp, cinepak, dnxhd, hap, jpeg2000, mjpeg, mpeg2video, mpeg4, msmpeg4, png, qtrle, svq1, targa, tiff, v308, v408, v410, vc2, libopenjpeg, libvpx-vp9, libx264, libx264rgb, libx265, libxvid, libopenh264. |
| | | | | **QuickTime / MOV [mov] (mov)**: Compatible with prores_ksap4h, prores_ksapch, prores_ksapcn, prores_ksapcs, prores_ksapco, avrp, cinepak, dnxhd, gif, hap, jpeg2000, mjpeg, mpeg2video, mpeg4, msmpeg4, png, qtrle, svq1, targa, tiff, v308, v408, v410, vc2, libopenjpeg, libvpx-vp9, libx264, libx264rgb, libx265, libxvid, libopenh264. |
| | | | | **MP4 (MPEG-4 Part 14) [mp4] (mp4)**: Compatible with jpeg2000, mjpeg, mpeg2video, mpeg4, png, vc2, libopenjpeg, libvpx-vp9, libx264, libx264rgb, libx265, libxvid, libopenh264. |
| | | | | **MPEG-1 Systems / MPEG program stream [mpeg] (mpeg)**: Compatible with libx264, libx264rgb, libopenh264. |
| | | | | **MPEG-TS (MPEG-2 Transport Stream) [mpegts] (mpegts)**: Compatible with mpeg2video, mpeg4, vc2, libx264, libx264rgb, libx265, libxvid, libopenh264. |
Expand All @@ -192,6 +193,7 @@ Controls
| | | | | **FFV1 FFmpeg video codec #1 [ffv1] (ffv1)**: Compatible with avi, matroska. |
| | | | | **FFVH Huffyuv FFmpeg variant [ffvhuff] (ffvhuff)**: Compatible with avi. |
| | | | | **FLV1 FLV / Sorenson Spark / Sorenson H.263 (Flash Video) [flv] (flv)**: Compatible with avi, flv. |
| | | | | **gif GIF (Graphics Interchange Format) [gif] (gif)**: Compatible with gif, mov. |
| | | | | **H263 H.263+ / H.263-1998 / H.263 version 2 [h263p] (h263p)**: Compatible with avi. |
| | | | | **Hap1 Vidvox Hap [hap] (hap)**: Compatible with mov. |
| | | | | **HFYU HuffYUV [huffyuv] (huffyuv)**: Compatible with avi. |
Expand Down

0 comments on commit 2602711

Please sign in to comment.