Class: Ffprobe::MediaFile
- Inherits:
-
Object
- Object
- Ffprobe::MediaFile
- Defined in:
- lib/ffprobe.rb
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(file_name) ⇒ MediaFile
constructor
A new instance of MediaFile.
- #streams ⇒ Object
Constructor Details
#initialize(file_name) ⇒ MediaFile
Returns a new instance of MediaFile.
7 8 9 10 11 12 13 |
# File 'lib/ffprobe.rb', line 7 def initialize file_name = "-hide_banner -loglevel panic -print_format json -show_format -show_streams" cmd = "ffprobe #{} #{file_name}" stdout = `#{cmd}` file_hash = JSON.parse(stdout) @file = MyHash.new file_hash end |