ffmpeg command tweaks
This commit is contained in:
parent
885000e21a
commit
1b751e0f6e
@ -191,7 +191,7 @@ const response = {
|
||||
|
||||
if (trueHDReplacementCount <= 1) {
|
||||
|
||||
ffmpegAudioFirstTrack = ` -map 0:a:${audioIdxTruehd} -metadata:s:a:0 "title=${MMCodec} - ${MMChannelLayout} - MM" -disposition:a:0 default`
|
||||
ffmpegAudioFirstTrack = ` -map -0:a -map 0:a:${audioIdxTruehd} -metadata:s:a:0 "title=${MMCodec} - ${MMChannelLayout} - MM" -disposition:a:0 default`
|
||||
|
||||
}
|
||||
else {
|
||||
@ -243,7 +243,7 @@ const response = {
|
||||
|
||||
response.infoLog += 'TrueHD track exists, but no AC3 compatibility track is present. Creating one, and downmixing to 6 channels.\n'
|
||||
|
||||
ffmpegAudioFirstTrack = `-map 0:a:${trueHD} -c:a:0 ac3 -b:a:0 640k -ac:a:0 6 -metadata:s:a:0 "title=AC3 - 5.1 - MM" -disposition:a:0 default`
|
||||
ffmpegAudioFirstTrack = ` -map -0:a -map 0:a:${trueHD} -c:a:0 ac3 -b:a:0 640k -ac:a:0 6 -metadata:s:a:0 "title=AC3 - 5.1 - MM" -disposition:a:0 default`
|
||||
|
||||
}
|
||||
else {
|
||||
@ -343,12 +343,12 @@ const response = {
|
||||
|
||||
if ( file.ffProbeData.streams[1].channels > 6 ) {
|
||||
|
||||
ffmpegAudioFirstTrack = ` -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:0 6 -metadata:s:a:0 "title=AC3 - 5.1 - MM" -disposition:a:0 default`
|
||||
ffmpegAudioFirstTrack = ` -map -0:a -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:0 6 -metadata:s:a:0 "title=AC3 - 5.1 - MM" -disposition:a:0 default`
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
ffmpegAudioFirstTrack = ` -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:0 ${file.ffProbeData.streams[1].channels} -metadata:s:a:0 "title=AC3 - ${MMChannelLayout} - MM" -disposition:a:0 default`
|
||||
ffmpegAudioFirstTrack = ` -map -0:a -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:0 ${file.ffProbeData.streams[1].channels} -metadata:s:a:0 "title=AC3 - ${MMChannelLayout} - MM" -disposition:a:0 default`
|
||||
|
||||
}
|
||||
|
||||
@ -412,7 +412,7 @@ const response = {
|
||||
|
||||
console.log(`Stream ${i} (audio stream ${audioIdx}) is AC3 5.1, but not labelled correctly. Correcting.`)
|
||||
response.infoLog += `Stream ${i} (audio stream ${audioIdx}) is AC3 5.1, but not labelled correctly. Correcting.\n`
|
||||
ffmpegAudioFirstTrack = ` -map 0:a:${audioIdx} -metadata:s:a:0 "title=${MMCodec} - ${MMChannelLayout} - MM" -disposition:a:0 default`
|
||||
ffmpegAudioFirstTrack = ` -map -0:a -map 0:a:${audioIdx} -metadata:s:a:0 "title=${MMCodec} - ${MMChannelLayout} - MM" -disposition:a:0 default`
|
||||
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ const response = {
|
||||
let MMCodec = file.ffProbeData.streams[1].codec_name.toUpperCase();
|
||||
let MMChannelLayout = file.ffProbeData.streams[1].channel_layout.replace('(side)', '');
|
||||
|
||||
ffmpegAudioFirstTrack = ` -map 0:a:0 -metadata:s:a:0 "title=${MMCodec} - ${MMChannelLayout} - MM" -disposition:a:0 default`
|
||||
ffmpegAudioFirstTrack = ` -map -0:a -map 0:a:0 -metadata:s:a:0 "title=${MMCodec} - ${MMChannelLayout} - MM" -disposition:a:0 default`
|
||||
|
||||
console.log(`Copying over other AC3 5.1 tracks`)
|
||||
|
||||
@ -588,7 +588,7 @@ const response = {
|
||||
console.log('File needs transcoding to HEVC. Converting now.')
|
||||
response.infoLog += `☒ File needs transcoding to HEVC.\n`
|
||||
|
||||
ffmpegVideo = ` -c:v hevc_nvenc -b:v 0 -preset p7 -cq 1 -rc-lookahead 32 -bf 0`
|
||||
ffmpegVideo = ` -c:v libx265 -pix_fmt yuv420p10le -preset slow -x265-params crf=${inputs.crf}:bframes=8:rc-lookahead=32:b-intra=1:aq-mode=3`
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user