Python interface for nvcodec. Encode/Decode H264 with Nvidia GPU Hardware Acceleration.
Project description
NvCodec - Python
Require
- cuda >= 11.2
- numpy >= 1.7
- python >= 3.6
- gcc >= 7.5
- make >= 4.1
Install
pip install pynvcodec
Usage
0. Init PyNvCodec
from nvcodec import VideoSource, VideoDecoder, VideoEncoder
1. Use VideoSource
source = VideoSource("rtmp://RTMP_URL")
h264_data = source.read()
2. Use VideoDecoder
decoder = VideoDecoder()
# output OpenCV format frame
frames = decoder.decode(h264_data)
# output SDL format frame
frames = decoder.decode(h264_data, 1)
3. Use VideoEncoder
encoder = VideoEncoder(width, height)
h264_data = encoder.encode(frame)
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
pynvcodec-0.0.6.tar.gz
(116.6 kB
view details)
File details
Details for the file pynvcodec-0.0.6.tar.gz.
File metadata
- Download URL: pynvcodec-0.0.6.tar.gz
- Upload date:
- Size: 116.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
befc55dd7fb693af19c3da8feef567b9ac4e21a85e4b32b82120943d5149ebe0
|
|
| MD5 |
67f98d2de2e1671879a07c1b017ae222
|
|
| BLAKE2b-256 |
ce1ebee7315eca4716561439fd91dd3424563118db282ccb9cd1810872e052db
|