Skip to main content

Python parser for MediaInfo text logs.

Project description

pymiparse

pymiparse is an easy to use parser for MediaInfo text logs. Most current MediaInfo parsing libraries for Python either act as straight wrappers around the MediaInfo binary or are only capable of translating XML output from MediaInfo.

In addition, pymiparse is capable of automatically parsing and identifying the following in a developer-friendly format, so that developers don’t have to:

  • All MediaInfo sections (General, Audio, Video, Text, Menu)
  • Filename and container
  • Primary video codec
  • Primary audio codec
  • Common audio channel configurations (1.0, 2.0, 2.1, 5.1, 7.1)
  • All audio languages
  • All subtitle languages
  • And more!

pymiparse is powerful and easy to use:

>>> import pymiparse
>>> with open('mediainfo_log.txt', 'r') as f:
...     logs = pymiparse.parse_from_file(f)
...
>>> logs[0].get_primary_video_codec()
'H.264'
>>> logs[0].get_primary_audio_codec()
'AAC'
>>> logs[0].get_primary_audio_channels()
'2.0'
>>> logs[0].get_audio_languages()
['Japanese']
>>> logs[0].get_subtitle_languages()
['English', 'Japanese']

Installing

pymiparse can be installed with pip:

$ pip install pymiparse

Alternatively, you can grab the latest source code from GitHub:

$ git clone git://github.com/wchill/pymiparse.git
$ python setup.py install

Documentation

To be completed…

Contributing

To be completed…

Maintainers

Changes

0.1.1 (2016-11-03)

  • Fixed several parsing bugs.

0.1.0 (2016-11-03)

  • Initial release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pymiparse, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pymiparse-0.1.1.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page