简体   繁体   English

具有多个视频帧的DirectShow变换过滤器-与音频同步

[英]DirectShow transform filter with multiple video frames - Sync with audio

I've written a DirectShow transform filter (in C# but concept is the same in C++) which buffers multiple video frames before sending them to the renderer (hence a delay). 我已经编写了DirectShow转换过滤器(在C#中,但概念在C ++中是相同的),该缓冲区在将多个视频帧发送到渲染器之前会对其进行缓冲(因此会有延迟)。 These frames are processed before producing an output frame (think sliding window of say 6 frames). 这些帧在生成输出帧之前进行处理(假设滑动窗口为6帧)。

On a 6fps video source, this causes a 1 second delay. 在6fps视频源上,这会导致1秒钟的延迟。 Audio ends up playing back 1 second ahead of video. 音频最终比视频播放1秒。 How do I tell the graph to delay audio by the same amount? 如何告诉图表将音频延迟相同的数量?

Video and audio renderers present data respecting attached time stamps. 视频和音频渲染器提供有关附加时间戳的数据。 You need to restamp your audio data adding the desired delay. 您需要重新采样音频数据,以增加所需的延迟。

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

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