Skip to main content

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

image2pipe-0.1.11.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image2pipe-0.1.11-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file image2pipe-0.1.11.tar.gz.

File metadata

  • Download URL: image2pipe-0.1.11.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for image2pipe-0.1.11.tar.gz
Algorithm Hash digest
SHA256 c181b1758857dea42ec6654a9a6e789e2aced2ebf9829dd19bfb096964c6a6af
MD5 70e949bb9688c09ed7f6de0f794e9381
BLAKE2b-256 cfb580546782cd79b804b0c9cea308afa480f05bde6a62a0f2f4d8f7b1214633

See more details on using hashes here.

File details

Details for the file image2pipe-0.1.11-py2.py3-none-any.whl.

File metadata

  • Download URL: image2pipe-0.1.11-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for image2pipe-0.1.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4333622ab8fb45ab40b69e3632eecfc82b15214909469593d5b6caeb2f65a333
MD5 bd0017a6b271a18c3751b5fda752a874
BLAKE2b-256 22fc0063fce2c4df3a34194d9d5614c2c972751540e811da0221409a5fd39d9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page