A package for resizing videos using Automatic1111 web UI
Project description
Stable Diffusion Video Upscaler
Stable Diffusion Video Upscaler is a Python package that allows you to upscale videos using the Automatic1111 web UI. It provides a convenient way to upscale video resolution while maintaining the original framerate and audio.
Features
- Upscale videos to a specified width and height
- Maintain the original framerate of the video
- Preserve the audio from the original video
- Utilize the Automatic1111 web UI for high-quality upscaling
Requirements
- Python 3.6 or higher
- FFmpeg installed and available in the system PATH
- Automatic1111 web UI running with the
--apiflag
Installation
-
Make sure you have FFmpeg installed on your system. You can download it from the official website: https://ffmpeg.org/
-
Set up the Automatic1111 web UI:
- Clone the repository: https://github.com/AUTOMATIC1111/stable-diffusion-webui
- Follow the installation instructions provided in the repository's README.
- Launch the web UI with the
--apiflag to enable the API access:python launch.py --api
-
Install the Video Upscaler package using pip:
pip install video-upscaler
Usage
-
Import the
VideoUpscalerclass from the package:from video_upscaler import VideoUpscaler
-
Create an instance of the
VideoUpscalerclass:upscaler = VideoUpscaler(host='localhost', port=7860)
host: The hostname or IP address where the Automatic1111 web UI is running (default:'localhost').port: The port number on which the Automatic1111 web UI is running (default:7860).
-
Use the
upscale_videomethod to upscale a video:upscaler.upscale_video(input_video, output_video, output_width, output_height)
input_video: The path to the input video file.output_video: The path where the upscaled video will be saved.output_width: The desired width of the upscaled video.output_height: The desired height of the upscaled video.
Example:
upscaler.upscale_video("input_video.mp4", "output_video.mp4", 1920, 1080)
-
The upscaled video will be saved to the specified output path.
-
This will take some time depending on the machine Running Automatic111 along with the length and framerate of your input video
Example
from video_upscaler import VideoUpscaler
# Create an instance of VideoUpscaler
upscaler = VideoUpscaler(host='localhost', port=7860)
# Upscale a video
upscaler.upscale_video("input_video.mp4", "output_video.mp4", 1920, 1080)
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for more information.
Acknowledgments
- Automatic1111 web UI for providing the upscaling functionality.
- FFmpeg for video processing capabilities.
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 video_upscaler-0.2.0.tar.gz.
File metadata
- Download URL: video_upscaler-0.2.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3188429f73502a4afe6a175801cefea41561037ed594e941286d36f383d17055
|
|
| MD5 |
2ed7aeca6c9bd571eb66a03e37e87978
|
|
| BLAKE2b-256 |
6fe0b97fee2977b01418afb84bcbfc8834ab1ff642a279c562a77b469e4d5090
|
File details
Details for the file video_upscaler-0.2.0-py3-none-any.whl.
File metadata
- Download URL: video_upscaler-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d808631c8ee18b58f57d61c3afb69aee22c82bee04b0fc6c89d28122a8927671
|
|
| MD5 |
0f14421dec60bd5ed6efcf80f2ab78fd
|
|
| BLAKE2b-256 |
8921ac5684e1e06f7faa51f699185901a5e1877716f2de8b3d7171a38fa540ac
|