Skip to content

Commit 215fe9d

Browse files
committed
Fix AV1 when SDP reports RTP/AVPF (RTP with Feedback via RTCP for keyframe requests
1 parent b02c890 commit 215fe9d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/RTSPClient.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
import * as transform from "sdp-transform";
2424
import RTPPacket from "./transports/RTPPacket";
2525
const RTP_AVP = "RTP/AVP";
26+
const RTP_AVPF = "RTP/AVPF"; // Used by AV1. This is RTP with Feedback (via RTCP) to request Keyframes via RTCP
2627

2728
const STATUS_OK = 200;
2829
const STATUS_UNAUTH = 401;
@@ -267,7 +268,7 @@ export default class RTSPClient extends EventEmitter {
267268
);
268269
}
269270

270-
// For now, only RTP/AVP is supported. (Some RTSPS servers use RTP/SAVP)
271+
// For now, only RTP/AVP and RTP/AVPF are supported. (Some RTSPS servers use RTP/SAVP)
271272
const { media } = transform.parse(describeRes.mediaHeaders.join("\r\n"));
272273

273274
// Loop over the Media Streams in the SDP looking for Video or Audio
@@ -315,7 +316,7 @@ export default class RTSPClient extends EventEmitter {
315316

316317
if (
317318
mediaSource.type === "video" &&
318-
mediaSource.protocol === RTP_AVP &&
319+
(mediaSource.protocol === RTP_AVP || mediaSource.protocol === RTP_AVPF) &&
319320
mediaSource.rtp[0].codec === "AV1"
320321
) {
321322
this.emit("log", "AV1 Video Stream Found in SDP", "");

0 commit comments

Comments
 (0)