New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable live streaming with MJPEG #26

Closed
cedricve opened this Issue Feb 15, 2016 · 1 comment

Comments

1 participant
@cedricve
Copy link
Member

cedricve commented Feb 15, 2016

MJPEG will be implemented (C++ sockets), this will allow a user to view a live stream on the dashboard page. The MJPEG stream will work with any device: IP camera, USB camera or Rapsberry Pi camera.

First send the HTTP header

_write( client,"HTTP/1.0 200 OK\r\n" "Server: Mozarella/2.2\r\n" "Accept-Range: bytes\r\n" "Max-Age: 0\r\n" "Expires: 0\r\n" "Cache-Control: no-cache, private\r\n" "Pragma: no-cache\r\n" "Content-Type: multipart/x-mixed-replace; boundary=mjpegstream\r\n" "\r\n",0);

Keep sending the frames
sprintf(head,"--mjpegstream\r\nContent-Type: image/jpeg\r\nContent-Length: %lu\r\n\r\n",outlen); _write(clients[i],head,0); _write(clients[i],(char*)(&outbuf[0]),outlen

A toggle will be place on the dashboard wich makes it possible to switch between the activity (latest sequence of detection) and a live stream using a MJPEG image.

Following library will be used to draw the MJPEG on the canvas: https://github.com/WPI-RAIL/mjpegcanvasjs

screen shot 2016-02-23 at 21 27 41

@cedricve cedricve self-assigned this Feb 15, 2016

@cedricve cedricve added this to the Release 2.0.0 milestone Feb 15, 2016

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 24, 2016

added to develop branch

@cedricve cedricve closed this Feb 24, 2016

@cedricve cedricve removed the in progress label Feb 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment