Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我设计了一个winform应用程序(c#)来在图片框中使用microsoft.directx.audiovideoplayback播放视频。现在我想在播放视频时提取视频的每个帧或位图图像。有什么方法可以实现它?
视频播放(尤其是基于 AudioVideoPlayback)不使用位图来流式传输和呈现视频。为了提取单个帧,您需要更强大的视频 API 来流式传输和解压缩视频。一种典型的方法是使用 DirectShow.NET 库(它和 AudioVideoPlayback 在后端都使用 DirectShow API)和 Sample Grabber 使用SampleCB回调来获取单个帧。您在那里获得的数据可以转换为位图。
SampleCB
看: