Skip to main content

A Python package for generating videos from JSON specifications

Project description

VidKit

A simple and powerful Python package for generating videos from JSON configurations. VidKit makes it easy to create videos by combining images, setting durations, and adding audio tracks.

Installation

pip install vidkit

Quick Start

from vidkit import renderVideo

# Define your video configuration
config = {
    "name": "my_video",
    "format": "mp4",
    "fps": 30,
    "resolution": {
        "width": 1920,
        "height": 1080
    },
    "frames": [
        {
            "image": "frame1.jpg",
            "duration": 5
        },
        {
            "image": "frame2.jpg",
            "duration": 5
        }
    ],
    "audio": "background.mp3"
}

# Generate the video
video = renderVideo(config)

# Save to file
with open("output.mp4", "wb") as f:
    f.write(video)

Features

  • Simple JSON-based configuration
  • Support for multiple image frames
  • Audio track integration
  • Fast video generation using moviepy
  • Flexible resolution settings
  • Configurable frame rates

Configuration Options

The video configuration accepts the following parameters:

Parameter Type Description Required
name string Name of the video Yes
format string Output format (currently 'mp4') Yes
framerate number Frame rate in FPS Yes
resolution [width, height] Video dimensions in pixels Yes
frames array List of frame objects Yes
audio string Path to audio file No

Frame Object Properties

Property Type Description Required
image string Path to image file Yes
duration number Duration in seconds Yes

Requirements

  • Python >= 3.6
  • moviepy >= 2.0.0
  • Pillow >= 9.2.0
  • numpy >= 1.25.0

Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Created by Carter Stach (@SpyC0der77)

Support

If you encounter any issues or have questions, please open an issue on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vidkit-0.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vidkit-0.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file vidkit-0.1.1.tar.gz.

File metadata

  • Download URL: vidkit-0.1.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for vidkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2aa769da64ebca8a6f715a78d829e75a711418613a96d17297072a4b03b8f336
MD5 5ed88eaaa14ee669d100853a8054c3c4
BLAKE2b-256 2db63c57d2b6a76ae1f8ed4b1c14e8a17c3385118a81031bf592a72582fcf822

See more details on using hashes here.

File details

Details for the file vidkit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: vidkit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for vidkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7cb0c977139653e9d507751406363118e020bc3d420a54ba22ea955fb4fe78ce
MD5 55b857a0cffd185ab485628325823708
BLAKE2b-256 e606750256aa110c4b84bc2f933930ce4cbf36ad32f6f626306b1615fd1281c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page