How can I achieve the best audio quality from a Ro...
# ask-ai
b
How can I achieve the best audio quality from a RoomCompositeEgress?
t
Thanks for reaching out, Håvard. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To achieve the best audio quality from a RoomCompositeEgress, you can follow these recommendations: • Audio-Only Composite: For audio-focused applications, create an audio-only composite that mixes audio from all participants. Example:
const info = await egressClient.startRoomCompositeEgress('my-room', output, { audioOnly: true });
High-Quality Audio Settings: When publishing audio tracks, use the following settings:
Copy code
const audioTrack = await createLocalAudioTrack({
  channelCount: 2,
  echoCancellation: false,
  noiseSuppression: false,
});

const audioPublication = await localParticipant.publishTrack(audioTrack, {
  audioPreset: AudioPresets.musicHighQualityStereo,
  dtx: false,
  red: false,
});
Maximum Quality Settings: LiveKit supports audio tracks up to 510kbps stereo for the highest theoretical quality:
Copy code
const audioTrack = await createLocalAudioTrack({
  channelCount: 2,
  echoCancellation: false,
  noiseSuppression: false,
});

const audioPublication = await localParticipant.publishTrack(audioTrack, {
  audioBitrate: 510000,
  dtx: false,
  red: false,
});
These settings ensure optimal audio quality for your RoomCompositeEgress. Let me know if you need further assistance! Sources: Codecs and more | LiveKit Docs | RoomComposite Egress | LiveKit Docs | Hi-fi audio | LiveKit Docs
b
I am starting the egress through the egressClient from the node livekit-sdk. How can I change the quality settings?
t
I couldn't find specific information on changing quality settings when starting egress through the egressClient in the Node.js LiveKit SDK. However, you may need to configure the audio and video settings during the egress initialization process. If you can provide more details about your setup or specific requirements, I can assist you further.
b
What are the best EncodingOptions to achieve the best recording quality?
t
I couldn't find specific recommendations for the best EncodingOptions to achieve the highest recording quality in LiveKit. However, you may want to explore settings that maximize bitrate, resolution, and frame rate for video, as well as high-fidelity audio settings. If you have more details about your use case, I can assist you further.