如何从“实时”Windows Media Stream 每隔 X 秒抓取缩略图
如果您愿意的话,我想在网络应用程序中提供流“频道”之间的选择。这些是从 Windows Media Services 9 分发网络广播的现场活动的Windows Media 流。
我想提供流的相对最新的缩略图(作为用户,您会期望看到这个),但是尽管我已经在 CNN 和无数其他网站上的 Flash 中看到了这一点,但我从未见过使用视窗媒体。
我已经有一个 C# / DirectX 库,可以从 WMV 文件中提取缩略图,但显然,如果它是实时源,则流不是来自文件。
到目前为止我的假设是:
需要运行某种服务应用程序/守护程序,它将接收流到 Windows Media Player 对象中,并以某种方式获取缩略图(如果 WMPlayer 支持的话)...
-或-
配置要存档到文件的流,并使用现有的类库查看正在写入的存档文件中可用的最后一帧以获取缩略图。
我更愿意做#1,因为它看起来是干净的解决方案,但不知道 WMPlayer 是否/如何支持抓取帧。
有更好的方法吗?
I want to provide a choice between streaming 'channels', if you will, in a web application. These are Windows Media streams of live events that are being broadcast from a Windows Media Services 9 distribution network.
I want to provide a relatively recent thumbnail image of the stream (as a user, you would expect to see this), but although I've seen this done in Flash on CNN and countless other sites, I've never seen this done with Windows Media.
I already have a C# / DirectX library that can extract a thumbnail from a WMV file, but obviously the stream doesn't come from a file if it's a live source.
My assumptions so far are:
Will need to run some kind of service application/daemon that will receive a stream into a Windows Media Player object and somehow take thumbnails if WMPlayer supports it...
-or-
Configure the streams to archive to file, and use the existing class library to take a peek at the last frame available in the archive file being written to get the thumbnail.
I would much rather do #1 because it seems like the clean solution, but don't know if/how WMPlayer supports grabbing a frame.
Are there better ways of doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定在这种情况下使用媒体播放器是否是个好主意。我会调查一下:
http://sourceforge.net/projects/windowsmedianet/
Not sure if using media player is a good idea in such case. I would look into this:
http://sourceforge.net/projects/windowsmedianet/