Sha256: e4e9afe5f91e82434a8bb3ba3e2abaca366822ee6e936bb76ba6b812241ec09e

Contents?: true

Size: 665 Bytes

Versions: 2

Compression:

Stored size: 665 Bytes

Contents

module Abrizer
  module InformationHelpers

    # TODO: Could this be more flexible to potentially use a file
    # other than the mp4_filepath?
    def duration
      informer = Abrizer::FfprobeInformer.new(filepath: mp4_filepath, output_directory: @output_directory)
      informer.duration.to_f
    end

    def max_width
      @adaptations.last.width
    end

    def min_width
      @adaptations.first.width
    end

    def max_height
      @adaptations.last.height
    end

    def min_height
      @adaptations.first.height
    end

    def mp4_width
      @adaptations[-2].width
    end

    def mp4_height
      @adaptations[-2].height
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
abrizer-0.6.0 lib/abrizer/information_helpers.rb
abrizer-0.5.0 lib/abrizer/information_helpers.rb