From 78cf00971350546525e5f7124ea510b3f7aa8a70 Mon Sep 17 00:00:00 2001 From: Chris Tam Date: Tue, 24 Aug 2021 18:36:31 -0400 Subject: [PATCH] Include all WebM codecs in transcode profile (squash me on submit) --- src/scripts/browserDeviceProfile.js | 33 ++++------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index 7260cec047..cc6ef63332 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -667,38 +667,13 @@ import browser from './browser'; } } - if (canPlayVp8) { - // TODO: Remove vpx entry once servers are migrated + if (webmAudioCodecs.length && webmVideoCodecs.length) { profile.TranscodingProfiles.push({ Container: 'webm', Type: 'Video', - AudioCodec: webmAudioCodecs.includes('opus') ? 'opus' : 'vorbis', - VideoCodec: 'vpx', - Context: 'Streaming', - Protocol: 'http', - // If audio transcoding is needed, limit channels to number of physical audio channels - // Trying to transcode to 5 channels when there are only 2 speakers generally does not sound good - MaxAudioChannels: physicalAudioChannels.toString() - }); - profile.TranscodingProfiles.push({ - Container: 'webm', - Type: 'Video', - AudioCodec: webmAudioCodecs.includes('opus') ? 'opus' : 'vorbis', - VideoCodec: 'vp8', - Context: 'Streaming', - Protocol: 'http', - // If audio transcoding is needed, limit channels to number of physical audio channels - // Trying to transcode to 5 channels when there are only 2 speakers generally does not sound good - MaxAudioChannels: physicalAudioChannels.toString() - }); - } - - if (canPlayVp9) { - profile.TranscodingProfiles.push({ - Container: 'webm', - Type: 'Video', - AudioCodec: webmAudioCodecs.includes('opus') ? 'opus' : 'vorbis', - VideoCodec: 'vp9', + AudioCodec: webmAudioCodecs.join(','), + // TODO: Remove workaround when servers migrate away from 'vpx' for transcoding profiles. + VideoCodec: (canPlayVp8 ? webmVideoCodecs.concat('vpx') : webmVideoCodecs).join(','), Context: 'Streaming', Protocol: 'http', // If audio transcoding is needed, limit channels to number of physical audio channels