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¶ ↑
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.
-
Fork the project.
-
Start a feature/bugfix branch.
-
Commit and push until you are happy with your contribution.
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright¶ ↑
Copyright © 2015 Archr.IO. See LICENSE.txt for further details.