webrtc-java icon indicating copy to clipboard operation
webrtc-java copied to clipboard

Add support for L16 / LPCM audio codec

Open kinsleykajiva opened this issue 3 months ago • 0 comments

Is your feature request related to a problem? Please describe. Currently, the library does not appear to support raw PCM (L16 / LPCM) audio streams. This makes it difficult to integrate uncompressed audio data sources (like WAV files or hardware audio streams) with WebRTC without first transcoding to Opus or another supported codec.

I'm working with Asterisk and SIP endpoints that use L16 for raw audio transport, and I’d like to be able to interoperate directly without adding extra transcoding layers.

Describe the solution you'd like It would be great if webrtc-java could support sending and receiving L16 / LPCM audio.
This could be achieved by allowing the creation of AudioTrack instances that advertise L16 in SDP and accept/produce raw PCM samples at standard rates (e.g., 8000, 16000, 44100, 48000 Hz).

Describe alternatives you've considered

  • Using Opus as a middle layer for encoding/decoding audio (adds complexity and CPU load).
  • Implementing a custom RTP stream sender using L16 payloads outside the webrtc-java stack. Both work but are not ideal for simple uncompressed audio pipelines.

Additional context L16 is widely supported in SIP and WebRTC environments for raw PCM audio, especially for telephony interop or studio-grade audio transfer.
Adding it would make webrtc-java more flexible for gateway applications, SIP bridges, and testing tools.

kinsleykajiva avatar Oct 25 '25 08:10 kinsleykajiva