ffms

Bindings for FFmpegSource
Download

ffms Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL v3
  • Price:
  • FREE
  • Publisher Name:
  • spirit
  • Publisher web site:
  • https://bitbucket.org/spirit/

ffms Tags


ffms Description

ffms is a Python 3 bindings for FFmpegSource.Import the package:>>> import ffmsIf you don’t need to keep the index, create a video source right away:>>> 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_listThen 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 (note that “test/x264.mkv” here is a very small video with just 8 frames at 1 fps):>>> vsource.properties.NumFrames8>>> vsource.track.keyframes>>> vsource.track.timecodesRetrieve a video frame:>>> frame = vsource.get_frame(0)>>> frame.EncodedWidth, frame.EncodedHeight(128, 72)Picture planes from the last retrieved frame:>>> vsource.planesarray(, dtype=uint8)ffmsinfo.py is a demo script showing how this package can be used.The API was designed to be an object-oriented and Pythonic version of the original FFmpegSource API. For more information, you can have a look at the original API documentation.Product's homepage


ffms Related Software