-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Bug Description
When setAudioParams() is called before setVideoParams(), the video codec configuration is ignored and the SDK outputs JPG at 5fps instead of the requested H264 at 30fps. The audio params work correctly regardless of order.
Language/Runtime
Node.js
Python
SDK Version
1.0.2
Environment Details
- OS and Version: macOS
- Node.js version: 22.x
- Python version: 3.13.11
- @zoom/rtms version: 1.0.2
Steps To Reproduce
- Create a new RTMS client
- Call
setAudioParams()with L16 codec - Call
setVideoParams()with H264 codec - Register
onAudioDataandonVideoDatacallbacks - Join meeting
- Observe video output is JPG at 5fps instead of H264 at 30fps
Expected Behavior
Video should output H264 at 30fps as configured in setVideoParams(), regardless of whether audio params are set first.
Actual Behavior
Video outputs JPG at 5fps when setAudioParams() is called before setVideoParams(). The video codec configuration is completely ignored.
Code Example
import rtms from "@zoom/rtms";
const client = new rtms.Client();
// BUG: Setting audio params BEFORE video params causes video to default to JPG 5fps
client.setAudioParams({
channel: rtms.AudioChannel.MONO,
sampleRate: rtms.AudioSampleRate.SR_16K,
codec: rtms.AudioCodec.L16,
contentType: rtms.AudioContentType.RAW_AUDIO,
dataOpt: rtms.AudioDataOption.AUDIO_MULTI_STREAMS,
duration: 20,
frameSize: 320
});
client.onAudioData((buffer, size, timestamp, metadata) => {
// Handle audio data
});
client.setVideoParams({
contentType: rtms.VideoContentType.RAW_VIDEO,
codec: rtms.VideoCodec.H264, // This is IGNORED when audio is set first
resolution: rtms.VideoResolution.HD,
dataOpt: rtms.VideoDataOption.VIDEO_SINGLE_ACTIVE_STREAM,
fps: 30 // This is IGNORED - outputs 5fps instead
});
client.onVideoData((buffer, size, timestamp, metadata) => {
// Handle video data
});
client.join(payload);Relevant Log Output
# With audio params set BEFORE video params (BUG):
VIDEO: JPG | 5 fps | size: 65837 bytes | header: ff d8 ff e0
AUDIO: Buffer size: 640 bytes (expected 640 for L16)
# With video params set BEFORE audio params (WORKS):
VIDEO: H264 | 31 fps | size: 4741 bytes | header: 00 00 00 01
AUDIO: Buffer size: 640 bytes (expected 640 for L16)Workaround
Call setVideoParams() before setAudioParams() to get the expected H264 output.
Additional Context
The order of setAudioParams() and setVideoParams() should not affect the configured codec output. This appears to be a state management issue in the SDK where setting audio params first causes video params to be ignored or overwritten.
Verification
- I've searched existing issues to ensure this bug hasn't already been reported
- I've verified this bug still exists in the latest version of the SDK
- I've included all necessary information to reproduce this issue