使用 WMAsfWriter 对带有音频源的相机进行实时编码 - 抖动问题

发布于 2024-08-05 00:35:17 字数 455 浏览 7 评论 0原文

我构建了一个由视频捕获过滤器组成的 DirectShow 图表 (抓取屏幕),默认音频输入过滤器均已连接 通过分离器到 WM Asf Writter 输出滤波器和 VMR9 渲染器。 这意味着我想将实时音频/视频编码保存到磁盘 与预览一起。问题是无论我使用什么 WM 配置文件 选择(即使是非常低的分辨率配置文件)输出视频文件是 总是“抖动”——每隔几帧就会有延迟。音频没问题—— 音频没有抖动。 CPU占用率低< 10% 所以我相信 这不是CPU资源不足的问题。我想我是时候了—— 正确地标记我的框架。 可能是什么原因?

以下是解释该问题的录像机视频的链接:

http://www.youtube.com /watch?v=b71iK-wG0zU

谢谢 多米尼克·托姆扎克

I build a DirectShow graph consisting of my video capture filter
(grabbing the screen), default audio input filter both connected
through spliiter to WM Asf Writter output filter and to VMR9 renderer.
This means I want to have realtime audio/video encoding to disk
together with preview. The problem is that no matter what WM profile I
choose (even very low resolution profile) the output video file is
always "jitter" - every few frames there is a delay. The audio is ok -
there is no jitter in audio. The CPU usage is low < 10% so I believe
this is not a problem of lack of CPU resources. I think I'm time-
stamping my frames correctly.
What could be the reason?

Below is a link to recorder video explaining the problem:

http://www.youtube.com/watch?v=b71iK-wG0zU

Thanks
Dominik Tomczak

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

面如桃花 2024-08-12 00:35:17

我过去也遇到过这个问题。您的问题是写入磁盘的数据量。写入更快的驱动器是解决此问题的一个很好且简单的解决方案。我所做的另一件事是将视频压缩器放入图表中。您需要确保两个输入流使用相同的参考时钟。我在使用这种压缩器方案并保持良好的预览时遇到了很多问题。即使我使用无限 Tee 而不是智能 Tee,我的预览帧速率也会下降,但写入磁盘的结果很好。还值得注意的是,我运行它的机器越强大,问题就越小,因此如果您需要在机器中安装一个新的更快的硬盘,那么它实际上可能不会提供太大的胜利。

I have had this problem in the past. Your problem is the volume of data being written to disk. Writing to a faster drive is a great and simple solution to this problem. The other thing I've done is placing a video compressor into the graph. You need to make sure both input streams are using the same reference clock. I have had a lot of problems using this compressor scheme and keeping a good preview. My preview's frame rate dies even if i use an infinite Tee rather than a Smart Tee, the result written to disk was fine though. Its also worth noting that the more of a beast the machine i was running it on was the less of an issue so it may not actually provide much of a win if you need both over sticking a new faster hard disk in the machine.

陌若浮生 2024-08-12 00:35:17

我不认为这是一个问题。写入的数据量小于1MB/s(编码时的平均压缩比)。我找到了原因 - 当我构建没有音频输入的图表(WM ASF writer 只有视频输入 pint)并且我的视频捕获引脚通过 Smart Tree 连接到预览引脚和 WM ASF writer 输入视频引脚时,则没有任何故障输出电影。我认为这是我的图表中音频到视频同步的问题。当我在 GraphEdit 中构建图表时,也会发生同样的情况。没有音频,就没有故障。对于音频,每 1 秒就会出现一个持续的故障。我想知道我的帧时间戳是否错误,但我认为我做得正确。 DirectShow 图中音频到视频同步的通用解决方案是怎样的?

I don't think this is an issue. The volume of data written is less than 1MB/s (average compression ratio during encoding). I found the reason - when I build the graph without audio input (WM ASF writer has only video input pint) and my video capture pin is connected through Smart Tree to preview pin and to WM ASF writer input video pin then there is no glitch in the output movie. I reckon this is the problem with audio to video synchronization in my graph. The same happens when I build the graph in GraphEdit. Without audio, no glitch. With audio, there is a constant glitch every 1s. I wonder whether I time stamp my frames wrongly bu I think I'm doing it correctly. How is the general solution for audio to video synchronization in DirectShow graphs?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文