Process and convert video and audio files using FFmpeg. Provides tools for getting video information, converting formats, trimming, compressing and extracting audio.
Author: Steven Lynn
Version: 0.0.1
Type: tool
FFmpeg plugin for Dify, enabling video and audio file processing and conversion. The plugin provides tools for retrieving video information, format conversion, trimming, compression, and audio extraction.
FFmpeg must be installed on the system
Python 3.12+
You must enable video file upload in Dify's Features > File Upload settings.
Go to the Features tab in your Dify app and enable File Upload:
In the File Upload settings, make sure to check the Video file type :
The plugin provides the following capabilities:
Gets detailed technical information about a video file, including format, duration, resolution, codecs, and other metadata.
Converts video files from one format to another, supporting common formats like MP4, AVI, MOV, MKV, and more.
Extracts a specific section of a video by specifying start and end times, maintaining the original quality.
Compresses a video file to reduce its size while attempting to maintain reasonable quality. Useful for sharing videos or saving storage space.
Extracts the audio track from a video file and saves it as an audio file in various formats.
Parameter | Type | Required | Description |
---|---|---|---|
video | file | Yes | The video file to analyze |
Parameter | Type | Required | Description |
---|---|---|---|
video | file | Yes | The video file to convert |
target_format | string | Yes | The format to convert the video to (mp4, avi, mov, mkv, etc.) |
Parameter | Type | Required | Description |
---|---|---|---|
video | file | Yes | The video file to trim |
start_time | string | Yes | The start time (format: HH:MM:SS or seconds) |
end_time | string | Yes | The end time (format: HH:MM:SS or seconds) |
Parameter | Type | Required | Description |
---|---|---|---|
video | file | Yes | The video file to compress |
compression_level | select | No | Compression level: low, medium, high (default: medium) |
Parameter | Type | Required | Description |
---|---|---|---|
video | file | Yes | The video file to extract audio from |
audio_format | string | No | Format of extracted audio (mp3, aac, wav, ogg, flac) (default: mp3) |
JSON1{
2 "video": [uploaded_video_file]
3}
JSON1{
2 "video": [uploaded_video_file],
3 "target_format": "mp4"
4}
JSON1{
2 "video": [uploaded_video_file],
3 "start_time": "00:01:30",
4 "end_time": "00:02:45"
5}
JSON1{
2 "video": [uploaded_video_file],
3 "compression_level": "medium"
4}
JSON1{
2 "video": [uploaded_video_file],
3 "audio_format": "mp3"
4}
If you encounter any problems or have suggestions for improvements:
Please open an issue in the plugin's GitHub repository
Provide details about your problem, including error messages and steps to reproduce
Do not submit issues to the main Dify repository for plugin-specific problems