Mercurial > repos > greg > ffmpeg
comparison ffmpeg.xml @ 11:fec4348c08f5 draft
Uploaded
author | greg |
---|---|
date | Wed, 18 Oct 2017 09:42:34 -0400 |
parents | 18a4e1df1a54 |
children | c5474fdac82e |
comparison
equal
deleted
inserted
replaced
10:18a4e1df1a54 | 11:fec4348c08f5 |
---|---|
2 <description> video / image converter</description> | 2 <description> video / image converter</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="3.2.4">ffmpeg</requirement> | 4 <requirement type="package" version="3.2.4">ffmpeg</requirement> |
5 </requirements> | 5 </requirements> |
6 <command detect_errors="exit_code"><![CDATA[ | 6 <command detect_errors="exit_code"><![CDATA[ |
7 mkdir output && | |
7 #if str($conversion_cond.conversion) == "video": | 8 #if str($conversion_cond.conversion) == "video": |
8 mkdir output && | |
9 #if str($output_process_log) == 'yes': | 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 | 10 ffmpeg -i '$conversion_cond.input' -filter:v fps=fps=1/$conversion_cond.sbf 2>$output_log output/%05d.jpg |
11 #else: | 11 #else: |
12 ffmpeg -i '$conversion_cond.input' -filter:v fps=fps=1/$conversion_cond.sbf 2>/dev/null output/%05d.jpg | 12 ffmpeg -i '$conversion_cond.input' -filter:v fps=fps=1/$conversion_cond.sbf 2>/dev/null output/%05d.jpg |
13 #end if | |
14 #else: | |
15 ## str($conversion_cond.conversion) == "images" | |
16 mkdir input_dir && | |
17 #for $i in $conversion_cond.input: | |
18 #set input_filename = $i.file_name | |
19 #set full_name = $i.name | |
20 ln -s $input_filename input_dir/$full_name | |
21 #end for | |
22 #if str($output_process_log) == 'yes': | |
23 ffmpeg -r $conversion_cond.frame_rate -f mp4 -s 1920x1080 -i $input_dir/%04d.jpg -vcodec libx264 -crf $conversion_cond.quality -pix_fmt yuv420p 2>$output_log $output_video | |
24 #else: | |
25 ffmpeg -r $conversion_cond.frame_rate -f mp4 -s 1920x1080 -i $input_dir/%04d.jpg -vcodec libx264 -crf $conversion_cond.quality -pix_fmt yuv420p 2>/dev/null $output_video | |
13 #end if | 26 #end if |
14 #end if | 27 #end if |
15 ]]></command> | 28 ]]></command> |
16 <inputs> | 29 <inputs> |
17 <conditional name="conversion_cond"> | 30 <conditional name="conversion_cond"> |
21 </param> | 34 </param> |
22 <when value="video"> | 35 <when value="video"> |
23 <param name="input" type="data" format="avi,mpg,mp4" label="Select input video"/> | 36 <param name="input" type="data" format="avi,mpg,mp4" label="Select input video"/> |
24 <param name="sbf" type="integer" value="1" label="Number of seconds between frames"/> | 37 <param name="sbf" type="integer" value="1" label="Number of seconds between frames"/> |
25 </when> | 38 </when> |
39 <when value="images"> | |
40 <param name="input" type="data_collection" collection_type="list" format="jpg" label="Select input images"/> | |
41 <param name="frame_rate" type="integer" value="60" label="Number of frames per second"/> | |
42 <param name="quality" type="integer" value="15" label="Image quality" help="Lower means better quality, 15-25 is usually good"/> | |
43 </when> | |
26 </conditional> | 44 </conditional> |
27 <param name="output_process_log" type="select" display="radio" label="Output process log?"> | 45 <param name="output_process_log" type="select" display="radio" label="Output process log?"> |
28 <option value="no" selected="true">No</option> | 46 <option value="no" selected="true">No</option> |
29 <option value="yes">Yes</option> | 47 <option value="yes">Yes</option> |
30 </param> | 48 </param> |
31 </inputs> | 49 </inputs> |
32 <outputs> | 50 <outputs> |
51 <data name="output_log" format="txt" label="${tool.name} (process log) on ${on_string}"> | |
52 <filter>output_process_log == 'yes'</filter> | |
53 </data> | |
33 <collection name="output_from_video" type="list" label="${tool.name} (images) on ${on_string}"> | 54 <collection name="output_from_video" type="list" label="${tool.name} (images) on ${on_string}"> |
34 <discover_datasets pattern="__name__" directory="output" format="jpg"/> | 55 <discover_datasets pattern="__name__" directory="output" format="jpg"/> |
35 <filter>conversion_cond['conversion'] == 'video'</filter> | 56 <filter>conversion_cond['conversion'] == 'video'</filter> |
36 </collection> | 57 </collection> |
37 <data name="output_log" format="txt" label="${tool.name} (process log) on ${on_string}"> | 58 <data name="output_video" format="mp4" label="${tool.name} (video) on ${on_string}"> |
38 <filter>output_process_log == 'yes'</filter> | 59 <filter>conversion_cond['conversion'] == 'images'</filter> |
39 </data> | 60 </data> |
40 </outputs> | 61 </outputs> |
41 <tests> | 62 <tests> |
42 <test> | 63 <test> |
43 </test> | 64 </test> |