Closed MyraBaba closed 4 years ago
Hi, @MyraBaba.
The MJPEG server already executes as an independent thread when you call the "start" method. Note that you have to pass it a frame before starting. You can then use the main thread for the video cap. You can also create an independent thread for the video capture as long as it has a reference to the MJPEG server in order to pass it the images that you want to stream.
Hope this helps!
Hi,
When I run on the raspberry pi3 it cost extra 50msec when I use MJPEG server. Is this cost normal ?
Best
On 3 Jun 2020, at 12:57, J. Pery notifications@github.com wrote:
Hi, @MyraBaba https://github.com/MyraBaba.
The MJPEG server already executes as an independent thread when you call the "start" method. Note that you have to pass it a frame before starting. You can then use the main thread for the video cap. You can also create an independent thread for the video capture as long as it has a reference to the MJPEG server in order to pass it the images that you want to stream.
Hope this helps!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JPery/MJPEGWriter/issues/18#issuecomment-638092689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFRZHZ7RMBEKIRBX3G4GA3RUYNANANCNFSM4NRPYPCQ.
I suppose this cost is due to JPEG encoding, it's the most costly computational operation. You can improve that by installing some JPEG libraries that allow hardware acceleration. You can also lower the JPEG encoding quality and the resolution in order to improve performance.
Hi,
I am new to the c++.
how we can put the mjpeg server a std::thread ? so video cap and mjpeg server will be separate thred ?
Best