【发布时间】:2021-03-19 17:09:07
【问题描述】:
我们正在使用浏览器的 MediaRecorder 来记录用户的摄像头。我不明白为什么有些相机会经常记录伪影。并非所有相机都会发生这种情况。
这里是发生的一些截图......
以下是包含此工件的视频的摘录 https://drive.google.com/file/d/1SYMBRjMlvOTO-LnlG5HLX0ncN3NyUXcc/view?usp=sharing
recorder = new MediaRecorder(local_media_stream, {
mimeType: encoding_options,
audioBitsPerSecond: 96000,
videoBitsPerSecond: 8000000,
});
recorder.ondataavailable = function(e) {
that.save_blob(e.data, blob_index);
blob_index++;
}
recorder.start(15000)
对于local_media_stream,我只是抓取本地音视频
navigator.mediaDevices.getUserMedia({ audio: {
deviceId: { exact: currentMic.deviceId},
channelCount: 1,
noiseSuppression: options.echo_cancellation,
echoCancellation: options.echo_cancellation,
},
video: {
width: { ideal: $("#subscription_id").data("max-width") },
height: { ideal: $("#subscription_id").data("max-height") },
frameRate: 30,
deviceId: { exact: currentCam.deviceId }
}
})
【问题讨论】:
标签: video-capture getusermedia video-recording web-mediarecorder