Sha256: 2902af9bc4287e2114329117e559f8cee7016bb9e609063fcf5b210c2777d589
Contents?: true
Size: 1.31 KB
Versions: 8
Compression:
Stored size: 1.31 KB
Contents
class Transcode < XMorph::Base def set_profiles self.profiles = { "4_3_720_stereo" => "ffmpeg -y -i %{IN} -vf \"fps=fps=25,scale=720x576\" -pix_fmt yuv420p -vcodec h264 -g 12 -bf 2 -x264opts nal-hrd=cbr -profile:v high -flags +ilme+ildct -top 1 -vb 8000000 -minrate:v 8000000 -maxrate:v 8000000 -bufsize:v 16000000 -acodec libfdk_aac -profile:a aac_low -ab 192k -map 0:v -map 0:a:0 -muxrate 9011200 -streamid 0:2064 -streamid 1:2068 -vsync 1 -async 1 %{OUT} 2>&1", } end def video_checks { ALLOWED_ASPECT_RATIO => ["4:3"], ALLOWED_HEIGHT => [576], ALLOWED_WIDTH => [720], 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", "pcm"], ALLOWED_AUDIO_BIT_RATE => IGNORE, ALLOWED_NUMBER_OF_AUDIO_CHANNELS => [2], } end #profiles are classified based on height, aspect ratio and number of audio channels in a track. def set_profile_name self.profile_name = "4_3_720_stereo" XMorph::Base.logger.debug("XMorph#set_profile_name#sabatv: using profile #{self.profile_name}") unless self.profile_name.nil? return true end end
Version data entries
8 entries across 8 versions & 2 rubygems