Merge pull request #662 from 3flex/mp4-hls-container

Request mp4 container when transcoding HLS video
This commit is contained in:
Niels van Velzen 2024-11-02 10:32:45 +01:00 committed by GitHub
commit 1baac2d9c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -291,7 +291,7 @@ function getTranscodingProfiles(): TranscodingProfile[] {
const hlsAudioCodecs = getSupportedHLSAudioCodecs(); const hlsAudioCodecs = getSupportedHLSAudioCodecs();
const audioChannels: number = hasSurroundSupport() ? 6 : 2; const audioChannels: number = hasSurroundSupport() ? 6 : 2;
if (profileOptions.enableHls !== false) { if (profileOptions.enableHls) {
TranscodingProfiles.push({ TranscodingProfiles.push({
AudioCodec: hlsAudioCodecs.join(','), AudioCodec: hlsAudioCodecs.join(','),
BreakOnNonKeyFrames: false, BreakOnNonKeyFrames: false,
@ -328,12 +328,12 @@ function getTranscodingProfiles(): TranscodingProfile[] {
if ( if (
hlsVideoCodecs.length && hlsVideoCodecs.length &&
hlsAudioCodecs.length && hlsAudioCodecs.length &&
profileOptions.enableHls !== false profileOptions.enableHls
) { ) {
TranscodingProfiles.push({ TranscodingProfiles.push({
AudioCodec: hlsAudioCodecs.join(','), AudioCodec: hlsAudioCodecs.join(','),
BreakOnNonKeyFrames: false, BreakOnNonKeyFrames: false,
Container: 'ts', Container: 'mp4',
Context: EncodingContext.Streaming, Context: EncodingContext.Streaming,
MaxAudioChannels: audioChannels.toString(), MaxAudioChannels: audioChannels.toString(),
MinSegments: 1, MinSegments: 1,