Http multi part mjpeg stream well then write one. it’s pretty easy ;) even creating a dx11 texture out of it isn’t hard either

apparently because you tried or assuming?
looking at .net WebRequest class it can do exactly that. and the whole class is available as VL nodes.
you can create a webrequest with a header configured to your likes, read write the request stream and read write the response stream, which should contain your mjpeg data in some form

@microdee: the problem is not decoding the MJPEG stream as Joreg wrote, the dynamic texture will take care of that (it does!). Also consider there is not a *.mjpeg url you can get, it is an http call and the stream within its response, also a payload must be sent, anyway the problem with th e current http nodes is that they won’ t show the response as long as they are running.

@woei: of course I am talking about vvvv nodes, VL is a brand a new (and brave) world and I may need a little while ot catch up, (doing my home works tough)

above thing i’ve linked will get mjpeg stream from http too, afaik it’s just what you need with 4 effective lines of code. I don’t think so you need .mjpeg at the end of the url if the camera has some resource-url mapping or service stuff going on (aka http://dom.ain/feed )

It hasn’ t you can get the specification here:

ooh I see and you suggest that the rest api url won’t work with this library?

No, what I am saying is that this library takes care of decoding the mjpeg stream

private void Start_Click(object sender, RoutedEventArgs e)
    _mjpeg.ParseStream(new Uri(""));

and this is already taken care in vvvv with the dynamic texture, the problem here is that I can’ t even get to that stream, before stopping the request.

EDIT: btw in your http nodes is i tok to click the construct pin of the Client at the same time of the Send pin of the Send node? That seems to work right, just asking

but it also takes care of fetching the stream from http it’s not just decoding. anyway if I can get a public camera stream with this I can have a go with my http node

Unfortunately I don’ t think it is possible, or it is not trivial, as the camera creates its own access point so I am not really sure about how to do some NAT on my router to give it a public access (furthermore I am on a HDSPA connectio right now, but I ll have a look at it).
The “ritual” is as following:

  • POST to IP/osc/commands/execute with payload
    “name”: “camera.getLivePreview”,

  • the camera starts to stream (akwnoledged by monitoring the wifi use of bandwidth), nothing comes out of the http nodes

  • if you stop the stream (must be done in the camera because if you do it with an http request, the latest response will erase the previous, or alternatively with a parallel request) the http node spits out the recorded frames with the folowing content type, they frame boundary is explicitly defined


This one just to let @microdee know that with the ResponseHeaderRead setting it works, it is just picky about whether you did a request before without that settings, it seems like it is crashing the AP and the http nodes get stuck, I am investigating.
EDIT: it works in the sense that the stream is ready available but the raw data is not complete, it seems like it is sending out chunks, one every frame or so…

I don’t know how it was working for you as I never tested my http node with ResponseHeadersRead and surprise surprise it didn’t work for me accordingly. anyway I solved it and now I’m fighting with async stream shenanigans

Ok maybe we can set up a teamviewer session one of these days and you can try with my camera?

yeah cool idea, I will show http nodes off at next vveekend vvorkshop too. pushed fixes to github use vpm to update. I’d suggest updating vobjects too as some nodes were transferred to mp.essentials

This happes for Vobjects and md.essentials

I managed to install but the http nodes are acting weird now, the raw content is like “accumulating” on the output instead of replacing at every call.

yes check out the girlpower it’s “”“working”"" there, but not like UDP or TCP nodes. I’m using HttpClient and not WebRequest to accomplish stuff. With HttpClient it is better to do sessions and I wanted to keep that however it is very hacky to get out indefinite streaming of data. what was the vpm link you were using btw?

I used the vpm link in the downloaded github folder. (all)

Indeed it works with the Girlpower example! But still some issues I think you are aware of, stuttering and tearing of the image and it can crash from time to time, still a bit step forward. Tx.

yeah there can be data loss or error when the position is changed by the vvvv thread of the stream. there’s a racing condition I have to deal with somehow in the future

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.