class AudioAnalyzer
Ruby on Rails 7.0.10
Since v7.0.10Extracts duration (seconds) and bit_rate (bits/s) from an audio blob.
Example:
ActiveStorage::Analyzer::AudioAnalyzer.new(blob).metadata # => { duration: 5.0, bit_rate: 320340 }
This analyzer requires the FFmpeg system library, which is not provided by Rails.
Inherits from
Methods (defined here)
Private methods
(7)
Implementation detail — not part of the public API.
- # audio_stream
- # bit_rate
- # duration
- # ffprobe_path
- # probe
- # probe_from
- # streams
Methods (inherited)
From ActiveStorage::Analyzer (4)
- # metadata
- self. accept?
- self. analyze_later?
- self. new
From Object (16)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # with_options
From ActiveRecord::TestFixtures (4)
From ActiveSupport::Concern (3)
- # class_methods
- # included
- # prepended