Metadata-Version: 2.1
Name: ffmpeg-stream-to-numpy
Version: 0.10
Summary: ffmpeg stream to numpy arrays
Home-page: https://github.com/hansalemaos/ffmpeg_stream_to_numpy
Author: Johannes Fischer
Author-email: <aulasparticularesdealemaosp@gmail.com>
License: MIT
Keywords: ffmpeg,numpy,cv2,video,stream
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Editors :: Text Processing
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Text Processing :: Indexing
Classifier: Topic :: Text Processing :: Filters
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE.rst


# ffmpeg stream to numpy arrays 

```python

# 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()

    
```




