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
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
image2pipe-0.1.9.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for image2pipe-0.1.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6d360738ab74ee15fcbf5e68cdfbc25206d17a171062f2a35b732e1ae7bb3d5 |
|
MD5 | 468fbe41cd1598ee823883278e6470ef |
|
BLAKE2b-256 | 87b98b8ee3ec7fdc165ad335621e612d551b5ce7f9cf519b23226f604ecd0aee |