FFmpeg
Learn how to use the FFmpeg integration with Julep
Overview
Welcome to the FFmpeg integration guide for Julep! This integration allows you to process media files using FFmpeg commands, enabling you to build workflows that require advanced media processing capabilities. Whether you’re converting video formats or extracting audio, this guide will walk you through the setup and usage.
How to Use the Integration
To get started with the FFmpeg integration, follow these steps to configure and create a task:
Define Your FFmpeg Command
Use the following YAML configuration to define your FFmpeg command and process media files:
The base64_encoded_file
is the base64 encoded file to process which in this case is the input.mp4
file.
The file
argument can accept either a single base64 encoded string or a list of base64 encoded strings.
However, even when passing a list of files, the FFmpeg command can only use a single input file (single -i
flag).
Multiple input files with multiple -i
flags are not supported.
YAML Explanation
Basic Configuration
Basic Configuration
- name: A descriptive name for the task, in this case, “FFmpeg Task”.
- tools: This section lists the tools or integrations being used. Here,
ffmpeg_tool
is defined as an integration tool.
Tool Configuration
Tool Configuration
- type: Specifies the type of tool, which is
integration
in this context. - integration: Details the provider and setup for the integration.
- provider: Indicates the service provider, which is
ffmpeg
for FFmpeg. - method: Indicates the method to be used, which is
bash_cmd
for FFmpeg. If not specified, the method will bebash_cmd
by default.
- provider: Indicates the service provider, which is
Workflow Configuration
Workflow Configuration
- main: Defines the main execution steps.
- tool: Refers to the tool defined earlier (
ffmpeg_tool
). - arguments: Specifies the input parameters for the tool:
- cmd: The FFmpeg command to execute.
- file: The base64 encoded file to process. Can be a single base64 encoded string or a list of base64 encoded strings.
- tool: Refers to the tool defined earlier (
Ensure your input file is base64 encoded and the FFmpeg command is correctly formatted for your specific use case.
Conclusion
With the FFmpeg integration, you can efficiently process media files using powerful FFmpeg commands. This integration provides a robust solution for media processing, enhancing your workflow’s capabilities and user experience.
For more information, please refer to the FFmpeg documentation.