'Is there a way to set size of watermark image with Streamio FFMPEG gem rails

Function for encoding actually, I am recoding video from web and then change the resolution to compress video and adding watermark but the size of watermark spare complete screen need a way to resize(minimize the watermark image) I am unable to apply scale filter also . I am using streamio-ffmpeg gem

def encode 
 video = FFMPEG::Movie.new(@file.path)
 options = {
   watermark: Rails.root.join('app/assets/images/watermark.png'), 
   resolution:'320x240',
   watermark_filter: { position: "RT"}
  }
  transcoder_options = { preserve_aspect_ratio: :width }
  video.transcode(@file.path, options, transcoder_options)
 end 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source