简体   繁体   English

DirectShow网络摄像头视频和音频异步-音频滞后

[英]DirectShow webcam video and audio async - audio lag

I try to save a video with audio and save it as an uncompressed avi file. 我尝试用音频保存视频并将其另存为未压缩的avi文件。 The graph is as you can see in the picture. 该图是您在图片中看到的。 The problem is that the sound recording is ~500ms behind the video. 问题是录音比视频落后500ms。 It doesn't matter which sources I have. 我拥有哪个来源都没关系。 What can I do to have video and audio in sync? 如何使视频和音频同步?

在此处输入图片说明

Default audio capture buffer is pretty large and is about 500 ms in length. 默认的音频捕获缓冲区很大,长度约为500毫秒。 You start getting the data once the buffer is filled and hence the lag. 一旦缓冲区被填充,您就开始获取数据,从而导致延迟。 Large buffers might be okay for some scenarios and are not good for other. 在某些情况下,较大的缓冲区可能还可以,而在另一些情况下则不好。 You can use IAMBufferNegotiation interface to adjust the buffering. 您可以使用IAMBufferNegotiation接口来调整缓冲。

See related (you will see 500 ms lag is a typical complaint): 查看相关内容(您会发现500毫秒的延迟是典型的投诉):

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM