Skip to content

Commit

Permalink
Increase audio and video stream buffer size to 128 frames (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
longnguyen2004 authored Dec 17, 2024
1 parent 830f5ad commit 7647ebc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/media/LibavDemuxer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ export async function demux(input: Readable) {
const aStream = streams.find((stream) => stream.codec_type == libav.AVMEDIA_TYPE_AUDIO)
let vInfo: VideoStreamInfo | undefined
let aInfo: AudioStreamInfo | undefined;
const vPipe = new PassThrough({ objectMode: true });
const aPipe = new PassThrough({ objectMode: true });
const vPipe = new PassThrough({ objectMode: true, highWaterMark: 128 });
const aPipe = new PassThrough({ objectMode: true, highWaterMark: 128 });

if (vStream) {
if (!allowedVideoCodec.has(vStream.codec_id)) {
Expand Down

0 comments on commit 7647ebc

Please sign in to comment.