lib/xmorph/customers/zsports/asn/transcode.rb in xmorph-0.1.9 vs lib/xmorph/customers/zsports/asn/transcode.rb in xmorph-0.1.11
- old
+ new
@@ -1,32 +1,32 @@
class Transcode < XMorph::Base
MONO = "mono"
STEREO = "stereo"
def set_profiles
self.profiles = {
- MONO => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a1]; [0:a:1]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a2]; [a1][a2]amerge[aout0]\" -map \"[aout0]\" -acodec libfdk_aac -vf \"fps=fps=25,scale=1920:1080\" -vcodec libx264 -pix_fmt yuv420p -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -flags +ilme+ildct -top 1 -profile:v high -b:v 12M -minrate:v 12M -maxrate:v 12M -muxrate 14M -bufsize:v 25M -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 -vsync 1 -async 1 -ac 2 %{OUT} ",
- STEREO => "ffmpeg -y -i %{IN} -map 0:v -map 0:a -acodec libfdk_aac -vf \"fps=fps=25,scale=1920:1080\" -vcodec libx264 -pix_fmt yuv420p -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -flags +ilme+ildct -top 1 -profile:v high -b:v 12M -minrate:v 12M -maxrate:v 12M -muxrate 14M -bufsize:v 25M -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 -vsync 1 -async 1 -ac 2 %{OUT} ",
+ MONO => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a1]; [0:a:1]aformat=sample_fmts=fltp:sample_rates=48000:channel_layouts=mono[a2]; [a1][a2]amerge[aout0]\" -map \"[aout0]\" -acodec libfdk_aac -vf \"fps=fps=25,scale=1920:1080\" -vcodec libx264 -pix_fmt yuv420p -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -flags +ilme+ildct -top 1 -profile:v high -b:v 12M -minrate:v 12M -maxrate:v 12M -muxrate 14M -bufsize:v 25M -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 -vsync 1 -async 1 -ac 2 %{OUT} 2>&1",
+ STEREO => "ffmpeg -y -i %{IN} -map 0:v -map 0:a -acodec libfdk_aac -vf \"fps=fps=25,scale=1920:1080\" -vcodec libx264 -pix_fmt yuv420p -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -flags +ilme+ildct -top 1 -profile:v high -b:v 12M -minrate:v 12M -maxrate:v 12M -muxrate 14M -bufsize:v 25M -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 -vsync 1 -async 1 -ac 2 %{OUT} 2>&1",
}
end
def video_checks
{
ALLOWED_ASPECT_RATIO => ["16:9"],
- ALLOWED_HEIGHT => [1080],
- ALLOWED_WIDTH => [1920],
+ ALLOWED_HEIGHT => [720, 1080],
+ ALLOWED_WIDTH => [1280, 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, 4, 8],
- ALLOWED_AUDIO_CODECS => ["aac", "pcm"],
+ ALLOWED_NUMBER_OF_AUDIO_TRACKS => [1, 2, 4, 6, 8, 16],
+ ALLOWED_AUDIO_CODECS => ["aac", "pcm", ".mp2"],
ALLOWED_AUDIO_BIT_RATE => IGNORE,
- ALLOWED_NUMBER_OF_AUDIO_CHANNELS => [1, 2],
+ ALLOWED_NUMBER_OF_AUDIO_CHANNELS => [1, 2, 4],
}
end
#profiles are classified based on number channels in audio tracks.
def set_profile_name
\ No newline at end of file