Hi I am currently using RoomCompositeEgress and I ...
# ask-ai
b
Hi I am currently using RoomCompositeEgress and I am able to record agent and user voice in dual channel mode. Is it possible to do it via track egress or any other egress since it is too costly?
t
Thanks for reaching out, Yethu. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — this is a great question. I’m responding to your question about whether you can capture agent and user audio in separate channels without using RoomCompositeEgress because of cost. Short answer: Yes — you can record agent and user audio separately with lower-cost egress options. Options and trade-offs • Track Egress (most cost-effective) ◦ What it does: Exports individual raw tracks (audio as Ogg/Opus) without transcoding or browser rendering. ◦ Why it helps: No Chrome rendering or heavy transcoding, so it uses far fewer compute/transcode minutes and is the lowest-cost option. ◦ How it works for dual-channel recording: Start two Track Egress jobs — one for the agent audio track, one for the user audio track. You’ll get two separate files (one per participant) which you can keep separate or combine later if needed. ◦ Limitation: Track Egress produces one track per job; it does not produce a single dual-channel file natively. • Track Composite Egress (recommended when you want per-participant AV files) ◦ What it does: Produces a file that muxes a participant’s audio (and optional video) into a single output per participant. ◦ Why it helps: Lower cost than RoomCompositeEgress because there's no full-room layout rendering; still performs some muxing/transcoding. ◦ How it works for dual-channel recording: Run two Track Composite Egress sessions — one for the agent, one for the user — to get independent files that already contain that participant’s audio channel. ◦ Trade-off: More processing than Track Egress, so slightly higher cost, but cheaper than full room composition. • Room Composite Egress ◦ You’re already using this and it supports dual-channel in one file, but it’s the most expensive because it renders the whole room (browser/Chrome rendering + composition + encoding). Recommendation • If you only need raw audio for transcription, archival, or post-processing: use Track Egress (two jobs). This is the cheapest and simplest. • If you want a per-participant muxed file (audio + video) without full-room composition: use Track Composite Egress (two jobs). Cheaper than RoomCompositeEgress but has some transcoding cost. • If you specifically need a single file with both channels already mixed into separate channels inside one container, RoomCompositeEgress is the straightforward option — otherwise you can merge the two track outputs offline (or via a lightweight serverless job) to produce a single dual-channel file. If you’d like, I can: • Show an example request for starting Track Egress or Track Composite Egress for two tracks in your SDK/language. • Help compare estimated costs between your current RoomCompositeEgress usage and Track Egress (I’ll need approximate egress durations or file sizes). • Suggest a simple FFmpeg command to merge two Ogg/Opus tracks into a single dual-channel file if you want a combined output without RoomCompositeEgress. Which would you like next — example code for starting Track Egress, a cost estimate (please share typical durations), or a merge command for combining two audio files? Sources: Universal Egress | Universal Egress | Universal Egress | Understanding and Estimating Pricing for Video Conference and Livestream Us...
b
my question is track composite egress will do that?
t
Thanks — I’m answering your follow-up about whether Track Composite Egress will give you a dual‑channel recording for agent and user. Short answer: Track Composite Egress does not produce a single dual‑channel file containing both participants’ audio channels. Instead, it produces a separate muxed file per participant. To capture agent and user separately you would run two Track Composite Egress jobs (one for the agent’s tracks and one for the user’s tracks). That gives you two files — each containing that participant’s audio (and optional video) — which you can keep separate or merge later. Quick recap of trade-offs: • Track Composite Egress ◦ Produces one file per participant (audio + optional video). ◦ Lower cost than RoomCompositeEgress (no full-room rendering). ◦ Does not natively output a single file with two independent audio channels. • If you need a single file with two channels: ◦ Continue with RoomCompositeEgress (more costly), or ◦ Start two Track Composite outputs and merge them offline (for example with FFmpeg) into a dual‑channel file. If you want, I can: • Provide example Track Composite Egress request code for two participants in your preferred SDK/language, or • Give an FFmpeg command to merge two audio files into a single dual‑channel file. Which would be most helpful?
b
ok got it, another doubt is this room composite egress output one audio file and 2 channel that I required for transcription but my question is when hearing users are feeling little frustration since it is on one hear and other on another hear. do you have any ideal for this while keeping in 2 channel and when hearing like same
t
Thanks — I’m responding to your concern about listeners finding the dual‑channel (left/right) output frustrating while you still need two channels for accurate transcription. You can keep two separate channels for transcription while improving the listening experience. Here are practical options with pros/cons and example commands you can use: 1) Keep dual channels for storage/transcription, but provide a mono playback version • What: Save the original 2‑channel file (for transcription/forensics) and generate a mono mix for listeners. • Why: Transcription benefits from separate channels, but listeners hear both voices centered in the same ear when listening to mono. • How: Create a mono file by mixing both channels together at playback time or ahead of time. • Example (FFmpeg): convert 2‑channel to mono by averaging:
Copy code
ffmpeg -i dual_channel.wav -ac 1 mono_mix.wav
Or normalize while mixing:
Copy code
ffmpeg -i dual_channel.wav -af "pan=mono|c0=0.5*c0+0.5*c1" mono_mix.wav
2) Provide a balanced stereo playback (center both voices) while keeping separate channels in the source • What: Keep file as stereo internally, but pan both channels to center on playback so each voice appears centered rather than hard left/right. • Why: Preserves two-channel files on disk but reduces ear separation discomfort at listening time. • Example (FFmpeg): create stereo with both channels centered (duplicates a summed mono to both outputs):
Copy code
ffmpeg -i dual_channel.wav -af "pan=stereo|FL=0.5*c0+0.5*c1|FR=0.5*c0+0.5*c1" centered_stereo.wav
3) Export two separate mono files (one per speaker) and offer a UI that blends them for the listener • What: Produce agent.wav and user.wav (mono each). For playback, play both centered, or let listeners toggle/increase one channel. • Why: Easiest for downstream processing (transcription per speaker) and for flexible UX playback (adjust volumes or focus one speaker). • How: Split channels into two mono files:
Copy code
ffmpeg -i dual_channel.wav -map_channel 0.0.0 agent_mono.wav -map_channel 0.0.1 user_mono.wav
Then present them to the player as two centered mono sources or mix as needed. 4) Use a playback UI/player that centers channels or offers a “balance” control • What: Web/mobile audio players can be configured to pan audio to center, or provide a “center/mono” toggle so listeners can switch from left/right to centered playback. • Why: Keeps original file unchanged and gives listeners control. 5) Slight spatial separation (less extreme panning) if you want some stereo feel without frustration • What: Instead of hard left/right, pan voices slightly left and right (e.g., -20 / +20) so they still sound distinct but not isolated to one ear. • Example (FFmpeg):
Copy code
# Reduce separation: mix each original channel partly into the opposite output
  ffmpeg -i dual_channel.wav -af "pan=stereo|FL=0.7*c0+0.3*c1|FR=0.3*c0+0.7*c1" softened_stereo.wav
Recommendation • For immediate listener comfort: generate a mono or centered-stereo playback file while keeping the original dual-channel file for transcription. • For long-term UX: offer a player control (mono/center/balance) or store separate mono files per participant and play them centered. If you’d like, I can: • Provide a ready-to-run FFmpeg script that batches conversion for multiple files. • Show example code for a simple web audio player that centers stereo on playback. • Recommend which approach fits best based on whether you need speaker-separated automatic transcription or live monitoring. Which would you prefer?