Class: RVideo::Tools::Ffmpeg
- Inherits:
-
Object
- Object
- RVideo::Tools::Ffmpeg
- Includes:
- AbstractTool::InstanceMethods
- Defined in:
- lib/rvideo/tools/ffmpeg.rb
Instance Attribute Summary collapse
-
#audio_size ⇒ Object
readonly
Returns the value of attribute audio_size.
-
#bitrate ⇒ Object
readonly
Returns the value of attribute bitrate.
-
#fps ⇒ Object
readonly
Returns the value of attribute fps.
-
#frame ⇒ Object
readonly
Returns the value of attribute frame.
-
#header_size ⇒ Object
readonly
Returns the value of attribute header_size.
-
#overhead ⇒ Object
readonly
Returns the value of attribute overhead.
-
#psnr ⇒ Object
readonly
Returns the value of attribute psnr.
-
#q ⇒ Object
readonly
Returns the value of attribute q.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
-
#video_size ⇒ Object
readonly
Returns the value of attribute video_size.
Attributes included from AbstractTool::InstanceMethods
#command, #options, #raw_result
Instance Method Summary collapse
-
#original_fps ⇒ Object
Return -r and the frame rate of the original file.
-
#tool_command ⇒ Object
Not sure if this is needed anymore…
Methods included from AbstractTool::InstanceMethods
#execute, #initialize, #interpolate_variables, #matched_variable
Instance Attribute Details
#audio_size ⇒ Object (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 |
#bitrate ⇒ Object (readonly)
Returns the value of attribute bitrate.
6 7 8 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 6 def bitrate @bitrate end |
#fps ⇒ Object (readonly)
Returns the value of attribute fps.
6 7 8 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 6 def fps @fps end |
#frame ⇒ Object (readonly)
Returns the value of attribute frame.
6 7 8 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 6 def frame @frame end |
#header_size ⇒ Object (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 |
#overhead ⇒ Object (readonly)
Returns the value of attribute overhead.
6 7 8 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 6 def overhead @overhead end |
#psnr ⇒ Object (readonly)
Returns the value of attribute psnr.
6 7 8 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 6 def psnr @psnr end |
#q ⇒ Object (readonly)
Returns the value of attribute q.
6 7 8 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 6 def q @q end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
6 7 8 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 6 def size @size end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
6 7 8 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 6 def time @time end |
#video_size ⇒ Object (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_fps ⇒ Object
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_command ⇒ Object
Not sure if this is needed anymore…
9 10 11 |
# File 'lib/rvideo/tools/ffmpeg.rb', line 9 def tool_command 'ffmpeg' end |