Class: RVideo::Tools::Ffmpeg

Inherits:
Object
  • Object
show all
Includes:
AbstractTool::InstanceMethods
Defined in:
lib/rvideo/tools/ffmpeg.rb

Instance Attribute Summary collapse

Attributes included from AbstractTool::InstanceMethods

#command, #options, #raw_result

Instance Method Summary collapse

Methods included from AbstractTool::InstanceMethods

#execute, #initialize, #interpolate_variables, #matched_variable

Instance Attribute Details

#audio_sizeObject (readonly)

Returns the value of attribute audio_size.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def audio_size
  @audio_size
end

#bitrateObject (readonly)

Returns the value of attribute bitrate.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def bitrate
  @bitrate
end

#fpsObject (readonly)

Returns the value of attribute fps.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def fps
  @fps
end

#frameObject (readonly)

Returns the value of attribute frame.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def frame
  @frame
end

#header_sizeObject (readonly)

Returns the value of attribute header_size.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def header_size
  @header_size
end

#overheadObject (readonly)

Returns the value of attribute overhead.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def overhead
  @overhead
end

#psnrObject (readonly)

Returns the value of attribute psnr.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def psnr
  @psnr
end

#qObject (readonly)

Returns the value of attribute q.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def q
  @q
end

#sizeObject (readonly)

Returns the value of attribute size.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def size
  @size
end

#timeObject (readonly)

Returns the value of attribute time.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def time
  @time
end

#video_sizeObject (readonly)

Returns the value of attribute video_size.



6
7
8
# File 'lib/rvideo/tools/ffmpeg.rb', line 6

def video_size
  @video_size
end

Instance Method Details

#original_fpsObject

Return -r and the frame rate of the original file. E.g.:

-r 29.97

If the original frame rate can’t be determined, return an empty string.



20
21
22
23
24
25
26
27
# File 'lib/rvideo/tools/ffmpeg.rb', line 20

def original_fps
  inspect_original if @original.nil?
  if @original.fps
    "-r #{@original.fps}" 
  else
    ""
  end
end

#tool_commandObject

Not sure if this is needed anymore…



9
10
11
# File 'lib/rvideo/tools/ffmpeg.rb', line 9

def tool_command
  'ffmpeg'
end