Metadata-Version: 2.1
Name: CV2-Threaded-Video-Capture
Version: 1.0.0
Summary: Reads a video into a buffer in an extra thread with some nice syntax.
Home-page: https://github.com/Askill/CV2-Threaded-Video-Capture
Author: Patrice Matz
Author-email: mail@patricematz.de
License: UNKNOWN
Keywords: multi-threaded,video reader,CV2,CV
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries

# CV2 Threaded Video Capture

Not much to say here, it enables you to read an entire video or a number of frames from a video in an extra thread with some nice syntax.

This project was initially part of my video synopsis project, wich is why the config dict() is required.

### Full video


    from VideoReader import VideoReader
    import os

    fileName = "out.mp4"
    dirName = os.path.join(os.path.dirname(__file__), "generate test footage")

    config = {}
    config["inputPath"] = os.path.join(dirName, fileName)
    config["videoBufferLength"] = 100

    with VideoReader(config) as reader:
        while not reader.videoEnded():
            framenumber, frame = reader.pop()
            print(framenumber)


### Selection of Frames


    from VideoReader import VideoReader
    import os

    fileName = "out.mp4"
    dirName = os.path.join(os.path.dirname(__file__), "generate test footage")

    config = {}
    config["inputPath"] = os.path.join(dirName, fileName)
    config["videoBufferLength"] = 100

    frameList = list(range(100, 500))

    with VideoReader(config, frameList) as reader:
        while not reader.videoEnded():
            framenumber, frame = reader.pop()
            print(framenumber)



