Package Name
Visual and audio engine of Choi Gunhyuk
Installation
Install the package from PyPI:
pip install chgnhyk
ffmpeg
- required to generate video
csound libcsnd6-6.0v5
- required to generate audio
Installation options
pip install chgnhyk[audio]
- requires csound
pip install chgnhyk[window]
- installs moderngl_window
pip install chgnhyk[mediapipe]
- installs mediapipe
- downgrades numpy to 1.26.4
pip install "chgnhyk[opencv]"
- install with opencv
pip install "chgnhyk[audio, window, mediapipe]"
- install with three options
Usage
Basic example:
from chgnhyk import FBO, ClipRenderer
import moderngl
CTX = create_context(require=(330), standalone=True)
SIZE = (1080, 1080)
shader = '''
#version 330
out vec4 outputColor;
in vec2 UV;
uniform sampler2D bckbuffer;
uniform vec2 resolution;
uniform float timer;
uniform float loop_timer;
uniform float duration;
void main() {
vec2 uv = UV;
vec2 rs = resolution;
outputColor = vec4(uv, 1., 1.);
}
'''
scene = FBO(
ctx = CTX, size = (1080, 1080), shader = shader
)
clip = ClipRenderer(duration=2, fps=30, rest_time=0.)
clip.addFBOPass("", scene)
clip.render_frame_sample(clip.duration * 0.0)
clip.extractImage((f"test_{clip.t}.jpg"))
vid = clip.render()
vid.write_videofile(str("test.mp4"), fps=clip.fps)
clip.release()
CTX.release()
Requirements
- Python 3.9 or later
- moderngl
- moderngl_window
- csound
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
Choi Gunhyuk
Links
- PyPI:
- GitHub:
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chgnhyk-0.0.10.tar.gz
(378.3 kB
view details)
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
chgnhyk-0.0.10-py3-none-any.whl
(383.8 kB
view details)
File details
Details for the file chgnhyk-0.0.10.tar.gz.
File metadata
- Download URL: chgnhyk-0.0.10.tar.gz
- Upload date:
- Size: 378.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
330097ebbafc677074804313944df3f7627b1a14ad3dd422291f0195ab7b4227
|
|
| MD5 |
18aad6bbb87eace3d29347ed4dda9d30
|
|
| BLAKE2b-256 |
7836ce5e753cbae9c7c6a26923516abafafd862186c1776aa08db601c6071209
|
File details
Details for the file chgnhyk-0.0.10-py3-none-any.whl.
File metadata
- Download URL: chgnhyk-0.0.10-py3-none-any.whl
- Upload date:
- Size: 383.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95d44f3e6eefe7747aad848f8cf7a53657c88731d4f4428e58c6b555b7d35dc6
|
|
| MD5 |
4b9607d932c46944cea26277cea73869
|
|
| BLAKE2b-256 |
b28dc016a7211c1c62a67fff8019ea7674567a2a60fbfcbc58fec34617941e50
|