Skip to main content

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.8.tar.gz (378.0 kB view details)

Uploaded Source

Built Distribution

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

chgnhyk-0.0.8-py3-none-any.whl (383.3 kB view details)

Uploaded Python 3

File details

Details for the file chgnhyk-0.0.8.tar.gz.

File metadata

  • Download URL: chgnhyk-0.0.8.tar.gz
  • Upload date:
  • Size: 378.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for chgnhyk-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e80233b00defed4441cee026c0064d4a5c4d6674e4feefd96b8524603a9e7832
MD5 0ed9e52e91ce5c94e47fc81767039a25
BLAKE2b-256 3815278096299e77c585e610ebabde762fccb59e5a8b221bbd99969c466b06a1

See more details on using hashes here.

File details

Details for the file chgnhyk-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: chgnhyk-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 383.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for chgnhyk-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4a9bfe00ba53159dc8d22a872236d449abb682ad9ebdfe8b159d62e183b0f4c2
MD5 267811d8379eb274223ae839ba485a83
BLAKE2b-256 664e89a3149553c9b9464870aaad4583c26b8862a1ed85f919e25005737ba2b1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

This release

0.0.8 This release

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page