class VideoAnalyzer
Ruby on Rails 5.2.8.1
Since v5.2.8.1Extracts the following from a video blob:
-
Width (pixels)
-
Height (pixels)
-
Duration (seconds)
-
Angle (degrees)
-
Display aspect ratio
Example:
ActiveStorage::VideoAnalyzer.new(blob).metadata # => { width: 640.0, height: 480.0, duration: 5.0, angle: 0, display_aspect_ratio: [4, 3] }
When a video’s angle is 90 or 270 degrees, its width and height are automatically swapped for convenience.
This analyzer requires the ffmpeg system library, which is not provided by Rails.
Inherits from
Methods (defined here)
Private methods
(16)
Implementation detail — not part of the public API.
- # angle
- # computed_height
- # display_aspect_ratio
- # display_height_scale
- # duration
- # encoded_height
- # encoded_width
- # ffprobe_path
- # height
- # probe
- # probe_from
- # rotated?
- # streams
- # tags
- # video_stream
- # width
Methods (inherited)
From ActiveStorage::Analyzer (3)
From Object (17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # unescape
- # with_options