可以在没有 SmoothStreaming Server 的情况下使用 SmoothStreamingClient 吗?
我想为具有专有 RTP 服务器的 IP 摄像机构建一个 Silverlight 实时馈送查看器,即没有 IIS,没有 SmoothStreaming 扩展。 SmoothStreamingClient(或微软媒体平台)是最好的起点吗?
I want to build a Silverlight live feed viewer for an IP camera with a proprietary RTP server, i.e. no IIS, no SmoothStreaming extension. Is SmoothStreamingClient (or microsoft media platform) is the best place to start?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您绝对不需要
SmoothStreamingClient
,因为它假定您使用的是 SmoothStreaming 媒体源。但是,您可以使用MediaElement
并实现您自己的MediaStreamSource
。这要求您知道如何解析 IP 摄像机喷出的数据并将其转换为有效的视频样本,这并不简单,但它是唯一提供的用于显示尚未内置视频数据的机制。在流媒体源中。但是,如果 Silverlight 已经支持您的 IP 摄像机发送的视频格式,那么您所需要做的就是创建一个读取摄像机数据的
Stream
并将其作为媒体源传递给>MediaElement
。You definitely don't want the
SmoothStreamingClient
, as that assumes that you're using a SmoothStreaming media source. However, what you can do instead is use aMediaElement
and implement your ownMediaStreamSource
. This requires that you know how to parse the data being spewed by your IP camera and turn it into valid video samples, which is non-trivial, but it's the only supplied mechanism for displaying video data for which there isn't already a built-in streaming source.However, if the video format that your IP camera sends is already supported by Silverlight, then all you need to do is create a
Stream
that reads the camera data and pass that as the media source to aMediaElement
.最好的方法是使用一些服务器端应用程序来获取相机数据并将图片保存在网络服务器上的某个位置。然后,您可以定期刷新 HTML 页面以显示新图像(技巧是提供
http://someserver/someimage.jpg?dummy=i
样式的 url,其中将 i 替换为每次都会变化的数字(输入一个大的随机数或当前日期时间),以便浏览器不会缓存并始终显示先前下载的帧Best way is to have some server-side app that gets the camera data and saves a picture at a certain location on the web server. Then you can have an HTML page refresh periodically to show the new image (trick is to give a url of the style
http://someserver/someimage.jpg?dummy=i
, where you replace i with a number that changes every time (put a big random number or the current datetime), so that the browser doesn't cache and show the previously downloaded frame all the time