Simple ffmpeg wrapper for image2pipe
Project description
# Why
I need to extract frames from videos in order to feed into 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()
decoder = image2pipe.images_from_url(q, "shuttle-flip.mp4", fps="30", scale=(1000, 556))
decoder.start()
for i in range(30):
fn, img = q.get()
cv2.imshow("frame %d" % i, img)
cv2.waitKey()
cv2.destroyAllWindows()
```
I need to extract frames from videos in order to feed into 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()
decoder = image2pipe.images_from_url(q, "shuttle-flip.mp4", fps="30", scale=(1000, 556))
decoder.start()
for i in range(30):
fn, img = q.get()
cv2.imshow("frame %d" % i, img)
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.5.tar.gz
(4.4 kB
view details)
File details
Details for the file image2pipe-0.1.5.tar.gz.
File metadata
- Download URL: image2pipe-0.1.5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b59f73927c4b3556872decfe97d08432430d3f9e0c0deb26db8d84c6ba8c088b
|
|
| MD5 |
be38144ec0db6df6a52915b9986c3f48
|
|
| BLAKE2b-256 |
2370637b36663852aa952967d62b1a2896d2a03c6e398df9f34aafc2daf27284
|