Metadata-Version: 1.2
Name: ffms
Version: 0.3a2
Summary: Bindings for FFmpegSource
Description: ffms – Python bindings for FFmpegSource
       |=======================================
       |
       |
       |Example usage
       |-------------
       |
       |If you don’t need to keep the index, create a video source right away:
       |
       |>>> import ffms
       |>>> source_file = "test/x264.mkv"
       |>>> vsource = ffms.VideoSource(source_file)
       |
       |
       |Or you can create an indexer:
       |
       |>>> indexer = ffms.Indexer(source_file)
       |>>> indexer.format_name
       |'matroska'
       |>>> indexer.track_info_list
       |[TrackInfo(type=0, codec_name='h264')]
       |
       |
       |Then create the index for the video source:
       |
       |>>> index = indexer.do_indexing(-1)
       |>>> track_number = index.get_first_indexed_track_of_type(ffms.FFMS_TYPE_VIDEO)
       |>>> vsource = ffms.VideoSource(source_file, track_number, index)
       |
       |
       |Extract information from the video source:
       |
       |>>> vsource.properties.NumFrames
       |8
       |>>> vsource.track.keyframes
       |[0, 5]
       |>>> vsource.track.timecodes
       |[0.0, 1000.0, 2000.0, 3000.0, 4000.0, 5000.0, 6000.0, 7000.0]
       |
       |
       |Retrieve a video frame:
       |
       |>>> frame = vsource.get_frame(0)
       |>>> frame.EncodedWidth, frame.EncodedHeight
       |(128, 72)
       |>>> frame.planes[0]
       |array([16, 16, 16, ..., 16, 16, 16], dtype=uint8)
       |
       |
       |``ffmsinfo.py`` is a demo script showing how this package can be used.
       |
       |
       |Installation
       |------------
       |
       |To install the package for Python 3, use::
       |
       |  $ ./setup.py install
       |
       |To install the package for Python 2, use::
       |
       |  $ python2 setup.py install
       |
       |On Windows, you may use one of the MSI binary packages provided on the
       |`download page <https://bitbucket.org/spirit/ffms/downloads>`_.
       |
       |
       |Requirements
       |------------
       |
       |- `Python 3.2+ <http://www.python.org>`_ (or 2.7)
       |- `FFmpegSource <http://code.google.com/p/ffmpegsource>`_
       |- `numpy <http://www.numpy.org>`_
       |- `pywin32 <http://sourceforge.net/projects/pywin32>`_ (Windows only)
       |- `lib3to2 <https://bitbucket.org/amentajo/lib3to2>`_
       |  (if installing for Python 2)
       |
       |
       |The API was designed to be an object-oriented and Pythonic version
       |of `the original FFmpegSource API
       |<http://ffmpegsource.googlecode.com/svn/trunk/doc/ffms2-api.html>`_.
Keywords: 
Home-page: https://bitbucket.org/spirit/ffms
Author: spirit
Author-email: hiddenspirit@gmail.com
Maintainer: UNKNOWN
Maintainer-email: UNKNOWN
License: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Download-URL: https://bitbucket.org/spirit/ffms/downloads
Requires-Dist: numpy
Requires-Dist: pywin32; sys.platform == 'win32'
Requires-Python: >=2.7,!=3.0,!=3.1
Requires-External: libffms2-2
