Skip to main content

Simple ffmpeg wrapper for image2pipe which yields rawvideo frames from input video URL

Project description


I need to extract decoded frames from videos in order to feed DNN pipeline.

This is the answer package.


pip install image2pipe


from multiprocessing import Queue
import logging
import cv2

import image2pipe


q = Queue(maxsize=4)
decoder = image2pipe.images_from_url(q, "shuttle-flip.mp4", fps="30", scale=(1000, 556))

 for pair in yield_from_queue(q):
        fn, img = pair
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

        cv2.imshow("gray", gray)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for image2pipe, version 0.1.9
Filename, size File type Python version Upload date Hashes
Filename, size image2pipe-0.1.9.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View
Filename, size image2pipe-0.1.9-py2.py3-none-any.whl (6.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page