VLC 和 MJPEG 解码器流(无效标头) [英] VLC and MJPEG Decoder streaming (invalid header)

查看:50
本文介绍了VLC 和 MJPEG 解码器流(无效标头)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个包含视频流的 WinRT 应用程序.现在我在 VLC 上作为流媒体服务器和 MJPEGDecoder lib (http://mjpeg.codeplex.com/) 结束客户端解码视频.

I`m making a WinRT application which includes video streaming. Now I ended at VLC as streaming server and MJPEGDecoder lib (http://mjpeg.codeplex.com/) on client to decode video.

但是在创建 HTTP 流并从客户端连接到它之后,MJPEGDecoder 说标头无效(它需要多部分流).VLC 到 VLC 工作正常.

But after creating HTTP stream and connecting to it from client, MJPEGDecoder says that header is invalid (it expects multipart stream). VLC-to-VLC works normal.

问题 1:如何修复?

问题 2:为 WinRT 创建视频流的替代方法是什么?

Question 2 : what alternatives to create video streaming for WinRT?

推荐答案

只是进一步详细说明您的问题/答案.发布的答案仅链接到一个示例,但没有解释它,示例本身也没有.所以我想完成这个答案,以防其他人偶然发现它.

Just to elaborate on your question/answer a bit further. The posted answer links just to an example but doesn't explain it, niether does the example itself. So I would like to complete this answer in case someone else stumbles across it.

当您定义了 vlc 流时,您忘记在问题中分享该流,您很可能没有从访问参数 http 中指定任何选项,而是将 vlc 标准模块定义为这样.(就像我遇到同样问题时所做的那样)

When you defined your vlc stream, which you forgot to share in your question you most likely didn't specify any options from the access parameter http and had the vlc standard module defined as such. (just like I did when I ran into the same problem)

standard{access=http,mux=mpjpeg,dst=< address >:< port >/< path >}

您正在使用 VLC 创建通过 http 传输的 mjpeg 流.感谢 osgx另一个问题,这里是描述HTTP 上的 MPJEG.基本上:

You are using VLC to create a mjpeg stream delivered over http. Thanks to osgx reply in another question, here is the wikipedia link describing MPJEG over HTTP. Basically:

M-JPEG over HTTP 使用特殊的 mime 类型 multipart/x-mixed-replace 通知客户端,参数 boundary=*<边界 >*****,您将发送一系列由 < 分隔的 JPEG 图像.边界 >.

M-JPEG over HTTP informs the client using a special mime-type multipart/x-mixed-replace with parameter boundary=*< boundary >*****, that you will be sending a series of JPEG images separated by the < boundary >.

适用于<的规则边界 > 已在这篇文章中说明RFC2046 中定义了 Gumbo 和其他一些准则(现在可能已被更新的准则淘汰)

The rules that apply to < boundary > have been stated in this post by Gumbo and some other guidelines, perhaps now obsoleted by a newer one, are defined in the RFC2046

维基百科中对混合替换媒体类型进行了解释关于 MIME 的文章

Mixed-replaced media types are explained in the wikipedia article on MIME

由于您放置的示例已包含通过 http 流式传输的媒体内容的 mime 定义,可以将其定义为具有 http 访问定义的可选参数.

As the example you placed has included the definition of mime of the media content streamed over http can be defined as an optional parameter with the http access definition.

standard{access=http{mime=multipart/x-mixed-replace;boundary=--myboudary},mux=mpjpeg,dst=< address >:< port >/< path >}

这篇关于VLC 和 MJPEG 解码器流(无效标头)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆