如何在播放音视频文件(rm wmv avi mp3 等)的时候,获取声音数据和单帧图像?

wanshi131 2009-02-26 10:07:35
如题。
如果基于media player classic有没有办法做?需要自己写filter吗?
如果单纯使用Directshow的话,在播放格式上有限制。
有没有人能提供一个方案或思路?
感谢!
...全文
224 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lllsui 2009-03-04
  • 打赏
  • 举报
回复
还不会
zhoumingjie 2009-02-28
  • 打赏
  • 举报
回复
"rm avi文件不能成功连接 声音和视频的 ISampleGrabber"
这是不可能的,因为samplegabber本身是trans-in filter,没有具体类型检查

"这些文件都需要用到splitter filter,"
splitter可以使用现成的,avisplitter,realmediasplitter,都开源,自己找找
wanshi131 2009-02-28
  • 打赏
  • 举报
回复
Limitations: Regardless of what type you set, the Sample Grabber Filter rejects any video types with top-down orientation (negative biHeight), or with a format type of FORMAT_VideoInfo2. In this case, although the SetMediaType method succeeds, the filter will not connect.

连接不成功是因为,xvid视频解码输出的formattype是FORMAT_VideoInfo2,所以连接不成功。
声音没问题
wanshi131 2009-02-27
  • 打赏
  • 举报
回复
rm avi文件不能成功连接 声音和视频的 ISampleGrabber, 这些文件都需要用到splitter filter,asf和wmv可以用

请问大家这种情况要怎么获得 声音和视频数据啊?
zhoumingjie 2009-02-26
  • 打赏
  • 举报
回复
看下directshow的例子,samplegabber.
media player classic也是基于dshow的,它只是一个应用程序,而不是平台。

19,468

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧