Skip to content

jtyszkiew/videopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

videopy

videopy - video creation using YAML files

Discord

Scenario for example above
width: 640
height: 240
fps: 24
output_path: example/output/readme.gif
frames:
  - type: plugins.core.frames.image
    time: { duration: 6 }
    configuration: { file_path: example/assets/image/readme.png }
    effects:
      - type: plugins.core.effects.frames.resize
        configuration: { mode: center_crop }

    blocks:
      - type: plugins.core.blocks.text
        position: [center, center]
        loop:
          - { content: "Hello from videopy!" }
          - { content: "This is example scenario" }
          - { content: "Yeah, you can generate gifs too!" }
        configuration: { content: "{content}", color: white, font: Roboto-Bold, size: 30, margin: 30, padding: 20 }
        math: { name: "start", calculate: "loop_index * 2" }
        time: { start: "{math_start}", duration: "2" }
        effects:
          - type: plugins.core.effects.blocks.text.write
            time: { duration: 2 }

          - type: plugins.core.effects.blocks.text.background
            time: { duration: 2 }
            configuration: { color: [0, 0, 0], border_radius: 10, opacity: 1 }

          - type: plugins.core.effects.blocks.text.fadein
            time: { duration: 0.5 }

          - type: plugins.core.effects.blocks.text.slidein
            configuration: { slide_from: top }
            time: { duration: 0.5 }
            when: "block.loop_index == 0"

          - type: plugins.core.effects.blocks.text.slideout
            configuration: { slide_to: bottom }
            time: { duration: 0.5 }

Table of contents

What is VideoPy?

VideoPy is an application built on top of the moviepy library, designed to streamline the process of creating videos through the use of YAML files. By defining video scenarios in YAML, VideoPy allows users to automate common video creation tasks, making it accessible even to those with minimal programming experience.

Info: I just started this project, and it's in the early stages of development. I'm planning to add many more features but I already found it useful for my personal needs, so I'm sharing it with community, maybe someone will find it useful too.

How to start with VideoPy?

After the installation you can start using VideoPy by running the following command:

python video.py helpers examples

It will generate examples in the example.md file. You can use these examples to start creating your own scenarios.

How it works?

stateDiagram
    direction LR
    Script: Script
    YAML: YAML file
    Command: CLI
    Collector: videopy data collector
    Processor: videopy renderer
    Script --> Collector: Input data
    YAML --> Collector: Input data
    Command --> Collector: Input data
    Collector --> Processor: Scenario
    Processor --> moviepy: moviepy Clip(s)
    moviepy --> video
Loading

Why Use VideoPy?

VideoPy simplifies and automates the video creation process by allowing you to:

  • Define video scenarios in a straightforward YAML format.
  • Automate repetitive video creation tasks, reducing the need for advanced video editing software.
  • Create custom scripts in Python that generate YAML scenario files, offering flexibility for more advanced users.

Installation

Git

  1. Clone the repository
  2. Install the required dependencies using
pip install -r requirements.txt
  1. Run the application using
python videopy.py run --input-file example/scenario.yml

More installation options coming in the future

Modules

What's a module?

Modules are the building blocks of VideoPy scenarios. They define the different components that make up a video, such as frames, blocks, effects, and more. Each module has a specific purpose and can be combined to create video scenarios.

Scenarios

Creating scenario

  1. Create fully using YAML files. (example/scenario.yaml)
  2. Create using Python scripts that generate these YAML files (plugins/core/scenarios/images_dir_to_video.py).

Using scenarios from plugins

To list available scenarios use:

python video.py scenarios

To get more information about a specific scenario use:

python video.py scenario __scenario_name__

Frames

To list available frames use:

python video.py frames

To get more information about a specific frame use:

python video.py frames __frame_name__

Blocks

To list available blocks use:

python video.py blocks

To get more information about a specific block use:

python video.py blocks __block_name__

Effects

To list available effects use:

python video.py effects

To get more information about a specific effect use:

python video.py effects __effect_name__

Each of the commands above will display a table containing information about given module.

About

videopy - video creation using YAML files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages