billions-king-25562
04/11/2026, 7:58 PMtall-airline-16756
04/11/2026, 7:58 PMtall-airline-16756
04/11/2026, 7:58 PMbackupStorageUsed flag appeared in the egress_ended webhook — otherwise the recording cannot be recovered.
Sources: Best practices for managing webhook event streams | LiveKit | Universal Egress | LiveKit | Backup Egress Recordings, with interactive elementsbillions-king-25562
04/11/2026, 8:52 PMtall-airline-16756
04/11/2026, 8:53 PMstopEgress() from your backend) rather than relying on implicit termination.
2. Delete the room or ensure the egress participant leaves when all human participants have left so egress can finish cleanly.
3. Enable backup egress (temporary backup storage). If primary upload fails, backups are stored and referenced in the egress_ended webhook with backupStorageUsed and manifestLocation.
4. Handle webhooks for egress_started and egress_ended reliably and idempotently so you detect failures and backup availability.
5. Ensure agent stability and graceful shutdowns so the egress finalization/upload step can complete.
If you want, I can:
• Walk you through enabling backup egress and reading egress_ended webhook fields.
• Help add a stop-everything flow (when participants leave) in your backend.
Which would you like to do next?
Sources: server-sdk-js | livekit/livekit_composite | DeepWiki | Universal Egress | LiveKit | Backup Egress Recordings | Why is my Agent insights data missing? | LiveKit | Best practices for managing webhook event streams | LiveKit, with interactive elementsbillions-king-25562
04/11/2026, 8:55 PMtall-airline-16756
04/11/2026, 8:55 PMEncodedFileOutput (OGG) to a segmented output would prevent EGRESS_ABORTED.
Short answer: segmented/chunked egress is not available, and using encoded file output alone does not prevent EGRESS_ABORTED. The aborted state can still occur (and when it does, no valid output is produced unless backup storage was used).
What you can do to reduce risk:
• Call stopEgress() from your backend when the session should end instead of relying on implicit termination.
• Remove/delete the room or ensure the egress client leaves once participants finish so egress can finalize cleanly.
• Enable backup egress / temporary storage so failed primary uploads can fall back to a backup; check egress_ended for backupStorageUsed and manifestLocation.
• Verify GCP upload config and permissions (bucket name, service account creds, IAM roles) so uploads don’t fail mid-finalize.
• Make agent shutdowns graceful to avoid interrupting finalization/upload steps.
• Monitor webhooks (egress_started, egress_ended) and handle them idempotently to detect failures early.
If you’d like, I can:
• Walk through enabling/validating backup egress for your request, or
• Review your start_room_composite_egress call and GCS config to check common failure points.
Which would you prefer?
, with interactive elementsbillions-king-25562
04/13/2026, 9:33 AMtall-airline-16756
04/13/2026, 9:33 AMegress_ended webhook will include backupStorageUsed: true and a manifestLocation pointing to the backup artifacts.
How it works
• Primary output is attempted (your GCS file_outputs).
• If final upload fails, LiveKit writes the output to a temporary backup bucket.
• Backup artifacts are kept for a limited time (7 days) and can be downloaded using the manifestLocation provided in the egress_ended webhook.
What you should do
1. Ensure you process egress_ended webhooks and check:
◦ backupStorageUsed (bool)
◦ manifestLocation (URL/path to download backup)
1. Verify your GCS config and credentials so primary uploads are less likely to fail:
◦ Correct bucket name
◦ Valid service account JSON
◦ Required IAM roles for upload
1. Keep webhook handling idempotent and reliable so you don't miss the egress_ended event.
2. If you need longer retention or guaranteed archival, copy backup artifacts from the manifest location to your own bucket after receiving the webhook.
Would you like me to:
• Walk through validating your GCS credentials and IAM for this start_room_composite_egress call, or
• Show an example of how to parse egress_ended and download the manifestLocation backup?, with interactive elementsbillions-king-25562
04/13/2026, 9:34 AMtall-airline-16756
04/13/2026, 9:34 AMstopEgress() from your backend when the session should end.
◦ Ensure the egress participant leaves or delete the room when humans leave.
◦ Make agent shutdowns graceful so finalization/upload can complete.
◦ Verify GCS bucket name, credentials, and IAM roles to prevent upload failures.
◦ Monitor and handle egress_started / egress_ended webhooks (check backupStorageUsed and manifestLocation).
Would you like help adding a clean shutdown/stop flow or validating your GCS upload permissions?
, with interactive elementsbillions-king-25562
04/13/2026, 9:36 AMtall-airline-16756
04/13/2026, 9:36 AMegress_ended webhook payload:
◦ Check the status field — it will equal EGRESS_ABORTED for aborted sessions.
◦ Look for other fields (`error`/message) to help diagnose the cause.
How to reduce risk and preserve recordings
• Call stopEgress() from your backend to finalize cleanly when the session ends.
• Ensure the egress participant leaves or delete the room when humans leave so egress can finish.
• Make agent/service shutdowns graceful so finalization and uploads can complete.
• Validate cloud upload config (GCS bucket name, service account JSON, IAM roles) to avoid upload failures that could lead to retries or errors.
• Enable/handle backup storage: if finalization runs but upload fails, egress_ended will include backupStorageUsed: true and manifestLocation to download artifacts (kept 7 days).
Next steps I can help with
• Add webhook parsing example to detect EGRESS_ABORTED and alert/automate retries.
• Walk through adding a clean-stop flow (stopEgress() + room deletion) in your backend.
• Validate your GCS credentials/IAM for uploads.
Which would you like to do next?
, with interactive elementsbillions-king-25562
04/13/2026, 4:20 PMtall-airline-16756
04/13/2026, 4:20 PMegress_ended webhook that reports EGRESS_ABORTED is only a notification; it cannot recover the recording because an aborted egress produces no valid output and partial data is discarded.
Details and what you can do instead
• EGRESS_ABORTED means finalization did not complete, so there is nothing for the webhook to point you to or download.
• Backup storage only applies when finalization runs but the primary cloud upload fails. In that case egress_ended will include backupStorageUsed: true and a manifestLocation you can download from. That does not apply to aborted egress.
• To prevent aborted egress and preserve recordings:
◦ Call stopEgress() from your backend when the session should end.
◦ Ensure the egress client leaves or delete the room when participants exit.
◦ Make agent/service shutdowns graceful so finalization and upload can complete.
◦ Validate GCS bucket, credentials, and IAM permissions so uploads don’t fail.
◦ Monitor egress_started / egress_ended webhooks and alert on EGRESS_ABORTED.
Would you like me to:
• Show an example webhook handler that detects EGRESS_ABORTED and alerts/automates retries, or
• Review your stop/room-delete flow and GCS settings to reduce abort risk?, with interactive elements