}
if (videoCodec === 'av01') {
- const level = videoStream.level
+ let level = videoStream.level.toString()
+ if (level.length === 1) level = `0${level}`
// Guess the tier indicator and bit depth
return `${videoCodec}.${baseProfile}.${level}M.08`
}
- // Default, h264 codec
let level = videoStream.level.toString(16)
if (level.length === 1) level = `0${level}`
+ // Default, h264 codec
return `${videoCodec}.${baseProfile}${level}`
}
type: 'vod' | 'live'
includeInput: boolean
strictLower: boolean
+ hasAudio: boolean
}) {
- const { input, type, includeInput, strictLower } = options
+ const { input, type, includeInput, strictLower, hasAudio } = options
const configResolutions = type === 'vod'
? CONFIG.TRANSCODING.RESOLUTIONS
if (input < resolution) continue
// We only want lower resolutions than input file
if (strictLower && input === resolution) continue
+ // Audio resolutio but no audio in the video
+ if (resolution === VideoResolution.H_NOVIDEO && !hasAudio) continue
resolutionsEnabled.add(resolution)
}
const channelLayout = parsedAudio.audioStream['channel_layout']
// Causes playback issues with Chrome
- if (!channelLayout || channelLayout === 'unknown') return false
+ if (!channelLayout || channelLayout === 'unknown' || channelLayout === 'quad') return false
return true
}