Browse Source

Add missing transcoder options back

lets-bump-hometown-to-mastodon-4.2
nachtjasmin 2 years ago
parent
commit
b200e4ad1e
No known key found for this signature in database
  1. 4
      lib/paperclip/transcoder.rb

4
lib/paperclip/transcoder.rb

@ -47,6 +47,10 @@ module Paperclip
maximum_bitrate = (size_limit_in_bits / duration).floor - 192_000 # Leave some space for the audio stream
bitrate = [desired_bitrate, maximum_bitrate].min
@output_options['b:v'] = bitrate
@output_options['maxrate'] = bitrate + 192_000
@output_options['bufsize'] = bitrate * 5
if high_vfr?(metadata)
@output_options['vsync'] = 'vfr'
@output_options['r'] = @vfr_threshold

Loading…
Cancel
Save