Simple ffmpeg wrapper for image2pipe which yields rawvideo frames from input video URL
Project description
Why
I need to extract decoded frames from videos in order to feed DNN pipeline.
This is the answer package.
Install
pip install image2pipe
Usage
from multiprocessing import Queue
import logging
import cv2
import image2pipe
logging.basicConfig()
q = Queue(maxsize=4)
decoder = image2pipe.images_from_url(q, "shuttle-flip.mp4", fps="30", scale=(1000, 556))
decoder.start()
for pair in yield_from_queue(q):
fn, img = pair
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imshow("gray", gray)
cv2.waitKey()
cv2.destroyAllWindows()
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
Built Distribution
Close
Hashes for image2pipe-nicholas-tancredi-0.1.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb3223ea234e2dff136c402563e39ebc2efae85adf861046777cd69c6d4d916d |
|
MD5 | 91db134e1a9539b82cfcbdcbe6e611d5 |
|
BLAKE2b-256 | 816eab39e550f406d1fdc032f0fee8fd89f6bb898f176a90516fc1b0e3fbed07 |
Close
Hashes for image2pipe_nicholas_tancredi-0.1.11-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c116443e0e403d268b29ef3a0f5947446e430c694bfeef10568280e059ae5531 |
|
MD5 | 26bd42d79dd0a2941b9f7af2f33e80f1 |
|
BLAKE2b-256 | 7992c14cc816416ba688ddbe6f08074e67dac1605693636665dcece01b124852 |