LangChain Automate

LangChain Automate streamlines video processing by downloading a video, extracting evenly distributed frames, and generating a voiceover script using AI. This automated workflow efficiently combines visual and audio elements, producing a polished narration clip that is uploaded to Google Drive for easy access. Perfect for creating engaging content quickly and effectively.

7/8/2025
21 nodes
Complex
manualcomplexlangchainsplitoutconverttofileaggregategoogle drivesticky notewaitsplitinbatcheseditimageadvancedapiintegrationfilesstorage
Categories:
Complex WorkflowManual TriggeredCreative Design Automation
Integrations:
LangChainSplitOutConvertToFileAggregateGoogle DriveSticky NoteWaitSplitInBatchesEditImage

Target Audience

This workflow is ideal for:
- Content Creators: Individuals or teams producing video content who want to automate the narration process.
- Educators: Teachers or trainers looking to create engaging video materials with voiceover.
- Marketers: Professionals needing to generate promotional videos with voiceovers quickly.
- Developers: Those interested in integrating AI capabilities into their video processing applications.
- Researchers: Individuals studying AI and its applications in multimedia processing.

Problem Solved

This workflow addresses the challenge of creating engaging voiceover narration for videos. It automates the process of:
- Extracting frames from a video.
- Generating a script based on the visual content.
- Producing a voiceover using AI, significantly reducing the time and effort needed for manual narration.

Workflow Steps

  • Manual Trigger: The workflow begins when the user clicks ‘Test workflow’.
    2. Download Video: A video is downloaded from a specified URL.
    3. Capture Frames: The video is processed to extract evenly distributed frames (up to 90 frames) using Python and OpenCV.
    4. Split Out Frames: The extracted frames are split into individual items for further processing.
    5. Batch Processing: The frames are processed in batches of 15 to manage the size and ensure efficiency.
    6. Resize Frames: Each frame is resized to 768x768 pixels for optimal input to the AI model.
    7. Generate Narration Script: The frames are sent to an AI model (LangChain) which creates a voiceover script in the style of David Attenborough.
    8. Combine Script: All generated scripts are combined into a single script.
    9. Text-to-Speech: The combined script is converted to an audio file using OpenAI’s TTS capabilities, resulting in an MP3 file.
    10. Upload to Google Drive: The final voiceover audio file is uploaded to Google Drive for easy access and sharing.
  • Customization Guide

    Users can customize this workflow by:
    - Changing Video Source: Modify the URL in the ‘Download Video’ node to use different videos.
    - Adjusting Frame Count: Alter the max_frames parameter in the ‘Capture Frames’ node to capture more or fewer frames.
    - Script Style: Change the prompt in the ‘Generate Narration Script’ node to adjust the voiceover style or tone (e.g., from David Attenborough to another style).
    - Batch Size: Modify the batchSize parameter in the ‘For Every 15 Frames’ node to process frames in different batch sizes.
    - Output Location: Change the folder ID in the ‘Upload to GDrive’ node to save the audio file in a different Google Drive folder.