sdp-transform is a robust JavaScript library designed for parsing and writing Session Description Protocol (SDP) strings, following the grammar defined by RFC4566, RFC5245, and other relevant standards. The current stable version is 3.0.0, published in late 2025. It differentiates itself by rigorously adhering to RFC specifications, automatically coercing numerical values to integers during parsing while keeping other values as strings. The library is built to be easily extendable for custom grammar, making it suitable for a wide range of WebRTC and multimedia signaling applications. It provides core functionalities to convert SDP strings into a structured JavaScript object and vice-versa, facilitating manipulation and generation of SDP messages. While there isn't an explicit release cadence, the project shows active maintenance with regular updates prior to the v3 release.
npm install sdp-transformVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates parsing an SDP string into a structured object, modifying it, and then writing the object back to an SDP string. It also shows how to use a helper function like `parseParams`.
Review your code for `msid` attribute handling and adapt to the new parsing structure. Consult issue #104 and the changelog for details.
Replace all occurrences of `sdpTransform.parseFmtpConfig()` with `sdpTransform.parseParams()`.
Be aware of potential parsing inaccuracies for Firefox-generated SDPs. Monitor GitHub issue #106 for updates or consider custom pre-processing for `msid` lines if encountering issues.
Always validate the type of numeric-like fields in the parsed object if strict type adherence (e.g., all strings) is required for further processing. Convert back to string if necessary.
Update your code to use `sdpTransform.parseParams()` instead of `sdpTransform.parseFmtpConfig()`.
This is an open issue. A direct fix is not yet available within the library. Workarounds might involve pre-processing Firefox SDPs to normalize `msid` lines or manually parsing them if accurate `msid` data is critical. Monitor GitHub issue #106 for resolution.