Skip to content

Add AES67 streaming diagnostics and multicast loopback for debugging missing audio - #4

Open
silly82 with Copilot wants to merge 2 commits into
mainfrom
copilot/test-audio-aes67-receiver
Open

Add AES67 streaming diagnostics and multicast loopback for debugging missing audio#4
silly82 with Copilot wants to merge 2 commits into
mainfrom
copilot/test-audio-aes67-receiver

Conversation

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Debugging why audio doesn't arrive at an AES67 receiver was previously a blind spot — no visibility into packet flow and local testing required a second machine.

Changes

DiagStats — live stream counters

New exported struct tracked atomically from the streaming goroutine, reset on each session start:

  • packets_sent, bytes_sent — confirm RTP traffic is flowing
  • underruns — detect FFmpeg buffer starvation (→ silence injection)
  • last_sent_unix — detect stalled sender
  • stream_url, multicast_addr — confirm correct source/destination

GET /api/diag endpoint

Single call returns all counters + the exact SDP currently being advertised via SAP:

{
  "running": true,
  "station": "SRF 3",
  "multicast_addr": "239.0.0.1:5004",
  "stream_url": "https://stream.srg-ssr.ch/…",
  "packets_sent": 4250,
  "bytes_sent": 29155200,
  "underruns": 0,
  "last_sent_unix": 1744010255,
  "sdp": "v=0\r\no=- 0 0 IN IP4 …\r\n"
}

Triage guide:

  • packets_sent == 0 while running → FFmpeg decode failure
  • packets_sent incrementing but receiver silent → network issue (IGMP, TTL, multicast routing)
  • underruns > 0 → source stream is starving the RTP buffer

Multicast loopback

SetMulticastLoopback(true) on the sender socket so tools on the same host (ffplay, Wireshark, tcpdump) can receive the stream without a second machine — the necessary first step for local reproduction.

Original prompt

vorgehen zum testen weshalb audio auf aes67 emfänger nicht annkommt

Created from VS Code.

Copilot AI changed the title [WIP] Investigate why audio does not reach AES67 receiver Add AES67 streaming diagnostics and multicast loopback for debugging missing audio Apr 7, 2026
Copilot AI requested a review from silly82 April 7, 2026 08:13

@silly82 silly82 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app laüft

@silly82
silly82 marked this pull request as ready for review April 7, 2026 08:19

@silly82 silly82 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aes test nr xxx

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants