Class: Hydra::Derivatives::Processors::Video::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/hydra/derivatives/processors/video/config.rb

Defined Under Namespace

Classes: CodecConfig

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#audio_attributesObject



18
19
20
# File 'lib/hydra/derivatives/processors/video/config.rb', line 18

def audio_attributes
  @audio_attributes ||= default_audio_attributes
end

#size_attributesObject



14
15
16
# File 'lib/hydra/derivatives/processors/video/config.rb', line 14

def size_attributes
  @size_attributes ||= default_size_attributes
end

#video_attributesObject



10
11
12
# File 'lib/hydra/derivatives/processors/video/config.rb', line 10

def video_attributes
  @video_attributes ||= default_video_attributes
end

#video_bitrateObject



6
7
8
# File 'lib/hydra/derivatives/processors/video/config.rb', line 6

def video_bitrate
  @video_bitrate ||= default_video_bitrate
end

Instance Method Details

#default_video_attributes(bitrate = video_bitrate) ⇒ Object



49
50
51
# File 'lib/hydra/derivatives/processors/video/config.rb', line 49

def default_video_attributes(bitrate = video_bitrate)
  "-g 30 -b:v #{bitrate}"
end

#jpegObject



35
36
37
# File 'lib/hydra/derivatives/processors/video/config.rb', line 35

def jpeg
  @jpeg ||= CodecConfig.new('-vcodec mjpeg')
end

#mkvObject



31
32
33
# File 'lib/hydra/derivatives/processors/video/config.rb', line 31

def mkv
  @mkv ||= CodecConfig.new('-vcodec ffv1')
end

#mpeg4Object



22
23
24
25
# File 'lib/hydra/derivatives/processors/video/config.rb', line 22

def mpeg4
  audio_encoder = Hydra::Derivatives::AudioEncoder.new
  @mpeg4 ||= CodecConfig.new("-vcodec libx264 -acodec #{audio_encoder.audio_encoder}")
end

#webmObject



27
28
29
# File 'lib/hydra/derivatives/processors/video/config.rb', line 27

def webm
  @webm ||= CodecConfig.new('-vcodec libvpx -acodec libvorbis')
end