Sha256: 0f3e90967f4bf96907ce1c8426114a184fe8a091a12199c6f7d42d6f3942da1e
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
class Transcode < XMorph::Base DEFAULT = "default" def set_profiles self.profiles = { DEFAULT => "ffmpeg -y -i %{IN} -map 0:v -map 0:a:0 -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -vf \"fps=fps=25\" -vf \"scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2\" -pix_fmt yuv420p -flags +ilme+ildct -top 1 -g 13 -bf 2 -profile:v high -level 4.1 -vb 15000000 -minrate:v 15000000 -maxrate:v 15000000 -muxrate 16000000 -bufsize:v 30000000 -x264opts nal-hrd=cbr -refs 6 -keyint_min 1 -aspect 16:9 -deblock -1:-1 -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 %{OUT} ", } end def video_checks { ALLOWED_ASPECT_RATIO => IGNORE, ALLOWED_HEIGHT => IGNORE, ALLOWED_WIDTH => IGNORE, 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 # Same transcode rule is applied for all assets. def set_profile_name self.profile_name = DEFAULT XMorph::Base.logger.debug("XMorph#set_profile_name#hungama: using profile #{self.profile_name}") unless self.profile_name.nil? return true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xmorph-0.1.9 | lib/xmorph/customers/hungama/Hungama/transcode.rb |