Sha256: 042e9b5e550fe64c3db69d138c227c6b78b59a16fb99d10c9c198b932846e707

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

class Transcode < XMorph::Base
  REWRAP_COMMAND =  "rewrap_command" 
  def set_profiles
    self.profiles = {
      REWRAP_COMMAND => "ffmpeg -y -i %{IN} -vcodec copy -map 0:v -streamid 0:2064 -map 0:a:0 -streamid 1:2068  -acodec copy -v verbose -vbsf h264_mp4toannexb -y %{OUT}"
    }
  end

  def video_checks
    {
      ALLOWED_ASPECT_RATIO => ["16:9"],
      ALLOWED_HEIGHT => [1080],
      ALLOWED_WIDTH => [1920], 
      ALLOWED_FRAME_RATE => IGNORE,
      ALLOWED_VIDEO_BIT_RATE => IGNORE, #Mbps
      ALLOWED_SCAN_TYPE => IGNORE, #all downcased
    }
  end

  def audio_checks
    {
      PRESENCE_OF_AUDIO_TRACK => VALIDATE,
      ALLOWED_NUMBER_OF_AUDIO_TRACKS => [1],
      ALLOWED_AUDIO_CODECS => ["aac"],
      ALLOWED_AUDIO_BIT_RATE => IGNORE,
      ALLOWED_NUMBER_OF_AUDIO_CHANNELS => [2],
    }
  end

  # Rewrap rule is applied for all assets.
  def set_profile_name
    self.profile_name = REWRAP_COMMAND
    XMorph::Base.logger.debug("XMorph#set_profile_name#LIG: using profile #{self.profile_name}") unless self.profile_name.nil?
    return true
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
amagi_transcode-0.1.14 lib/xmorph/customers/lightning/LIG/transcode.rb
xmorph-0.1.14 lib/xmorph/customers/lightning/LIG/transcode.rb
xmorph-0.1.13 lib/xmorph/customers/lightning/LIG/transcode.rb
xmorph-0.1.11 lib/xmorph/customers/lightning/LIG/transcode.rb
xmorph-0.1.9 lib/xmorph/customers/lightning/LIG/transcode.rb
xmorph-0.1.6 lib/xmorph/customers/lightning/LIG/transcode.rb
xmorph-0.1.5 lib/xmorph/customers/lightning/LIG/transcode.rb
xmorph-0.1.4 lib/xmorph/customers/lightning/LIG/transcode.rb
xmorph-0.1.3 lib/xmorph/lightning/LIG/transcode.rb