Class: Hydra::Derivatives::Processors::Video::Config
- Inherits:
-
Object
- Object
- Hydra::Derivatives::Processors::Video::Config
- Defined in:
- lib/hydra/derivatives/processors/video/config.rb
Defined Under Namespace
Classes: CodecConfig
Instance Attribute Summary collapse
- #audio_attributes ⇒ Object
- #size_attributes ⇒ Object
- #video_attributes ⇒ Object
- #video_bitrate ⇒ Object
Instance Method Summary collapse
- #default_video_attributes(bitrate = video_bitrate) ⇒ Object
- #jpeg ⇒ Object
- #mkv ⇒ Object
- #mpeg4 ⇒ Object
- #webm ⇒ Object
Instance Attribute Details
#audio_attributes ⇒ Object
18 19 20 |
# File 'lib/hydra/derivatives/processors/video/config.rb', line 18 def audio_attributes @audio_attributes ||= default_audio_attributes end |
#size_attributes ⇒ Object
14 15 16 |
# File 'lib/hydra/derivatives/processors/video/config.rb', line 14 def size_attributes @size_attributes ||= default_size_attributes end |
#video_attributes ⇒ Object
10 11 12 |
# File 'lib/hydra/derivatives/processors/video/config.rb', line 10 def video_attributes @video_attributes ||= default_video_attributes end |
#video_bitrate ⇒ Object
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 |
#jpeg ⇒ Object
35 36 37 |
# File 'lib/hydra/derivatives/processors/video/config.rb', line 35 def jpeg @jpeg ||= CodecConfig.new('-vcodec mjpeg') end |
#mkv ⇒ Object
31 32 33 |
# File 'lib/hydra/derivatives/processors/video/config.rb', line 31 def mkv @mkv ||= CodecConfig.new('-vcodec ffv1') end |
#mpeg4 ⇒ Object
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 -profile:v high -pix_fmt yuv420p -acodec #{audio_encoder.audio_encoder}") end |
#webm ⇒ Object
27 28 29 |
# File 'lib/hydra/derivatives/processors/video/config.rb', line 27 def webm @webm ||= CodecConfig.new('-vcodec libvpx -acodec libvorbis') end |