roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Multitrack packets too big per default ("packetizer: can't prepare packet")

Open fallingcats opened this issue 2 months ago • 1 comments

While trying to add support for additional channels to the pipewire module, I ran into the following issue while testing with 8 channels:

[err] roc_audio: packetizer: can't prepare packet

I discovered I could prevent that error from occurring by setting roc_sender_config.packet_length to less than 2_891_156ns. I'd appreciate though if the defaults were set (or rather calculated?) such that this didn't happen.

I understand that using MULTITRACK is not exactly default in itself, but it's not documented (to my knowledge) that I manually need to limit packet size through packet_length (or possibly other means?). Increasing roc_context_config.max_packet_size also works (locally) but I'm not sure how that translates to network packets w.r.t MTU

Currently I'm using sender_config.packet_length = 20_000_000 / channels. Please let me know if that's a bad idea, thanks :)

roc v0.4.0 (and pipewire master 76a31a47)

fallingcats avatar Oct 29 '25 17:10 fallingcats

Thank you for filing the idea, seems like it could be negotiated automatically indeed!

baranovmv avatar Oct 29 '25 17:10 baranovmv