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