[Live-devel] Quick Advice Request on Enhancing RTSP Client with live555
Fatih Bahceci
fatih.bahceci at nanodems.com
Tue Feb 13 22:36:04 PST 2024
Hello!
First and foremost, I would like to express my gratitude and congratulations on your live555 project, which has directly or indirectly touched the lives of millions of people. I am writing this email in the hope that you might assist us with an issue.
We are using version 2023.05.10 of your live555wrapper library on the Windows platform. We have a simple client written in CPP that we use as an RTSP Client. Simply put, this RTSP client connects, receives frames, and saves them to disk. The saving part is handled by C#.
I am also sharing the RTSP Client with you as an attachment (in case you want to review it). Imagine this client connecting to 50-100 cameras. If the network of one of the RTSP cameras we are trying to connect to is faulty, our RTSP Client starts using high CPU. And if the CPU usage rises to 100%, it negatively affects all other clients, causing them to stop pulling frames.
To prevent high CPU usage, we added a 10-millisecond sleep period after each frame pull in the FramedSource.cpp file of the livemedia library in the following method:
void FramedSource::getNextFrame(unsigned char* to, unsigned maxSize, afterGettingFunc* afterGettingFunc, void* afterGettingClientData, onCloseFunc* onCloseFunc, void* onCloseClientData)
{
...
std::this_thread::sleep_for(std::chrono::milliseconds(10));
doGetNextFrame();
}
Adding this line indeed eased the CPU usage, but then we encountered another problem. It resulted in 2-minute gaps in recordings every 8 minutes, meaning approximately 20% (±10) of the data from the camera never arrived.
Do you have any suggestions regarding this issue? Have you ever encountered a similar problem? We would be very grateful for a few words of advice from you.
Fatih Bahçeci
Software Developer
[Nanodems Corporation]<http://www.nanodems.com/>
+90 (312) 485 06 78
fatih.bahceci at nanodems.com<mailto:fatih.bahceci at nanodems.com>
The Converged Vision™ Company
[cid:1761097d-abea-48cb-a838-de2cdee77834]<https://www.facebook.com/nanodems> [cid:0df3dba8-4ad8-485c-ac86-1fade5d69589] <https://twitter.com/nanodems> [cid:76a185ed-824d-4fb4-b147-01bc6ed43991] <https://www.linkedin.com/company/nanodems>
www.nanodems.com<http://www.nanodems.com/>
Privacy Policy<https://www.nanodems.com/security/e-mail-privacy-policy/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20240214/b261a49c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-Nanodems C.png
Type: image/png
Size: 2672 bytes
Desc: Outlook-Nanodems C.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20240214/b261a49c/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-soj2y0xy.png
Type: image/png
Size: 698 bytes
Desc: Outlook-soj2y0xy.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20240214/b261a49c/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-3wx3jhem.png
Type: image/png
Size: 830 bytes
Desc: Outlook-3wx3jhem.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20240214/b261a49c/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-qp2iu2iy.png
Type: image/png
Size: 769 bytes
Desc: Outlook-qp2iu2iy.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20240214/b261a49c/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RTSP_2024_02_13_14_22_16.zip
Type: application/x-zip-compressed
Size: 5229 bytes
Desc: RTSP_2024_02_13_14_22_16.zip
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20240214/b261a49c/attachment-0001.bin>
More information about the live-devel
mailing list