Class: Sidekiq::Ffmpeg::Encoder::WebM

Inherits:
Base
  • Object
show all
Defined in:
lib/sidekiq/ffmpeg/encoder/webm.rb

Instance Attribute Summary

Attributes inherited from Base

#audio_bitrate, #audio_sample_rate, #input_filename, #on_complete, #on_progress, #other_options, #output_filename, #size, #video_bitrate

Instance Method Summary collapse

Methods inherited from Base

#aspect, #do_encode, #initialize

Constructor Details

This class inherits a constructor from Sidekiq::Ffmpeg::Encoder::Base

Instance Method Details

#acodecObject



19
20
21
# File 'lib/sidekiq/ffmpeg/encoder/webm.rb', line 19

def acodec
  "libvorbis"
end

#formatObject



23
24
25
# File 'lib/sidekiq/ffmpeg/encoder/webm.rb', line 23

def format
  "webm"
end

#preset_optionsObject



5
6
7
8
9
10
11
12
13
# File 'lib/sidekiq/ffmpeg/encoder/webm.rb', line 5

def preset_options
  {
    :size              => "640x480",
    :video_bitrate     => "600k",
    :audio_bitrate     => "128k",
    :audio_sample_rate => 44100,
    :other_options     => "-aq 3 -partitions all -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -async 2"
  }
end

#vcodecObject



15
16
17
# File 'lib/sidekiq/ffmpeg/encoder/webm.rb', line 15

def vcodec
  "libvpx"
end