Skip to content

Commit

Permalink
onvif: increase 2 way audio buffer to reduce stutter.
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 25, 2024
1 parent c94fb23 commit b46a385
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/onvif/src/onvif-intercom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class OnvifIntercom implements Intercom {
let transportDict: ReturnType<typeof parseSemicolonDelimited>;
let tcp = false;
try {
throw new Error()
const headers: any = {
Require,
Transport: `RTP/AVP;unicast;client_port=${rtp}-${rtcp}`,
Expand Down Expand Up @@ -151,7 +152,7 @@ export class OnvifIntercom implements Intercom {
}

const elapsedRtpTimeMs = Math.abs(pending.header.timestamp - p.header.timestamp) / 8000 * 1000;
if (elapsedRtpTimeMs <= 60) {
if (elapsedRtpTimeMs <= 160) {
pending.payload = Buffer.concat([pending.payload, p.payload]);
return;
}
Expand Down

0 comments on commit b46a385

Please sign in to comment.