A Python package for creating slowed and reverbed versions of videos
Project description
Reverbed
A Python package for creating slowed and reverbed versions of videos by processing audio and video content from YouTube.
Features
- Download and process audio from YouTube videos
- Adjust audio speed and add custom reverb effects
- Loop video segments with custom start and end times
- Combine processed audio with looped video
- Support for multiple processing configurations
- Interactive YouTube search with keyboard navigation
Installation
From PyPI (Recommended)
pip install reverbed
From Source
- Clone the repository:
git clone https://github.com/paramp07/reverbed.git
cd reverbed
- Install the package:
pip install -e .
Usage
Command Line Interface
After installation, you can use the package from the command line:
reverbed
This will start the interactive interface where you can:
- Choose to use an example configuration or create a new one
- Input YouTube URLs or search for videos
- Customize audio speed and reverb effects
- Set video loop times
- Process and combine the final video
Python API
from reverbed import Reverbed
# Create a Reverbed instance
reverbed = Reverbed()
# Process a video using interactive mode
reverbed.process()
# Or configure programmatically
reverbed.audio_url = "https://www.youtube.com/watch?v=example"
reverbed.audio_speed = 0.8
reverbed.loop_video = "https://www.youtube.com/watch?v=example"
reverbed.start_time = "0:20"
reverbed.end_time = "0:30"
reverbed.final_video = "output_video"
reverbed.process()
Configuration
Create a config.json file with your processing settings:
{
"examples": [
{
"name": "Example 1",
"audio_url": "https://www.youtube.com/watch?v=example",
"audio_speed": 0.8,
"loop_video": "https://www.youtube.com/watch?v=example",
"start_time": "20",
"end_time": "30",
"final_video": "example1_output",
"room_size": 0.75,
"damping": 0.5,
"wet_level": 0.08,
"dry_level": 0.2
}
]
}
Configuration Parameters
| Parameter | Type | Description | Range |
|---|---|---|---|
name |
string | Name of the processing example | - |
audio_url |
string | YouTube URL for audio source | Valid YouTube URL |
audio_speed |
float | Speed multiplier for audio | 0.0 to 1.0 |
loop_video |
string | YouTube URL for video to loop | Valid YouTube URL |
start_time |
string | Start time for video loop | Seconds or "MM:SS" |
end_time |
string | End time for video loop | Seconds or "MM:SS" |
final_video |
string | Output video filename | - |
room_size |
float | Room size for reverb effect | 0.0 to 1.0 |
damping |
float | Damping for reverb effect | 0.0 to 1.0 |
wet_level |
float | Wet level for reverb effect | 0.0 to 1.0 |
dry_level |
float | Dry level for reverb effect | 0.0 to 1.0 |
API Reference
Core Module
class Reverbed
Main class for video processing.
Methods:
__init__(): Initialize Reverbed instanceprocess(): Process video with current settingsload_example(example): Load settings from example configurationassign_values(): Interactive configuration of settings
Utility Functions
Audio Processing
from reverbed import download_audio, slowed_reverb
# Download audio from YouTube
download_audio(video_url, output_path, audio_format='wav')
# Apply slowed and reverb effects
slowed_reverb(
audio_file,
output_file,
speed=0.8,
room_size=0.75,
damping=0.5,
wet_level=0.08,
dry_level=0.2
)
Video Processing
from reverbed import download_video, combine_audio_video
# Download and trim video
download_video(url, output_path, start_time, end_time)
# Combine audio and video
combine_audio_video(audio_file, video_file, output_name)
YouTube Search
from reverbed import search_youtube, select_from_search
# Search YouTube
results = search_youtube(query, max_results=10)
# Interactive result selection
selected_url = select_from_search(results)
Requirements
- Python 3.6 or higher
- FFmpeg (for audio/video processing)
- Required Python packages (automatically installed):
- pytube
- moviepy
- yt-dlp
- soundfile
- pedalboard
- numpy
Development
Setting up Development Environment
- Clone the repository
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies:
pip install -e ".[dev]"
Running Tests
python -m pytest tests/
Building the Package
python -m build
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- FFmpeg for audio/video processing
- YouTube-DL for video downloading
- All contributors and users of this package
Changelog
0.1.0 (Initial Release)
- Basic functionality for video processing
- YouTube video download support
- Audio speed and reverb effects
- Video looping capabilities
- Interactive YouTube search
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reverbed-0.2.0.tar.gz.
File metadata
- Download URL: reverbed-0.2.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ef02011728b68ff541e417094ba338f325cf014ca374899b7b466dda76ea412
|
|
| MD5 |
acf84b24617f6980eac919d80bbf75df
|
|
| BLAKE2b-256 |
fa24ed4bab3df989112f730a10f41a57783dda194beb0e435f50e5c30da50063
|
File details
Details for the file reverbed-0.2.0-py3-none-any.whl.
File metadata
- Download URL: reverbed-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7382f4c9c7adacb13406b1effe42bfd9e534df2af33a8f47eda979bc5f995966
|
|
| MD5 |
54a555b16b6223c06a2f12f01e97a7fa
|
|
| BLAKE2b-256 |
858961f98a24447c8578bfa709bac7eda0a7b2ae5b230f45ed73635bf25fd78e
|