Class: FFmpegCore::Movie
- Inherits:
-
Object
- Object
- FFmpegCore::Movie
- Extended by:
- Forwardable
- Defined in:
- lib/ffmpeg_core/movie.rb
Overview
Modern API for working with video files
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#probe ⇒ Object
readonly
Returns the value of attribute probe.
Instance Method Summary collapse
-
#initialize(path) ⇒ Movie
constructor
A new instance of Movie.
-
#screenshot(output_path, options = {}) ⇒ String
Extract screenshot from video.
-
#transcode(output_path, options = {}) ⇒ String
Transcode video with modern API.
Constructor Details
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/ffmpeg_core/movie.rb', line 8 def path @path end |
#probe ⇒ Object (readonly)
Returns the value of attribute probe.
8 9 10 |
# File 'lib/ffmpeg_core/movie.rb', line 8 def probe @probe end |
Instance Method Details
#screenshot(output_path, options = {}) ⇒ String
Extract screenshot from video
44 45 46 47 |
# File 'lib/ffmpeg_core/movie.rb', line 44 def screenshot(output_path, = {}) screenshotter = Screenshot.new(path, output_path, ) screenshotter.extract end |
#transcode(output_path, options = {}) ⇒ String
Transcode video with modern API
31 32 33 34 |
# File 'lib/ffmpeg_core/movie.rb', line 31 def transcode(output_path, = {}) transcoder = Transcoder.new(path, output_path, ) transcoder.run end |