0
|
1 <tool id="ffmpeg" name="FFMPEG" version="3.2.4">
|
5
|
2 <description> video / image converter</description>
|
0
|
3 <requirements>
|
|
4 <requirement type="package" version="3.2.4">ffmpeg</requirement>
|
|
5 </requirements>
|
|
6 <command detect_errors="exit_code"><![CDATA[
|
7
|
7 #if str($conversion_cond.conversion) == "video":
|
5
|
8 mkdir output &&
|
|
9 ffmpeg -i '$input' -filter:v fps=fps=1/$sbf 2>/dev/null output/%05d.$ext
|
|
10 #end if
|
0
|
11 ]]></command>
|
|
12 <inputs>
|
5
|
13 <conditional name="conversion_cond">
|
|
14 <param name="conversion" type="select" label="Convert">
|
|
15 <option value="video" selected="true">video to images</option>
|
|
16 <option value="images">images to video</option>
|
|
17 </param>
|
|
18 <when value="video">
|
|
19 <param name="input" type="data" format="avi,mpg" label="Select input video"/>
|
|
20 <param name="sbf" type="integer" value="1" label="Number of seconds between frames"/>
|
|
21 <param name="ext" type="select" label="Image format">
|
|
22 <option value="jpg" selected="true">Jpg</option>
|
|
23 <option value="png">Png</option>
|
|
24 <option value="bmp">bmp</option>
|
|
25 </param>
|
|
26 </when>
|
|
27 </conditional>
|
0
|
28 </inputs>
|
|
29 <outputs>
|
5
|
30 <collection name="output_from_video" type="list">
|
|
31 <discover_datasets pattern="__name__" directory="output" format="jpg"/>
|
|
32 <filter>conversion_cond['conversion'] == 'video'</filter>
|
|
33 <change_format>
|
|
34 <when input="conversion_cond.ext" value="png" format="png"/>
|
|
35 <when input="conversion_cond.ext" value="bmp" format="bmp"/>
|
|
36 </change_format>
|
0
|
37 </collection>
|
|
38 </outputs>
|
|
39 <tests>
|
|
40 <test>
|
|
41 </test>
|
|
42 </tests>
|
|
43 <help>
|
|
44 **What it does**
|
|
45
|
5
|
46 Converts video files to images and image files to video files.
|
0
|
47
|
|
48 -----
|
|
49
|
|
50 **Options**
|
|
51
|
|
52 </help>
|
|
53 <citations>
|
|
54 </citations>
|
|
55 </tool>
|