渲染来自 RTSP 服务器的音频流

发布于 2024-12-21 15:54:06 字数 318 浏览 7 评论 0原文

我有一个 RTSP 服务器,它将 A/V 流从摄像机重新传输到客户端。

客户端我们使用 MF 来播放流。

我可以成功播放视频,但无法播放服务器上的音频。但是当我使用vlc播放时,它可以播放A/V。

目前我正在实施 IMFMediaStream 并创建了我的自定义媒体流。我还为音频创建了一个单独的 IMFStreamDescriptor 并添加了所有必需的属性。当我运行时,一切正常,但我的 RequestSample 方法永远不会被调用。

如果我做错了或者是否有其他方法可以在 MF 中播放音频,请告诉我。

谢谢,

普拉泰克

i have an RTSP server which is re-streaming the A/V stream from the camera to clients.

Client side we are using MF to play the stream.

I can successfully play the video but not able to play the audio from the server. However when i use vlc to play, it can play both A/V.

Currently i am implementing IMFMediaStream and have created my customize media stream. I have also created a separate IMFStreamDescriptor for audio and added all the required attributes. When i run , everything goes fine but my RequestSample method never gets called.

Please let me know if i am doing it wrong or if there is any other way to play the audio in MF.

Thanks,

Prateek

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

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

发布评论

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

评论(1

夏尔 2024-12-28 15:54:06

媒体基金会对 RTSP 的支持仅限于少数有效负载格式。 VLC 支持更多(AFAIR 通过 Live555 库)。最有可能的是,Media Foundation 不支持您的有效负载。

Media Foundation support for RTSP is limited to a small number of payload formats. VLC supports more (AFAIR through Live555 library). Most likely, your payload is not supported in Media Foundation.

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