changeset 0:288f703056b0 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/ffmpeg commit 7e231a4e855cf86f73c5814b6de8a049bc720aa7
author bgruening
date Tue, 22 Apr 2025 13:01:44 +0000
parents
children
files ffmpeg_converter.xml test-data/.gitignore test-data/SampleVideo_360x240_1mb.mp4 test-data/SampleVideo_360x240_cut.flac test-data/SampleVideo_360x240_cut.mkv test-data/SampleVideo_360x240_cut.mp3 test-data/SampleVideo_360x240_cut.mp4 test-data/SampleVideo_360x240_cut.webm test-data/converted.mp3 test-data/flac_to_ogg.ogg test-data/readme.txt
diffstat 11 files changed, 96 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ffmpeg_converter.xml	Tue Apr 22 13:01:44 2025 +0000
@@ -0,0 +1,88 @@
+<tool id="ffmpeg_converter" name="FFmpeg Format Converter" version="0.1.0" profile="21.09">
+    <description>Convert between video and audio formats using FFmpeg</description>
+    <requirements>
+        <requirement type="package" version="7.1.1">ffmpeg</requirement>
+    </requirements>
+    <command detect_errors="exit_code">
+        <![CDATA[
+        ffmpeg -i '$input_file' output.${output_format} &&
+        mv output.${output_format} '$output_file'
+        ]]>
+    </command>
+    <inputs>
+        <param name="input_file" type="data" format="mp4,mov,avi,mkv,mp3,wav,flac,ogg" label="Input media file"/>
+        <param name="output_format" type="select" label="Output format">
+            <option value="mp4">MP4 (video)</option>
+            <option value="mkv">MKV (video)</option>
+            <option value="avi">AVI (video)</option>
+            <option value="mov">MOV (video)</option>
+            <option value="mp3">MP3 (audio)</option>
+            <option value="wav">WAV (audio)</option>
+            <option value="flac">FLAC (audio)</option>
+            <option value="ogg">OGG (audio)</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="output_file" format="ogg" from_work_dir="output.@output_format@" label="Converted file (${output_format})">
+            <change_format>
+                <when input="output_format" value="mp4" format="mp4"/>
+                <when input="output_format" value="mkv" format="mkv"/>
+                <when input="output_format" value="avi" format="avi"/>
+                <when input="output_format" value="mov" format="mov"/>
+                <when input="output_format" value="mp3" format="mp3"/>
+                <when input="output_format" value="wav" format="wav"/>
+                <when input="output_format" value="flac" format="flac"/>
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="input_file" value="SampleVideo_360x240_cut.mp4" ftype="mp4"/>
+            <param name="output_format" value="webm"/>
+            <output name="output_file" file="SampleVideo_360x240_cut.webm" ftype="webm"/>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_file" value="SampleVideo_360x240_cut.mp4" ftype="mp4"/>
+            <param name="output_format" value="flac"/>
+            <output name="output_file" file="SampleVideo_360x240_cut.flac" ftype="flac"/>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_file" value="SampleVideo_360x240_cut.mp4" ftype="mp4"/>
+            <param name="output_format" value="mp3"/>
+            <output name="output_file" file="SampleVideo_360x240_cut.mp3" ftype="mp3"/>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_file" value="SampleVideo_360x240_cut.flac" ftype="flac"/>
+            <param name="output_format" value="ogg"/>
+            <output name="output_file" file="flac_to_ogg.ogg" ftype="ogg"/>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_file" value="SampleVideo_360x240_cut.mp4" ftype="mp4"/>
+            <param name="output_format" value="mkv"/>
+            <output name="output_file" file="SampleVideo_360x240_cut.webm" ftype="mkv"/>
+        </test>
+    </tests>
+    <help>
+        This tool uses FFmpeg to convert between common video and audio file formats.
+
+        Input formats:
+        - Video: MP4, MOV, AVI, MKV
+        - Audio: MP3, WAV, FLAC, AAC, OGG
+
+        Select the output format you want, and FFmpeg will handle the conversion.
+    </help>
+    <citations>
+        <citation type="bibtex">
+            @article{tomar2006converting,
+                title={Converting video formats with FFmpeg},
+                author={Tomar, Suramya},
+                journal={Linux Journal},
+                volume={2006},
+                number={146},
+                pages={10},
+                year={2006},
+                publisher={Belltown Media}
+              } 
+        </citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/.gitignore	Tue Apr 22 13:01:44 2025 +0000
@@ -0,0 +1,1 @@
+SampleVideo_360x240_1mb.mp4
Binary file test-data/SampleVideo_360x240_1mb.mp4 has changed
Binary file test-data/SampleVideo_360x240_cut.flac has changed
Binary file test-data/SampleVideo_360x240_cut.mkv has changed
Binary file test-data/SampleVideo_360x240_cut.mp3 has changed
Binary file test-data/SampleVideo_360x240_cut.mp4 has changed
Binary file test-data/SampleVideo_360x240_cut.webm has changed
Binary file test-data/converted.mp3 has changed
Binary file test-data/flac_to_ogg.ogg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/readme.txt	Tue Apr 22 13:01:44 2025 +0000
@@ -0,0 +1,7 @@
+ffmpeg -ss 00:00:02 -to 00:00:04 -i SampleVideo_360x240_1mb.mp4 -c copy SampleVideo_360x240_cut.mp4
+
+ffmpeg -i SampleVideo_360x240_cut.mp4 SampleVideo_360x240_cut.webm
+ffmpeg -i SampleVideo_360x240_cut.mp4 SampleVideo_360x240_cut.flac
+ffmpeg -i SampleVideo_360x240_cut.mp4 SampleVideo_360x240_cut.mp3
+ffmpeg -i SampleVideo_360x240_cut.flac flac_to_ogg.ogg
+ffmpeg -i SampleVideo_360x240_cut.mp4 SampleVideo_360x240_cut.mkv