1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.
This release is a pre-release and may not be stable for production use.
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.
Requirements
Python 3.2+ (or 2.7)
pywin32 (Windows only)
lib3to2 (if installing for Python 2)
The API was designed to be an object-oriented and Pythonic version of the original FFmpegSource API.
Metadata
Release files for ffms 0.3a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
File added late
1 file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ffms-0.3a2.tar.bz2 | 33.5 kB | Details |
Release files / ffms-0.3a2.tar.bz2
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | ffms-0.3a2.tar.bz2 |
|---|---|
| Size | 33.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bcdfee6f1a344cb97a00834748242a40b1686ecfacd08aead536c12e55d1314
|
|
BLAKE2b-256 checksum How to use checksums |
3934bbd3436958d8de139d88065e9c2f760e3a79691cdbc79ea4e8510a204672
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |