Implement Ogg muxer

This commit is contained in:
Vanilagy
2025-02-09 10:56:54 +01:00
parent cd30c9faec
commit 0db871dd21
13 changed files with 715 additions and 204 deletions
+2 -1
View File
@@ -31,6 +31,7 @@ import {
parseSubtitleTimestamp,
} from '../subtitles';
import {
OPUS_INTERNAL_SAMPLE_RATE,
PCM_AUDIO_CODECS,
PcmAudioCodec,
generateAv1CodecConfigurationFromCodecString,
@@ -233,7 +234,7 @@ export class MatroskaMuxer extends Muxer {
const header = parseOpusIdentificationHeader(bytes);
// Use the preSkip value from the header
seekPreRollNs = Math.round(1e9 * (header.preSkip / 48000));
seekPreRollNs = Math.round(1e9 * (header.preSkip / OPUS_INTERNAL_SAMPLE_RATE));
}
}