lib/xmorph/customers/turner-nordic/TurnerNordic/transcode.rb in xmorph-0.1.9 vs lib/xmorph/customers/turner-nordic/TurnerNordic/transcode.rb in xmorph-0.1.11

- old
+ new

@@ -25,33 +25,33 @@ PRO_1080_8_TRACKS = "1080_8_TRACKS" def set_profiles self.profiles = { - PRO_4_3_STEREO => "ffmpeg -y -i %{IN} -map 0:v -map 0:a -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -bf 2 -profile:v high -aspect 4:3 -b:v 12M -minrate:v 12M -maxrate:v 12M -muxrate 14M -bufsize:v 25M -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} ", - PRO_4_3_MORE_CH_4 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b]\" -map \"[a]\" -map \"[b]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 4:3 -bf 2 -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 -streamid 2:2069 %{OUT} ", - PRO_4_3_MORE_CH_8 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b];[0]pan=stereo|c0=c4|c1=c5[c];[0]pan=stereo|c0=c6|c1=c7[d]\" -map \"[a]\" -map \"[b]\" -map \"[c]\" -map \"[d]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 4:3 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} ", - PRO_4_3_2_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -aspect 4:3 -g 13 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_4_3_4_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -aspect 4:3 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_4_3_6_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 4:3 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_4_3_8_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -filter_complex \"[0:a:6][0:a:7] amerge=inputs=2[audio4]\" -map [audio4] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 4:3 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", + PRO_4_3_STEREO => "ffmpeg -y -i %{IN} -map 0:v -map 0:a -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -bf 2 -profile:v high -aspect 4:3 -b:v 12M -minrate:v 12M -maxrate:v 12M -muxrate 14M -bufsize:v 25M -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} 2>&1", + PRO_4_3_MORE_CH_4 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b]\" -map \"[a]\" -map \"[b]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 4:3 -bf 2 -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 -streamid 2:2069 %{OUT} 2>&1", + PRO_4_3_MORE_CH_8 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b];[0]pan=stereo|c0=c4|c1=c5[c];[0]pan=stereo|c0=c6|c1=c7[d]\" -map \"[a]\" -map \"[b]\" -map \"[c]\" -map \"[d]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 4:3 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} 2>&1", + PRO_4_3_2_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -aspect 4:3 -g 13 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_4_3_4_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -aspect 4:3 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_4_3_6_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 4:3 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_4_3_8_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -filter_complex \"[0:a:6][0:a:7] amerge=inputs=2[audio4]\" -map [audio4] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 4:3 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", - PRO_16_9_STEREO => "ffmpeg -y -i %{IN} -map 0:v -map 0:a -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -bf 2 -profile:v high -aspect 16:9 -b:v 12M -minrate:v 12M -maxrate:v 12M -muxrate 14M -bufsize:v 25M -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} ", - PRO_16_9_MORE_CH_4 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b]\" -map \"[a]\" -map \"[b]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 %{OUT} ", - PRO_16_9_MORE_CH_8 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b];[0]pan=stereo|c0=c4|c1=c5[c];[0]pan=stereo|c0=c6|c1=c7[d]\" -map \"[a]\" -map \"[b]\" -map \"[c]\" -map \"[d]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} ", - PRO_16_9_2_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_16_9_4_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_16_9_6_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_16_9_8_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -filter_complex \"[0:a:6][0:a:7] amerge=inputs=2[audio4]\" -map [audio4] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", + PRO_16_9_STEREO => "ffmpeg -y -i %{IN} -map 0:v -map 0:a -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -bf 2 -profile:v high -aspect 16:9 -b:v 12M -minrate:v 12M -maxrate:v 12M -muxrate 14M -bufsize:v 25M -pes_payload_size 16 -streamid 0:2064 -streamid 1:2068 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} 2>&1", + PRO_16_9_MORE_CH_4 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b]\" -map \"[a]\" -map \"[b]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 %{OUT} 2>&1", + PRO_16_9_MORE_CH_8 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b];[0]pan=stereo|c0=c4|c1=c5[c];[0]pan=stereo|c0=c6|c1=c7[d]\" -map \"[a]\" -map \"[b]\" -map \"[c]\" -map \"[d]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} 2>&1", + PRO_16_9_2_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_16_9_4_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_16_9_6_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_16_9_8_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -filter_complex \"[0:a:6][0:a:7] amerge=inputs=2[audio4]\" -map [audio4] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -filter:v \"crop=720:576:0:32\" -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", - PRO_1080_STEREO => "ffmpeg -y -i %{IN} -map 0:v -map 0:a -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_1080_MORE_CH_4 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b]\" -map \"[a]\" -map \"[b]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 %{OUT} ", - PRO_1080_MORE_CH_8 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b];[0]pan=stereo|c0=c4|c1=c5[c];[0]pan=stereo|c0=c6|c1=c7[d]\" -map \"[a]\" -map \"[b]\" -map \"[c]\" -map \"[d]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} ", - PRO_1080_2_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_1080_4_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_1080_6_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", - PRO_1080_8_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -filter_complex \"[0:a:6][0:a:7] amerge=inputs=2[audio4]\" -map [audio4] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} ", + PRO_1080_STEREO => "ffmpeg -y -i %{IN} -map 0:v -map 0:a -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_1080_MORE_CH_4 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b]\" -map \"[a]\" -map \"[b]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 %{OUT} 2>&1", + PRO_1080_MORE_CH_8 => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0]pan=stereo|c0=c0|c1=c1[a];[0]pan=stereo|c0=c2|c1=c3[b];[0]pan=stereo|c0=c4|c1=c5[c];[0]pan=stereo|c0=c6|c1=c7[d]\" -map \"[a]\" -map \"[b]\" -map \"[c]\" -map \"[d]\" -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 -streamid 5:2072 -streamid 6:2073 -streamid 7:2074 -streamid 8:2075 %{OUT} 2>&1", + PRO_1080_2_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_1080_4_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_1080_6_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", + PRO_1080_8_TRACKS => "ffmpeg -y -i %{IN} -map 0:v -filter_complex \"[0:a:0][0:a:1] amerge=inputs=2[audio1]\" -map [audio1] -filter_complex \"[0:a:2][0:a:3] amerge=inputs=2[audio2]\" -map [audio2] -filter_complex \"[0:a:4][0:a:5] amerge=inputs=2[audio3]\" -map [audio3] -filter_complex \"[0:a:6][0:a:7] amerge=inputs=2[audio4]\" -map [audio4] -acodec libfdk_aac -profile:a aac_low -ac 2 -ar 48000 -ab 192k -vcodec libx264 -pix_fmt yuv420p -flags +ilme+ildct -x264opts tff=1 -x264opts nal-hrd=cbr -g 13 -aspect 16:9 -bf 2 -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 -streamid 2:2069 -streamid 3:2070 -streamid 4:2071 %{OUT} 2>&1", } end def video_checks { @@ -81,9 +81,11 @@ self.profile_name = nil mediainfo = self.mediainfo_output video_info = mediainfo["Video"] aspect_ratio = video_info["Display_aspect_ratio"] height = (video_info["Original_height"] || video_info["Height"]).split("pixels")[0].gsub(/ /,"") + + self.error = "Unexpected aspect ratio #{aspect_ratio}, we support 16:9 and 4:3 while height is not 1080" and return if height != 1080 and not (["16:9", "4:3"].include? aspect_ratio) height = aspect_ratio.gsub(":","_") if height != "1080" stereo = false audio_tracks = mediainfo["Audio"]