strong-air-82340
02/16/2026, 9:50 AMtall-airline-16756
02/16/2026, 9:50 AMtall-airline-16756
02/16/2026, 9:51 AMAudioTrackId) and do NOT include a VideoTrackId.
3. Set the output file type to MP4 and provide your output destination (local path, S3, etc.).
Example (Go SDK)
info, err := egressClient.StartTrackCompositeEgress(ctx, &livekit.TrackCompositeEgressRequest{
RoomName: "my-room",
AudioTrackId: "audio-track-id", // only audio
Output: &livekit.TrackCompositeEgressRequest_File{
File: &livekit.EncodedFileOutput{
FileType: livekit.EncodedFileType_MP4,
Filepath: "output/audio-only.mp4",
Output: &livekit.EncodedFileOutput_S3{
S3: &livekit.S3Upload{
AccessKey: "key",
Secret: "secret",
Bucket: "my-bucket",
Region: "us-east-1",
},
},
},
},
})
Key points to note
• Setting only AudioTrackId ensures no video is included.
• LiveKit handles transcoding from Opus to a codec compatible with MP4 (e.g., AAC).
• You can also use Room Composite with a layout that excludes video, but Track Composite is the more direct and efficient option for audio‑only exports.
If you’d like, tell me:
• Which SDK/language you’re using (Go, Node, REST API, etc.), and
• Whether you’re outputting to S3 or a local file.
I’ll provide a tailored code example or the exact request payload for your environment.
Sources: Universal Egress | Universal Egressstrong-air-82340
02/16/2026, 9:52 AMtall-airline-16756
02/16/2026, 9:52 AMstrong-air-82340
02/16/2026, 9:54 AMtall-airline-16756
02/16/2026, 9:54 AMstrong-air-82340
02/16/2026, 9:55 AMtall-airline-16756
02/16/2026, 9:55 AMstrong-air-82340
02/16/2026, 10:26 AMtall-airline-16756
02/16/2026, 10:27 AMaudio_only = True.
Quick checklist and next steps so we can pinpoint the problem:
1) Confirm how you start egress
• Which egress API/SDK are you using? (REST, Go, Node, or the Universal Egress API)
• Which egress type are you calling when audio_only=True? (Room Composite, Participant Composite, Track Egress, or Track Composite)
2) Common causes and what to verify now
• Track vs composite: Audio‑only recordings are typically done with a Track Egress (raw track) or a Track Composite/Participant Composite configured for audio-only. If your code toggles audio_only but still calls a Room Composite with only that flag changed, it may not translate into a valid audio track egress.
• Active audio track: Ensure the audio track ID you target exists and is published (not muted) at the time egress starts.
• Egress request translation: Confirm your audio_only=True flag actually produces an egress request that omits video/video track IDs and requests an audio output type (e.g., MP4 audio or OGG).
• Errors & webhooks: Check egress startup logs and webhook events (egress_started, egress_ended). Any errors returned when StartEgress is called will help identify the failure.
• Output format: If you rely on Track Egress (raw), outputs may be OGG/Opus. If you want MP4 audio, you should use Track Composite with FileType: MP4 and only set AudioTrackId.
3) Quick debugging steps to run now
• Start a minimal audio-only egress manually (example: StartTrackEgress or StartTrackCompositeEgress) targeting a known active audio track and a local file output.
• Inspect the StartEgress response for errors and the returned egress ID.
• Watch for egress_ended webhook or check egress worker logs for why it stopped.
• If you have a saved request payload, paste it here (remove secrets). I can review it for missing fields (TrackId, FileType, AudioTrackId, etc.).
4) If you want, share:
• The exact code or request payload you use when audio_only=True (remove keys/secrets).
• The SDK/language and which egress type you expect to run.
• Any error messages, webhook events, or logs you see after starting egress.
If you send the request payload or code snippet, I’ll point out any mismatches and give the exact corrected request you should send to produce a working audio-only recording.
Sources: Universal Egress | server-sdk-js | livekit/livekit_composite | DeepWiki | Universal Egressstrong-air-82340
02/16/2026, 10:29 AMtall-airline-16756
02/16/2026, 10:29 AMaudio_only=True causes no recording. I’ll point out the most likely causes, what to change, and concrete next steps so you can get audio-only recordings working.
What I’m responding to
• Your async function builds a RoomComposite egress with audio_only=True, AAC encoding, and R2 S3 output, but when audio_only=True no file is produced.
Most likely causes
• Room Composite uses a headless browser + layout template to compose the room. If the layout/template expects video elements (or the template’s JS fails when there are no video tracks), Chrome can exit or the composition can fail and no file is created.
• The audio_only flag itself is valid, but it must be used with a layout/template that works when there is no video.
• If your code toggles audio_only but still relies on a video-dependent layout or template, the compositor may have nothing to render and stop.
What to try (quick, ordered checklist)
1. Run a minimal audio-only RoomComposite test
◦ Create a RoomComposite request with audio_only=True, but omit any layout or set it to a minimal template that does NOT reference video elements.
◦ Confirm the StartEgress response contains an egress ID and check webhooks for egress_started / egress_ended.
1. Use a custom audio-only template (recommended if you must use RoomComposite)
◦ Make a template HTML that does not try to render video elements; keep it simple (background + JS that connects the hidden participant and starts composition). The template should not crash if no video tracks exist.
1. Try Track Egress / Track Composite as a simpler alternative
◦ If you only need a mixed audio file (or single participant audio), TrackEgress or TrackComposite is simpler and more reliable for pure audio:
▪︎ TrackEgress exports a single raw track (ogg/opus) and avoids the browser compositor.
▪︎ TrackComposite (or ParticipantComposite) can produce MP4 audio-only outputs by specifying only the AudioTrackId and FileType: MP4.
◦ TrackEgress is also cheaper and has fewer failure points.
1. Verify the audio track is available when egress starts
◦ Ensure the participant’s audio track is published and not muted at egress start. Use list/inspect APIs to confirm track SIDs.
1. Check logs and webhooks
◦ Look at egress worker logs and any egress_ended webhook for an error message. That will usually indicate template/renderer crashes or missing tracks.
Specific issues in your snippet to double-check
• You set audio_only=True and advanced=encoding_options. That’s fine if your proto/SDK maps EncodingOptions correctly. If the SDK version you use doesn’t support advanced audio fields for RoomComposite, the request may fail; fallback code you have is good but inspect the exception content (log it) to see if encoding options are rejected.
• If your layout field defaults (elsewhere in your code) include a template expecting video, that will break audio-only. Make sure no implicit layout is injected.
• Confirm the encoded output settings (you set AAC + 64kbps + 24kHz). If the compositor cannot produce AAC for some reason, GStreamer will usually error — check egress error details.
Minimal test examples
• Minimal RoomComposite (audio-only, no layout):
◦ Request: RoomCompositeEgressRequest(file_outputs=[file_output], audio_only=True) — start this manually and watch webhooks.
• TrackEgress example (single audio track):
◦ Request a TrackEgress for a known audio track_id to a local or S3 file (OGG or MP4 via TrackComposite) and confirm it writes a file.
If you want, I can:
• Provide a minimal audio-only HTML template you can upload to your templates and reference in RoomComposite.
• Show a concrete TrackEgress or TrackComposite request payload for your Python SDK to test immediately.
• Inspect any error log or webhook payload you have (paste it with secrets removed) and point out the failure reason.
Which do you want next?
• A minimal audio-only HTML template, or
• A Python TrackEgress / TrackComposite example you can run right away, or
• I can review the egress webhook/error you received (paste it here, remove secrets)
Tell me which and I’ll give the exact code/payload to run.
Sources: Universal Egress | Pricing | LiveKit | server-sdk-js | livekit/livekit_composite | DeepWikistrong-air-82340
02/16/2026, 10:59 AMtall-airline-16756
02/16/2026, 11:00 AMegress_ended webhook for that egress ID? If it arrived with a success status, the dashboard should update soon.
• Check the egress logs or the egress_ended webhook payload for an error field — that can show why the egress didn’t fully stop.
• Use the ListEgress or GetEgress API to confirm the server-side state for that egress ID.
How to make the egress stop (recommended options) 1) Delete the room when the call ends (recommended if you don’t need the room afterwards)
• Deleting the room forces all participants and any active egress to disconnect and finalizes egress.
• Example: call your room delete API for that room name/ID after the call finishes.
2) Explicitly stop the egress
• If you want to keep the room open, call the egress stop API with the egress ID.
• Stopping the egress triggers finalization and the dashboard will change to the completed/ended state once the stop finishes.
Additional debugging tips
• Confirm webhooks are delivered and processed (watch for egress_started and egress_ended).
• If you see the recording file uploaded successfully but no egress_ended event, confirm your webhook receiver didn’t drop or fail to acknowledge the event.
• Check for small propagation delays in the dashboard — sometimes status updates take a short time to display.
If you’d like, send:
• The egress ID (or the egress_ended webhook payload you received with sensitive fields removed), and
• Whether your app deletes rooms on disconnect or calls stopEgress.
I can help interpret the webhook or API output and point to the exact action to finalize the egress so the dashboard shows the correct state.
Sources: Why is there extra audio at the end of my recordings of an agent session? |... | Job lifecycle | LiveKit Documentation | server-sdk-ruby | livekit/livekit_composite | DeepWiki | Backup Egress Recordings | server-sdk-js | livekit/livekit_composite | DeepWikistrong-air-82340
02/16/2026, 11:38 AMtall-airline-16756
02/16/2026, 11:39 AMAudioTrackId and/or VideoTrackId) or Track Egress for raw single-track exports.
If you tell me your exact use case (single host recording, multi-person meeting archive, livestream, audio-only call recording, etc.), I can recommend the simplest and most cost‑effective egress type and give a sample request payload.
Sources: Universal Egress