mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-06 12:55:05 -05:00
<!-- Clearly explain the need for these changes: -->
This PR adds general-purpose video editing blocks for the AutoGPT
Platform, enabling automated video production workflows like documentary
creation, marketing videos, tutorial assembly, and content repurposing.
### Changes 🏗️
<!-- Concisely describe all of the changes made in this pull request:
-->
**New blocks added in `backend/blocks/video/`:**
- `VideoDownloadBlock` - Download videos from URLs (YouTube, Vimeo, news
sites, direct links) using yt-dlp
- `VideoClipBlock` - Extract time segments from videos with start/end
time validation
- `VideoConcatBlock` - Merge multiple video clips with optional
transitions (none, crossfade, fade_black)
- `VideoTextOverlayBlock` - Add text overlays/captions with positioning
and timing options
- `VideoNarrationBlock` - Generate AI narration via ElevenLabs and mix
with video audio (replace, mix, or ducking modes)
**Dependencies required:**
- `yt-dlp` - For video downloading
- `moviepy` - For video editing operations
**Implementation details:**
- All blocks follow the SDK pattern with proper error handling and
exception chaining
- Proper resource cleanup in `finally` blocks to prevent memory leaks
- Input validation (e.g., end_time > start_time)
- Test mocks included for CI
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Blocks follow the SDK pattern with
`BlockSchemaInput`/`BlockSchemaOutput`
- [x] Resource cleanup is implemented in `finally` blocks
- [x] Exception chaining is properly implemented
- [x] Input validation is in place
- [x] Test mocks are provided for CI environments
#### For configuration changes:
- [ ] `.env.default` is updated or already compatible with my changes
- [x] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
N/A - No configuration changes required.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Adds new multimedia blocks that invoke ffmpeg/MoviePy and introduces
new external dependencies (plus container packages), which can impact
runtime stability and resource usage; download/overlay blocks are
present but disabled due to sandbox/policy concerns.
>
> **Overview**
> Adds a new `backend.blocks.video` module with general-purpose video
workflow blocks (download, clip, concat w/ transitions, loop, add-audio,
text overlay, and ElevenLabs-powered narration), including shared
utilities for codec selection, filename cleanup, and an ffmpeg-based
chapter-strip workaround for MoviePy.
>
> Extends credentials/config to support ElevenLabs
(`ELEVENLABS_API_KEY`, provider enum, system credentials, and cost
config) and adds new dependencies (`elevenlabs`, `yt-dlp`) plus Docker
runtime packages (`ffmpeg`, `imagemagick`).
>
> Improves file/reference handling end-to-end by embedding MIME types in
`workspace://...#mime` outputs and updating frontend rendering to detect
video vs image from MIME fragments (and broaden supported audio/video
extensions), with optional enhanced output rendering behind a feature
flag in the legacy builder UI.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
da7a44d794. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <ntindle@users.noreply.github.com>
Co-authored-by: Otto <otto@agpt.co>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
8.0 KiB
8.0 KiB
Table of contents
Guides
Block Integrations
- Airtable Bases
- Airtable Records
- Airtable Schema
- Airtable Triggers
- Apollo Organization
- Apollo People
- Apollo Person
- Ayrshare Post To Bluesky
- Ayrshare Post To Facebook
- Ayrshare Post To GMB
- Ayrshare Post To Instagram
- Ayrshare Post To LinkedIn
- Ayrshare Post To Pinterest
- Ayrshare Post To Reddit
- Ayrshare Post To Snapchat
- Ayrshare Post To Telegram
- Ayrshare Post To Threads
- Ayrshare Post To TikTok
- Ayrshare Post To X
- Ayrshare Post To YouTube
- Baas Bots
- Bannerbear Text Overlay
- Basic
- Compass Triggers
- Data
- Dataforseo Keyword Suggestions
- Dataforseo Related Keywords
- Discord Bot Blocks
- Discord OAuth Blocks
- Enrichlayer LinkedIn
- Exa Answers
- Exa Code Context
- Exa Contents
- Exa Research
- Exa Search
- Exa Similar
- Exa Webhook Blocks
- Exa Websets
- Exa Websets Enrichment
- Exa Websets Import Export
- Exa Websets Items
- Exa Websets Monitor
- Exa Websets Polling
- Exa Websets Search
- Fal AI Video Generator
- Firecrawl Crawl
- Firecrawl Extract
- Firecrawl Map
- Firecrawl Scrape
- Firecrawl Search
- Generic Webhook Triggers
- GitHub Checks
- GitHub CI
- GitHub Issues
- GitHub Pull Requests
- GitHub Repo
- GitHub Reviews
- GitHub Statuses
- GitHub Triggers
- Google Calendar
- Google Docs
- Google Gmail
- Google Sheets
- HubSpot Company
- HubSpot Contact
- HubSpot Engagement
- Jina Chunking
- Jina Embeddings
- Jina Fact Checker
- Jina Search
- Linear Comment
- Linear Issues
- Linear Projects
- LLM
- Logic
- Misc
- Notion Create Page
- Notion Read Database
- Notion Read Page
- Notion Read Page Markdown
- Notion Search
- Nvidia Deepfake
- Replicate Flux Advanced
- Replicate Replicate Block
- Search
- Slant3D Filament
- Slant3D Order
- Slant3D Slicing
- Slant3D Webhook
- Smartlead Campaign
- Stagehand Blocks
- System Library Operations
- System Store Operations
- Text
- Todoist Comments
- Todoist Labels
- Todoist Projects
- Todoist Sections
- Todoist Tasks
- Twitter Blocks
- Twitter Bookmark
- Twitter Follows
- Twitter Hide
- Twitter Like
- Twitter List Follows
- Twitter List Lookup
- Twitter List Members
- Twitter List Tweets Lookup
- Twitter Manage
- Twitter Manage Lists
- Twitter Mutes
- Twitter Pinned Lists
- Twitter Quote
- Twitter Retweet
- Twitter Search Spaces
- Twitter Spaces Lookup
- Twitter Timeline
- Twitter Tweet Lookup
- Twitter User Lookup
- Video Add Audio
- Video Clip
- Video Concat
- Video Download
- Video Duration
- Video Loop
- Video Narration
- Video Text Overlay
- Wolfram LLM API
- Zerobounce Validate Emails