Question

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.

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.

Question 1 : how can it be fixed?

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

Was it helpful?

Solution

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.

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 >}

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 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 >.

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

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

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 >}

OTHER TIPS

Figured it out. With help of http://tumblr.martinml.com/post/2108887785/how-to-broadcast-a-mjpeg-stream-from-your-webcam-with

VLC has options to set mime type and boundary. Example of configuration from link

:sout=#transcode{vcodec=MJPG,vb=400,width=640,height=480}
:duplicate{dst=std{access=http{mime=multipart/x-mixed-replace;
boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:1234/webcam.mjpg}}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top