Module: Abrizer::InformationHelpers
Instance Method Summary collapse
-
#duration ⇒ Object
TODO: Could this be more flexible to potentially use a file other than the mp4_filepath?.
- #max_height ⇒ Object
- #max_width ⇒ Object
- #min_height ⇒ Object
- #min_width ⇒ Object
- #mp4_height ⇒ Object
- #mp4_width ⇒ Object
Instance Method Details
#duration ⇒ Object
TODO: Could this be more flexible to potentially use a file other than the mp4_filepath?
6 7 8 9 |
# File 'lib/abrizer/information_helpers.rb', line 6 def duration informer = Abrizer::FfprobeInformer.new(filepath: mp4_filepath, output_directory: @output_directory) informer.duration.to_f end |
#max_height ⇒ Object
19 20 21 |
# File 'lib/abrizer/information_helpers.rb', line 19 def max_height @adaptations.last.height end |
#max_width ⇒ Object
11 12 13 |
# File 'lib/abrizer/information_helpers.rb', line 11 def max_width @adaptations.last.width end |
#min_height ⇒ Object
23 24 25 |
# File 'lib/abrizer/information_helpers.rb', line 23 def min_height @adaptations.first.height end |
#min_width ⇒ Object
15 16 17 |
# File 'lib/abrizer/information_helpers.rb', line 15 def min_width @adaptations.first.width end |
#mp4_height ⇒ Object
31 32 33 |
# File 'lib/abrizer/information_helpers.rb', line 31 def mp4_height @adaptations[-2].height end |
#mp4_width ⇒ Object
27 28 29 |
# File 'lib/abrizer/information_helpers.rb', line 27 def mp4_width @adaptations[-2].width end |