Class: Ffprober::Parser
- Inherits:
-
Object
- Object
- Ffprober::Parser
- Defined in:
- lib/ffprober/parser.rb
Class Method Summary collapse
Class Method Details
.from_file(file_to_parse) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/ffprober/parser.rb', line 5 def self.from_file(file_to_parse) unless FfprobeVersion.valid? fail ArgumentError.new("no or unsupported ffprobe version found. (version: #{Ffprober::Ffmpeg::Version.new})") end file_parser = Ffprober::Parsers::File.new(file_to_parse) json_parser = file_parser.load Ffprober::Wrapper.new(json_parser.json) end |