Sha256: 63bd3c25cb1a988bc5b52ced8fb6c6967e9b1ecd9cd7a3fcef515f7c793fc514
Contents?: true
Size: 1.32 KB
Versions: 2
Compression:
Stored size: 1.32 KB
Contents
class Transcode < XMorph::Base DEFAULT = "default" def set_profiles self.profiles = { DEFAULT => "ffmpeg -y -i %{IN} -vf \"fps=fps=29.970000,scale=1920x1080\" -pix_fmt yuv420p -vcodec h264 -g 13 -bf 2 -x264opts nal-hrd=cbr -profile:v high -flags +ilme+ildct -top 1 -vb 15000000 -minrate:v 15000000 -maxrate:v 15000000 -bufsize:v 30000000 -acodec libfdk_aac -profile:a aac_low -ab 192k -map 0:v -map 0:a:0 -muxrate 16711200 -streamid 0:2064 -streamid 1:2068 -vsync 1 -async 1 %{OUT}" } end def video_checks { ALLOWED_ASPECT_RATIO => ["16:9", "16:10"], ALLOWED_HEIGHT => [720, 1080, 2160], ALLOWED_WIDTH => [1280, 1920, 3480], 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, 2], ALLOWED_AUDIO_CODECS => ["pcm", "aac"], ALLOWED_AUDIO_BIT_RATE => IGNORE, ALLOWED_NUMBER_OF_AUDIO_CHANNELS => [1, 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#peopletv: using profile #{self.profile_name}") unless self.profile_name.nil? return true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
xmorph-0.1.4 | lib/xmorph/customers/peopletv/peopletv/transcode.rb |
xmorph-0.1.3 | lib/xmorph/peopletv/peopletv/transcode.rb |