Nkrs
Today at work we set up a link to a camera so people will be able to see from home if there's a long line at the reception desk. Technically it is sort of impressive (we have a server that streams the RealTime feed from the camera and transcodes it as MPEG, and a WebSocket streams that MPEG into a canvas element), but I wonder if it is really needed or useful (line could grow during the 15-20 minutes that someone would use to get there).
Eric
It's a nice idea but your concern about it changing by the time the client arrives is very valid. Maybe a "queue forecast" or estimated wait time for next X hours could work better in simple plain text?
Martijn
That would be an interesting forecast to work on, I wonder if their are any documented algorithms for it. Hmmmmm...
Nkrs
Perhaps it would be better as plain text. There could be a system where every person gets issued a ticket when he enters, and when they get their turn, the ticket gets destroyed. The system could count time between ticket being issued and destroyed, and by accumulating that data, there could be forecasts. But that's a lot of work, and cameras were there already.
Mark Dain
How did you work on that? Just trying to see how you get to build fun stuff like that. Although I'd imagine when you were building it, it wasn't as fun. MPEG doesn't sound easy to work with. As for people using it, sure it could be inaccurate by the time they get there but at-least they can guess how busy things are before they leave
Nkrs
We have a process that sits on a port. When someone connects to it using a WebSocket, it takes the RealTime video (RTSP protocol - built into the camera), transcodes it into MPEG using FFmpeg on the fly, then sends the binary stream over the socket. On the client, there's a chunk of JavaScript that renders that MPEG stream into an HTML canvas element. At the moment it was the quickest solution, but we're looking at maybe just streaming JPEGs with 5s delay between frames to reduce traffic and use less bandwidth; there will be about 20 of these cameras across the country, so there are scale and cost issues to be solved.