Skip to content

fix #807: add --packet-encoding option to roc-send#834

Closed
Ayoub-glitsh wants to merge 1 commit intoroc-streaming:masterfrom
Ayoub-glitsh:fix/807-packet-encoding-option
Closed

fix #807: add --packet-encoding option to roc-send#834
Ayoub-glitsh wants to merge 1 commit intoroc-streaming:masterfrom
Ayoub-glitsh:fix/807-packet-encoding-option

Conversation

@Ayoub-glitsh
Copy link
Copy Markdown

The --rate flag only sets the input device sample rate, but the packet encoding defaults to L16_Stereo at 44100 Hz. When input rate differs from packet encoding rate, the sender creates a resampler even if the user doesn't want one.

Add --packet-encoding option that lets users register a custom RTP encoding and select it for outgoing packets. This allows sending at 48kHz (or any rate) without resampling:

roc-send --rate=48000 --packet-encoding=96:s16/48000/stereo ...

The option accepts the format '://', e.g.:
96:s16/48000/stereo
97:s16/48000/mono

The encoding is registered in the context encoding map and the sender is configured to use it as the packet encoding.

The --rate flag only sets the input device sample rate, but the packet
encoding defaults to L16_Stereo at 44100 Hz. When input rate differs
from packet encoding rate, the sender creates a resampler even if the
user doesn't want one.

Add --packet-encoding option that lets users register a custom RTP
encoding and select it for outgoing packets. This allows sending at
48kHz (or any rate) without resampling:

  roc-send --rate=48000 --packet-encoding=96:s16/48000/stereo ...

The option accepts the format '<id>:<format>/<rate>/<channels>', e.g.:
  96:s16/48000/stereo
  97:s16/48000/mono

The encoding is registered in the context encoding map and the sender
is configured to use it as the packet encoding.
@rocstreaming-bot rocstreaming-bot added the contrib PR not by a maintainer label Apr 24, 2026
@rocstreaming-bot
Copy link
Copy Markdown

🤖 Pull request is not targeted to develop branch, which is usually wrong.
If this was not intentional, please rebase on fresh develop branch, force-push, and re-target pull request using github web interface. Remember to use rebase with force-push instead of regular merge.

@baranovmv
Copy link
Copy Markdown
Member

baranovmv commented Apr 25, 2026

Hi, sorry to say so, but this functionality is already in the develop branch, and there is my pr #830 imrpoving this functionality further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contrib PR not by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants