Method: UEncode::VideoStreams#configure
- Defined in:
- lib/uencode/elements.rb
#configure(hash) ⇒ Object
Configures the transcoding using a nested hash with the following format:
config = {:video => { ... }, :audio => { ... }
The keys for the “video” hash can be any of the following: bitrate, codec, cbr, crop, deinterlace, framerate, height, keyframe_interval, maxbitrate, par, profile, passes, stretch, width.
The keys for the :audio hash can be any of the following: codec, bitrate, channels, samplerate.
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/uencode/elements.rb', line 324 def configure(hash) vid = hash[:video] aud = hash[:audio] if !vid.nil? configure_video do |c| vid.each_pair { |key, value| c.send("#{key}=", value)} end end if !aud.nil? configure_audio do |c| aud.each_pair { |key, value| c.send("#{key}=", value) } end end end |