Module: FFMPEG

Defined in:
lib/ffmpeg/movie.rb,
lib/ffmpeg/version.rb,
lib/streamio-ffmpeg.rb,
lib/ffmpeg/transcoder.rb,
lib/ffmpeg/encoding_options.rb

Defined Under Namespace

Classes: EncodingOptions, Movie, Transcoder

Constant Summary collapse

VERSION =
"0.8.4"

Class Method Summary collapse

Class Method Details

.ffmpeg_binaryString

Get the path to the ffmpeg binary, defaulting to ‘ffmpeg’

Returns:

  • (String)

    the path to the ffmpeg binary



43
44
45
# File 'lib/streamio-ffmpeg.rb', line 43

def self.ffmpeg_binary
  @ffmpeg_binary.nil? ? 'ffmpeg' : @ffmpeg_binary
end

.ffmpeg_binary=(bin) ⇒ String

Set the path of the ffmpeg binary. Can be useful if you need to specify a path such as /usr/local/bin/ffmpeg

Parameters:

  • path (String)

    to the ffmpeg binary

Returns:

  • (String)

    the path you set



36
37
38
# File 'lib/streamio-ffmpeg.rb', line 36

def self.ffmpeg_binary=(bin)
  @ffmpeg_binary = bin
end

.loggerLogger

Get FFMPEG logger.

Returns:

  • (Logger)


24
25
26
27
28
29
# File 'lib/streamio-ffmpeg.rb', line 24

def self.logger
  return @logger if @logger
  logger = Logger.new(STDOUT)
  logger.level = Logger::INFO
  @logger = logger
end

.logger=(log) ⇒ Logger

FFMPEG logs information about its progress when it’s transcoding. Jack in your own logger through this method if you wish to.

Parameters:

  • log (Logger)

    your own logger

Returns:

  • (Logger)

    the logger you set



17
18
19
# File 'lib/streamio-ffmpeg.rb', line 17

def self.logger=(log)
  @logger = log
end