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