Class: DragonflyVideo::Processors::Optimize

Inherits:
BaseProcessor show all
Defined in:
lib/dragonfly_video/processors/optimize.rb

Constant Summary

Constants inherited from BaseProcessor

BaseProcessor::FFMPEG_COMMAND

Instance Method Summary collapse

Instance Method Details

#call(content, options = {}) ⇒ Object



8
9
10
11
12
13
# File 'lib/dragonfly_video/processors/optimize.rb', line 8

def call(content, options = {})
  raise "optimize only supports mp4" unless content.ext == "mp4"
  content.shell_update do |old_path, new_path|
    "#{FFMPEG_COMMAND} -i #{old_path} -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 -y #{new_path}"
  end
end