ebert

Inspect any video, describe data field descriptions using mediainfo

Install ebert

gem install ebert

Install MediaInfo

Using Homebrew

brew install mediainfo

Other platforms

mediainfo.sourceforge.net/en/Download

From source

mediainfo.sourceforge.net/en/Download/Source

Basic Usage

results = Ebert.inspect 'path/to/video.mp4'

results[:format]              # 'MPEG-4'
results[:duration]            # '1mn 1s'
results[:audio][:format]      # 'AAC'
results[:video][:width]       # '1920 pixels'

Full info

results = Ebert.inspect 'path/to/video.mp4', full: true

results[:file_size]
#  => {
#    string0: '11246943',
#    string1: '10.7 MiB',
#    string2: '11 MiB',
#    string3: '10.7 MiB',
#    string4: '10.73 MiB'
#  }

results[:duration]
#  => {
#    string0: '60935',
#    string1: '1mn 0s',
#    string2: '1mn 0s 935ms',
#    string3: '00:01:00.935',
#    string4: '00:01:00;23',
#    string5: '00:01:00.935 (00:01:00;23)'
#  }

results[:video][:width]
#  => {
#    string0: '1920',
#    string1: '1920 pixels'
#  }

Specify path to MediaInfo

Ebert.mediainfo_path = '/usr/local/bin/mediainfo'

Describe a MediaInfo field

Ebert.describe :video, :duration, :string0
# => "Play time of the stream in ms"

Contributing to ebert

Copyright © 2015 Archr.IO. See LICENSE.txt for further details.