From 023525eca2afdf0368222458e4ceb8a053d78b78 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Tue, 20 May 2025 12:03:14 +0200 Subject: [PATCH] rtp: aes67: Document sess.ts-direct property and set it to true for AES67 --- src/daemon/pipewire-aes67.conf.in | 5 +++++ src/modules/module-rtp-source.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/daemon/pipewire-aes67.conf.in b/src/daemon/pipewire-aes67.conf.in index 479c12c9b..167b89a6f 100644 --- a/src/daemon/pipewire-aes67.conf.in +++ b/src/daemon/pipewire-aes67.conf.in @@ -128,6 +128,11 @@ context.modules = [ # This property is used if you aren't using ptp4l 4 sess.ts-refclk = "ptp=traceable" sess.ts-offset = 0 + # Directly synchronize output against the PTP-synced driver using the RTP timestamps + # This can be set to true if the reference clocks are the same; it then makes the + # synchronization more robust against transport delay variations and can help lower + # latency + sess.ts-direct = false # You can adjust the latency buffering here. Use integer values only sess.latency.msec = 3 audio.format = "S24BE" diff --git a/src/modules/module-rtp-source.c b/src/modules/module-rtp-source.c index 98a26065a..a3694197e 100644 --- a/src/modules/module-rtp-source.c +++ b/src/modules/module-rtp-source.c @@ -56,9 +56,19 @@ * - `sess.latency.msec = `: target network latency in milliseconds, default 100 * - `sess.ignore-ssrc = `: ignore SSRC, default false * - `sess.media = `: the media type audio|midi|opus, default audio + * - `sess.ts-direct = `: directly synchronize output against the current + * graph driver time, using the RTP timestamps, default false * - `stream.may-pause = `: pause the stream when no data is reveived, default false * - `stream.props = {}`: properties to be passed to the stream * + * Set `sess.ts-direct` to true if receivers shall play precisely in sync with the sender even + * if the transport delay differs. This can be important for use cases like AES67 sessions. + * The graph driver must then produce time that is in sync with the sender's graph driver. + * If it is set to false, the RTP timestamps will be used to reproduce the pace of the sender, + * but not directly for synchronizing when output starts. Note though that this requires that + * the receivers and senders have synchronized clocks. In PTP, the reference clocks must then + * be the same. Otherwise, senders and receives will be out of sync. + * * ## General options * * Options with well-known behavior: