You need to get a frame from the camera in C ++ and encode it in base64 (this is for browsers). It seems that all the necessary functionality is in ffmpeg, but somehow there are few manuals.

Who developed using ffmpeg, can you demonstrate a minimal sample code for capturing a frame from a webcam? Get device ID -> start shooting with the specified resolution -> fix the frame in the buffer. At least just a function.

  • and what is the data exchange protocol in the webcam? - perfect
  • That is the protocol in the webcam? In a Windows environment, you need to access the camera (vfw is not appropriate, as the camera selection dialog is displayed, and directshow is not appropriate, since the MinGW compiler does not have some directx headers). Network part should transmit Base64 over HTTP / HTTPS - Iceman
  • I did not work with webcam on this and ask. in general, any devices have their own data exchange protocols. for example, ip cameras transmit data in the rtsp puncture format. you just need to find out which protocol webcams use and this is a starting point. I understand that the webcam constantly transmits a video stream on some protocol. you need to know where this stream is directed and from there to take pictures. I think she has no record but live broadcast instead. - perfect

0