{
"info": {
"author": "Rich Wareham",
"author_email": "rich.videosequence@richwareham.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Topic :: Multimedia :: Video"
],
"description": "Accessing Video Files as Python Sequences\n=========================================\n\n.. image:: https://travis-ci.org/rjw57/videosequence.svg?branch=master\n :target: https://travis-ci.org/rjw57/videosequence\n\n.. image:: https://coveralls.io/repos/github/rjw57/videosequence/badge.svg?branch=master\n :target: https://coveralls.io/github/rjw57/videosequence?branch=master\n\n.. image:: https://img.shields.io/pypi/v/videosequence.svg\n :target: https://pypi.python.org/pypi/videosequence/\n\nQuite often I find myself writing scripts which need to load a few frames from a\nvideo file, process them and save the result to disk. It's a pain to implement\nvideo opening, seeking and decoding over and over again and complex Python\nbindings are a little overkill for my needs.\n\nVideosequence is a library which hides the complexity of simply opening a video\nfile in Python as a sequence of images. It exposes a video file as just that: a\nPython sequence type containing `PIL `_\n``Image``-s.\n\nFor example, suppose you want to dump every frame from a video stored in\n``foo.mp4`` starting from frame 100:\n\n.. code:: python\n\n from contextlib import closing\n from videosequence import VideoSequence\n\n with closing(VideoSequence(\"foo.mp4\")) as frames:\n for idx, frame in enumerate(frames[100:]):\n frame.save(\"frame{:04d}.jpg\".format(idx))\n\nYou can load a single frame from a sequence just as easily. Let's dump the final\nframe to another JPEG:\n\n.. code:: python\n\n from contextlib import closing\n from videosequence import VideoSequence\n\n with closing(VideoSequence(\"foo.mp4\")) as frames:\n frames[-1].save(\"final-frame.jpg\")\n\nIn general, the ``VideoSequence`` behaves as if it were a long list of each\nframe in the video.\n\nWhat VideoSequence does\n-----------------------\n\n* Frame-accurate seeking\n* Single frame indexing (``vs[0]``, ``vs[-4]``, etc.)\n* Querying the length of the video (``len(vs)``)\n* Slicing a sequence of frames (``vs[100:]``, ``vs[-20:]``, ``vs[10:20]``,\n ``vs[::2]``, etc.)\n* Frames are represented as RGB PIL ``Image`` objects.\n* Can interoperate with ``numpy``. E.g. ``np.asarray(vs[0])``.\n\nWhat VideoSequence does not\n---------------------------\n\n* Handle files without exactly one (and only one) video stream\n* Audio\n\nCaveats\n-------\n\n* Iterating forward one frame at a time is fast. Tricks such as iterating\n backwards or skipping *n* frames at a time work but is likely to be slow.\n* The implementation is based on `GStreamer\n `_\n and so *de facto* only works on a modern Unix-alike such as Linux or FreeBSD.\n* The `PyGObject introspection `_\n libraries must be installed. (See below.)\n\nInstalling\n----------\n\nSee the sections below for any OS-specific instructions. VideoSequence can be\ninstalled from the PyPI:\n\n.. code:: console\n\n $ pip install --user videosequence\n\nIt can also be installed directly from git:\n\n.. code:: console\n\n $ pip install --user git+git://github.com/rjw57/videosequence\n\nUbuntu and Debian\n`````````````````\n\nTo install the Python GObject bindings:\n\n.. code:: console\n\n $ sudo apt install gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 \\\n python-gi python3-gi\n\nGStreamer is almost certainly already installed if you've got some modern\ndesktop environment. If not:\n\n.. code:: console\n\n $ sudo apt install libgstreamer1.0-dev gstreamer1.0-plugins-good\n\nContributing\n------------\n\nBug fixes and ports to new backends welcome. Please make sure that the tests\nstill pass via ``tox`` before opening a new pull request. New functionality\nshould come with tests, please.\n\nCopyright and licensing\n-----------------------\n\nVideosequence is \u00a9 2016 Rich Wareham. Full licence details can be found in\nthe `LICENCE.txt `_ file.",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/rjw57/videosequence",
"keywords": null,
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "videosequence",
"package_url": "https://pypi.org/project/videosequence/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/videosequence/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/rjw57/videosequence"
},
"release_url": "https://pypi.org/project/videosequence/1.1.0/",
"requires_dist": null,
"requires_python": null,
"summary": "Read from and seek into video files as if they were Python sequences of PIL.Image-s.",
"version": "1.1.0"
},
"last_serial": 2041560,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "5a6eb2a6c44fd6071cdb5e6e8d035ccc",
"sha256": "225702567056be4c3cd54b3193c7579eb2f6cb983df83f80515bdad2ed7335be"
},
"downloads": -1,
"filename": "videosequence-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "5a6eb2a6c44fd6071cdb5e6e8d035ccc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5230,
"upload_time": "2016-04-01T21:32:12",
"url": "https://files.pythonhosted.org/packages/50/e3/8484b7589fe3d7815ab968bcb889600f8df70a08edfabf3060c72480fa72/videosequence-1.0.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "77c2b28206c5b5e138f3562b23b50e0d",
"sha256": "282e2e969b67f4bcc5b891868dfb39397f6d57da2343875d73b592fcecfb1b7c"
},
"downloads": -1,
"filename": "videosequence-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "77c2b28206c5b5e138f3562b23b50e0d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5226,
"upload_time": "2016-04-01T22:03:44",
"url": "https://files.pythonhosted.org/packages/5a/80/cb748377e8bc90e8d5be929513666b36a5e741b01275ef5cf6d52834780a/videosequence-1.0.1.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "0e61021da4b42dbf8c9fd62b36f32266",
"sha256": "062e4581f99ea70de42e1907ac87da49f419b91c6ce68e320901109578d3dd7b"
},
"downloads": -1,
"filename": "videosequence-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0e61021da4b42dbf8c9fd62b36f32266",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5614,
"upload_time": "2016-04-02T08:17:19",
"url": "https://files.pythonhosted.org/packages/0d/e5/1888f72156e5d0625283c3d1586a72a58b7ddd715f29247ea10e63af7201/videosequence-1.1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "0e61021da4b42dbf8c9fd62b36f32266",
"sha256": "062e4581f99ea70de42e1907ac87da49f419b91c6ce68e320901109578d3dd7b"
},
"downloads": -1,
"filename": "videosequence-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0e61021da4b42dbf8c9fd62b36f32266",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5614,
"upload_time": "2016-04-02T08:17:19",
"url": "https://files.pythonhosted.org/packages/0d/e5/1888f72156e5d0625283c3d1586a72a58b7ddd715f29247ea10e63af7201/videosequence-1.1.0.tar.gz"
}
]
}