Dify logo
Dify logo
Marketplace
plugin-stvlynn/ffmpeg-logo
FFmpeg
0.0.1

Process and convert video and audio files using FFmpeg. Provides tools for getting video information, converting formats, trimming, compressing and extracting audio.

stvlynn/ffmpeg3438 installs

FFmpeg Plugin for Dify

Author: Steven Lynn
Version: 0.0.1
Type: tool

Description

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.

Requirements

  • FFmpeg must be installed on the system

  • Python 3.12+

  • You must enable video file upload in Dify's Features > File Upload settings.

    1. Go to the Features tab in your Dify app and enable File Upload:

    2. In the File Upload settings, make sure to check the Video file type :

Features

The plugin provides the following capabilities:

1. Video Information

Gets detailed technical information about a video file, including format, duration, resolution, codecs, and other metadata.

2. Video Conversion


Converts video files from one format to another, supporting common formats like MP4, AVI, MOV, MKV, and more.

3. Video Trimming

Extracts a specific section of a video by specifying start and end times, maintaining the original quality.

4. Video Compression

Compresses a video file to reduce its size while attempting to maintain reasonable quality. Useful for sharing videos or saving storage space.

5. Audio Extraction

Extracts the audio track from a video file and saves it as an audio file in various formats.

Parameters

Video Information Parameters

ParameterTypeRequiredDescription
videofileYesThe video file to analyze

Video Conversion Parameters

ParameterTypeRequiredDescription
videofileYesThe video file to convert
target_formatstringYesThe format to convert the video to (mp4, avi, mov, mkv, etc.)

Video Trimming Parameters

ParameterTypeRequiredDescription
videofileYesThe video file to trim
start_timestringYesThe start time (format: HH:MM:SS or seconds)
end_timestringYesThe end time (format: HH:MM:SS or seconds)

Video Compression Parameters

ParameterTypeRequiredDescription
videofileYesThe video file to compress
compression_levelselectNoCompression level: low, medium, high (default: medium)

Audio Extraction Parameters

ParameterTypeRequiredDescription
videofileYesThe video file to extract audio from
audio_formatstringNoFormat of extracted audio (mp3, aac, wav, ogg, flac) (default: mp3)

Usage Examples

Get Video Information Example

JSON
1{ 2 "video": [uploaded_video_file] 3}

Convert Video Example

JSON
1{ 2 "video": [uploaded_video_file], 3 "target_format": "mp4" 4}

Trim Video Example

JSON
1{ 2 "video": [uploaded_video_file], 3 "start_time": "00:01:30", 4 "end_time": "00:02:45" 5}

Compress Video Example

JSON
1{ 2 "video": [uploaded_video_file], 3 "compression_level": "medium" 4}

Extract Audio Example

JSON
1{ 2 "video": [uploaded_video_file], 3 "audio_format": "mp3" 4}

Security Considerations

  • Ensure you have the necessary rights to process and convert the media files
  • The plugin uses temporary files which are automatically cleaned up after processing

License

MIT

Feedback and Issues

If you encounter any problems or have suggestions for improvements:

  1. Please open an issue in the plugin's GitHub repository

  2. Provide details about your problem, including error messages and steps to reproduce

  3. Do not submit issues to the main Dify repository for plugin-specific problems

CATEGORY
Tool
TAGS
#Videos
VERSION
0.0.1
stvlynn·2025-04-26 06:54:27
REQUIREMENTS
Maximum memory
256MB
Maximum storage
1MB