Fix audio always being re-encoded even for passthrough-eligible media (#1839)

This commit is contained in:
Una 2022-09-02 00:29:31 -07:00 committed by GitHub
parent 156c6ea36c
commit d4e63cd980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,8 +40,10 @@ module Paperclip
@output_options['f'] = 'image2' @output_options['f'] = 'image2'
@output_options['vframes'] = 1 @output_options['vframes'] = 1
when 'mp4' when 'mp4'
@output_options['acodec'] = 'aac' unless eligible_to_passthrough?(metadata)
@output_options['strict'] = 'experimental' @output_options['acodec'] = 'aac'
@output_options['strict'] = 'experimental'
end
if high_vfr?(metadata) && !eligible_to_passthrough?(metadata) if high_vfr?(metadata) && !eligible_to_passthrough?(metadata)
@output_options['vsync'] = 'vfr' @output_options['vsync'] = 'vfr'