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.10.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.10-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: image2pipe-0.1.10.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.3

File hashes

Hashes for image2pipe-0.1.10.tar.gz
Algorithm Hash digest
SHA256 be5680add2f6077837e3efa6156b428fd289866dabedee7d8b1abaf8a9beafdf
MD5 8bd2a23f0b1ef8b73009b123f5b4a7b1
BLAKE2b-256 37eba1edda961e669d0fdf9118e2ece3316e399592f5d776cce7568a7f90b39b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: image2pipe-0.1.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.7 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.3

File hashes

Hashes for image2pipe-0.1.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 46b5a0c2d504586e0a8bf4822e796a9ee353d5b522e2e97211ec48238c831293
MD5 cf9aece6e9fff7ec4fce33af25ab96c6
BLAKE2b-256 b1e712ba16928858ab923e9b36ded4dad4b7fe22cb6500a070680520d855cb40

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