Skip to content

Commit

Permalink
Prioritize watermark-related parameters to work with ffmpeg 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
rackfishdaniel committed Nov 9, 2015
1 parent 219848b commit 6dd86e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ffmpeg/encoding_options.rb
Expand Up @@ -13,8 +13,9 @@ def to_s
# all other parameters go after so that we can override whatever is in the preset
codecs = params.select { |p| p =~ /codec/ }
presets = params.select { |p| p =~ /\-.pre/ }
other = params - codecs - presets
params = codecs + presets + other
watermarkoptions = params.select { |p| p =~ /i / || p=~ /filter_complex/ }
other = params - codecs - presets - watermarkoptions
params = watermarkoptions + codecs + presets + other

params_string = params.join(" ")
params_string << " #{convert_aspect(calculate_aspect)}" if calculate_aspect?
Expand Down

0 comments on commit 6dd86e8

Please sign in to comment.