Class: MediaInformationGatherer::FFMPEG

Inherits:
Object
  • Object
show all
Defined in:
lib/mig/modules/ffmpeg.rb

Defined Under Namespace

Classes: Movie

Constant Summary collapse

DEFAULT_EXECUTABLE_PATH =
'ffmpeg'

Instance Method Summary collapse

Constructor Details

#initialize(options = { }) ⇒ FFMPEG

Returns a new instance of FFMPEG.

Parameters:

  • options (Hash) (defaults to: { })

Options Hash (options):

  • :ffmpeg_cmd_path (String)


211
212
213
# File 'lib/mig/modules/ffmpeg.rb', line 211

def initialize(options = { })
  @ffmpeg_cmd_path = options.fetch(:ffmpeg_cmd_path, 'ffmpeg')
end

Instance Method Details

#run(file_path, options = { }) ⇒ Object

Parameters:

  • file_path (String)
  • options (Hash) (defaults to: { })

Options Hash (options):

  • :ffmpeg_cmd_path (String)


218
219
220
221
# File 'lib/mig/modules/ffmpeg.rb', line 218

def run(file_path, options = { })
  options = { :ffmpeg_cmd_path => @ffmpeg_cmd_path }.merge(options)
  Movie.new(file_path, options).to_hash
end