ffmpeg stream to numpy arrays
Project description
ffmpeg stream to numpy arrays
# ffmpeg must be installed!
$pip install ffmpeg-stream-to-numpy
from ffmpeg_stream_to_numpy import NumpyVideo
import cv2
vi = NumpyVideo(
videofile=r"C:\Users\Gamer\Videos\dfbs4.mp4",
ffmpeg_param=(
"-re", # real speed
"-hwaccel",
"cuda",
"-c:v",
"h264_cuvid",
),
)
for ini, i in enumerate(vi.play_video_ffmpeg()):
# do something here
cv2.imshow("test", i)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
if ini == 100:
vi.playvideo = False # stops the stream
cv2.destroyAllWindows()
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
Close
Hashes for ffmpeg_stream_to_numpy-0.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32cc5b38aa65cd9ecb8d2e206457ad09e1090fc0602b6b35126e8354b7dc94b8 |
|
MD5 | a1a6ba3070260a3bc96cbebb981e9961 |
|
BLAKE2b-256 | 7c55b9e928bfacc332685249869021beb072c90bf003e05a04885ef9fec0cf9c |
Close
Hashes for ffmpeg_stream_to_numpy-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 591801e796c8911ad2d8ae7c596bff8c0e3b830eab39924a366d61308ef5e38e |
|
MD5 | 40b0c87ec307c6531f64d18e0f1d26e0 |
|
BLAKE2b-256 | dcb82ca7957d7f8aaa600c5488e390e1bff8cb9543de3ca96b68ec506423f7c4 |