I am currently developing a project for my studies where I have to fetch a webcam stream, detect some objects and put some additional information on this stream. This is all done on the server side.
Now I also have to provide the modified image of the stream to the clients. The clients just open a HTML file with the following content:
<html>
<head>
<title></title>
</head>
<body>
<h1>It works!</h1>
<video width="320" height="240" src="http://127.0.0.1:4711/videostream" type="video/quicktime" autoplay controls>
Your browser does not support the video tag.
</video>
</body>
</html>
This will result in a HTTP request on the server for /videostream. To handle this request on the server side I will use Boost 1.56.
Currently each frame of my webcam stream is of type IplImage. Do I have to convert the IplImage into a video MIME-Typespecific format?
I have tried to figure it out myself, how the whole thing is working, but I couldn't get it. I used Wireshark to analyze the communication, but it doesn't make sense. For testing purpose I have uploaded a video to my webspace and open the above file locally. The src of the video was the address of my webserver. First there is the TCP handshake stuff followed by this message:
HTTP 765 GET /MOV_4198.MOV HTTP/1.1
Followed the following message (it contains connection: Keep-Alive in the HTTP part):
HTTP 279 HTTP/1.1 304 Not Modified
Afterwards only TCP ACK and SYN folow, but no data. See the following picture: see picture
Where and how are the real data of the video sent? What have I missed here?
Would be great if you could provide me some information about the connection between the Browser (video-Tag) and the C++ socket connection.
Thank you, Stefan