view ffmpeg.xml @ 8:ee77c85ef867 draft

Uploaded
author greg
date Wed, 18 Oct 2017 08:07:37 -0400
parents 9c1d2cbf6661
children 03581ee71fb9
line wrap: on
line source

<tool id="ffmpeg" name="FFMPEG" version="3.2.4">
    <description> video / image converter</description>
    <requirements>
        <requirement type="package" version="3.2.4">ffmpeg</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
#if str($conversion_cond.conversion) == "video":
    mkdir output &&
    ffmpeg -i '$conversion_cond.input' -filter:v fps=fps=1/$conversion_cond.sbf 2>/dev/null output/%05d.jpg
#end if
    ]]></command>
    <inputs>
        <conditional name="conversion_cond">
            <param name="conversion" type="select" label="Convert">
                <option value="video" selected="true">video to images</option>
                <option value="images">images to video</option>
            </param>
            <when value="video">
                <param name="input" type="data" format="avi,mpg" label="Select input video"/>
                <param name="sbf" type="integer" value="1" label="Number of seconds between frames"/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <collection name="output_from_video" type="list">
            <discover_datasets pattern="__name__" directory="output" format="jpg"/>
            <filter>conversion_cond['conversion'] == 'video'</filter>
        </collection>
    </outputs>
    <tests>
        <test>
        </test>
    </tests>
    <help>
**What it does**

Converts video files to images and image files to video files.

-----

**Options**

    </help>
    <citations>
    </citations>
</tool>