Skip to content

This project is a Python 🐍-based video 🎞️ creation pipeline that processes media files πŸŽΆπŸ–ΌοΈ from directories πŸ“‚ and automatically generates videos πŸ“½οΈ by applying different tasks πŸ“‹ and effects ✨ in sequence.

License

Notifications You must be signed in to change notification settings

SergeyAnokhin/VidMakerAutomation

Repository files navigation

πŸŽ₯ Video Creation Pipeline πŸš€

ℹ️ About

This project is a Python 🐍-based video 🎞️ creation pipeline that processes media files πŸ“‚ from directories πŸ“ and automatically generates videos πŸ“½οΈ by applying different tasks πŸ“‹ and effects ✨ in sequence. The application allows for the automation πŸ€– of video production by combining audio 🎢 files, images πŸ–ΌοΈ, and other visual elements 🌈 into complete videos πŸ“Ή, with support for slideshows 🎠, text overlays ✍️, audio visualizations πŸ“Š, and much more.

The project aims to be highly configurable πŸ”§, with a YAML πŸ“œ-based configuration file that defines the sequence of tasks πŸ“‹ and settings βš™οΈ for each video πŸŽ₯, making it versatile for various video production needs.

Suggested Names for GitHub Repository

  1. VideoFlowPy
  2. PyVideoPipeline
  3. MediaMagic ✨
  4. ClipForge πŸ”¨
  5. VidCraft πŸ› οΈ
  6. AutoVidPy πŸ€–
  7. VidTransformer πŸ”„
  8. ClipSynth 🎢
  9. PythonVideoFactory 🏭🐍
  10. VidMakerAutomation βš™οΈ

🌟 Features

  • Configurable Pipeline πŸ”§: Set up your video production workflow via a YAML πŸ“œ configuration file.
  • Automated Task Execution πŸ€–: Perform various tasks in sequence, such as creating slideshows 🎠, adding text overlays ✍️, merging clips πŸ”—, and more.
  • Modular Converters πŸ”„: Each task (like adding text ✍️, images πŸ–ΌοΈ, or exporting a video πŸ“€) is implemented as a converter, making it easy to extend or modify.
  • Multi-Format Support πŸ“½οΈπŸŽ΅πŸ–ΌοΈ: Supports various formats for images πŸ–ΌοΈ, audio 🎢, and video πŸŽ₯.
  • Rich Logging πŸ“: Uses Rich 🌈 and Icecream 🍦 for informative console output πŸ–₯️ and logging, making it easier to debug 🐞.

πŸ“¦ Installation

Clone the repository πŸ“‚ and install the dependencies πŸ“œ:

git clone https://github.com/yourusername/VideoFlowPy.git
cd VideoFlowPy
pip install -r requirements.txt

πŸš€ Usage

Create a configuration file πŸ“„ for your video pipeline in YAML format or modify the provided config.yaml example.

Run the main script to process the directories πŸ“‚ and generate videos πŸŽ₯:

python main.py

βš™οΈ Configuration

The main configuration is in the config.yaml file πŸ“œ. You can specify the directories πŸ“, tasks πŸ“‹, and the sequence of converters πŸ”„ to apply to each video project πŸŽ₯. Here is a basic overview of the configuration:

  • tasks πŸ“‹: A list of tasks, each containing a set of converters applied in sequence.
  • converters πŸ”„: Defines the converters (e.g., AudioReaderConverter 🎢, SlideshowCreatorConverter 🎠, etc.) and their settings βš™οΈ for each task.

Refer to the example config.yaml for more detailed usage.

πŸ”„ Converters Overview

  • AudioReaderConverter 🎢: Reads audio from the directory πŸ“‚.
  • SlideshowCreatorConverter 🎠: Creates a slideshow from a set of images πŸ–ΌοΈ.
  • TextOverlayConverter ✍️: Adds text with configurable position πŸ“, color 🎨, and font settings πŸ–‹οΈ.
  • ImageOverlayConverter πŸ–ΌοΈ: Adds static or animated images on top of the video πŸ“½οΈ.
  • SplitConverter βœ‚οΈ: Splits video into parts for parallel processing ⚑.
  • AudioVisualizationConverter πŸ“Š: Adds audio visualizations to the video 🎢.
  • JoinConverter πŸ”—: Joins multiple video parts together.
  • VideoExportConverter πŸ“€: Exports the final video πŸŽ₯ with configurable quality 🌟 and output settings βš™οΈ.

πŸ“œ Dependencies

  • MoviePy πŸŽ₯: For video processing.
  • PyYAML πŸ“„: To handle the YAML configuration.
  • Rich 🌈 and Icecream 🍦: For enhanced console logging πŸ“ and debugging πŸ›.

Install these by running:

pip install -r requirements.txt

πŸ“„ Example Configuration

Here is an example configuration that you can use as a starting point. This file (config.yaml) contains the tasks πŸ“‹ and settings βš™οΈ for creating a full-length video πŸŽ₯ and a short clip πŸ“Ή.

tasks:
  - name: "Create Full Length Video"
    converters:
      - type: "AudioReaderConverter"
        config:
          start_time: 0
          end_time: null  # End of the audio
      - type: "SlideshowCreatorConverter"
        config:
          slideshow:
            height: 720  # Height of the images to be unified
          transition:
            fade_in: 1.0  # Fade-in duration in seconds
            fade_out: 1.0  # Fade-out duration in seconds
      - type: "TextOverlayConverter"
        config:
          text: "Welcome to Our Video"
          position:
            x: "50%"  # Position in percentage for horizontal centering
            y: "90%"  # Position in percentage for vertical placement at the bottom
          font:
            name: "Arial"
            size: 24
            color: "white"
          contour:
            color: "black"
            size: 2
          transition:
            fade_in: 0.5
            fade_out: 0.5
      - type: "ImageOverlayConverter"
        config:
          image:
            path: "overlay.png"
            position:
              x: "10pt"  # Position in pixels (e.g., '10pt') or percentage (e.g., '10%')
              y: "20pt"  # Position in pixels (e.g., '20pt') or percentage (e.g., '20%')
          timing:
            start_time: 5  # Seconds from the start
            end_time: 10   # Seconds from the start
      - type: "SplitConverter"
        config:
          parts: 3
      - type: "AudioVisualizationConverter"
        config:
          visualization:
            bar_count: 30
            height: 150
            palette: "COLORMAP_MAGMA"  # OpenCV colormap naming convention
      - type: "JoinConverter"
      - type: "AudioReaderConverter"
        config:
          start_time: 0
          end_time: null  # End of the audio, searches for mp3 in directory
      - type: "VideoExportConverter"
        config:
          export:
            output_path: "output.mp4"
            fps: 24
            codec: "libx264"
            quality_preset: "medium"

  - name: "Create YouTube Short"
    converters:
      - type: "AudioReaderConverter"
        config:
          start_time: 30
          end_time: 60  # Duration of 30 seconds
      - type: "SlideshowCreatorConverter"
        config:
          slideshow:
            height: 1080  # Height for YouTube Short format
          transition:
            fade_in: 0.5
            fade_out: 0.5
      - type: "TextOverlayConverter"
        config:
          text: "Enjoy this Short Clip!"
          position:
            x: "50%"  # Position in percentage for horizontal centering
            y: "50%"  # Position in percentage for vertical centering
          font:
            name: "Arial"
            size: 32
            color: "yellow"
          contour:
            color: "black"
            size: 2
          transition:
            fade_in: 0.5
            fade_out: 0.5
      - type: "VideoExportConverter"
        config:
          export:
            output_path: "short_output.mp4"
            fps: 30
            codec: "libx264"
            quality_preset: "high"

About

This project is a Python 🐍-based video 🎞️ creation pipeline that processes media files πŸŽΆπŸ–ΌοΈ from directories πŸ“‚ and automatically generates videos πŸ“½οΈ by applying different tasks πŸ“‹ and effects ✨ in sequence.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages