-
Notifications
You must be signed in to change notification settings - Fork 263
add ffmpeg tool for audio / video conversion #1610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b8612d1
add ffmpeg tool for audio / video conversion
bgruening 7e231a4
add shed.yml
bgruening 3fd636f
Update tools/ffmpeg/ffmpeg_converter.xml
bgruening 9e78632
Update tools/ffmpeg/ffmpeg_converter.xml
bgruening 5eb22d5
Merge branch 'master' into a_v_conversion
bgruening File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: ffmpeg | ||
| owner: bgruening | ||
| description: A complete, cross-platform solution to record, convert and stream audio and video. | ||
| long_description: | | ||
| A complete, cross-platform solution to record, convert and stream audio and video. | ||
| type: unrestricted | ||
| categories: | ||
| - Convert Formats | ||
| remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools/ffmpeg | ||
| homepage_url: https://ffmpeg.org | ||
| auto_tool_repositories: | ||
| name_template: "{{ tool_id }}" | ||
| description_template: "Wrapper for the ffmpeg suite tool: {{ tool_name }}" | ||
| suite: | ||
| name: "suite_ffmpeg" | ||
| description: A complete, cross-platform solution to record, convert and stream audio and video. | ||
| long_description: A complete, cross-platform solution to record, convert and stream audio and video. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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> | ||
bgruening marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <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"/> | ||
SaimMomin12 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </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> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| SampleVideo_360x240_1mb.mp4 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.