RTSP Stream Delay

480 views
Skip to first unread message

Saravanamurthy K

unread,
Jul 22, 2021, 8:55:10 AM7/22/21
to doubango-ai
Hi,
I Integrated ULTALPR_SDK in C++ with rtsp stream but its delay 1 to 2 minutes delay,
when compare to live stream.

I used opencv for rtsp stream.
Can I have solution why stream delay. 

       Mat frame;
VideoCapture cap(0);

int deviceID = 0;             // 0 = open default camera
int apiID = cv::CAP_ANY;      // 0 = autodetect default API
// open selected camera using selected API
cap.open(deviceID, apiID);
// check if we succeeded
if (!cap.isOpened()) {
cerr << "ERROR! Unable to open camera\n";
return -1;
}
//UltAlprSdkResult result;
//std::string jsonConfig = __jsonConfig;
ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::init(jsonConfig.c_str())).isOK());

//Json::Reader reader;
//Json::Value root;

while (1) {
cap.read(frame);
// check if we succeeded
if (frame.empty()) {
cerr << "ERROR! blank frame grabbed\n";
break;
}
// show live and wait for a key with timeout long enough to show images
imshow("Live", frame);
if (waitKey(5) >= 0)
break;

ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::process(
ULTALPR_SDK_IMAGE_TYPE_BGR24,
frame.ptr(),
frame.size().width,
frame.size().height
)).isOK());

const std::string& json = result.json();
/*if (!json.empty())
ULTALPR_SDK_PRINT_INFO("result print: %s", json.c_str());*/

//End Read LicencePlate

ULTALPR_SDK_PRINT_INFO("Processing done.");

// Print latest result
if (!isParallelDeliveryEnabled && result.json()) { // for parallel delivery the result will be printed by the callback function
const std::string& json_ = result.json();
if (!json_.empty()) {
ULTALPR_SDK_PRINT_INFO("result: %s", json_.c_str());
                    }
}
}

Mamadou DIOP

unread,
Jul 22, 2021, 9:04:57 AM7/22/21
to Saravanamurthy K, doubango-ai

Please read https://groups.google.com/g/doubango/c/EzCFzej0Iso

Nope, you don't have 1 to 2 minutes delay. You haven't implemented RTSP stream at all, the code you have shared miss several parts and will not compile.

If you have really implemented RTSP stream and have 2 minute delay, then share the full code and full logs.

You cannot say you have implemented RTSP stream C++ and have 2 minutes delay then shortly after ask for help to do it -> https://groups.google.com/g/doubango/c/EzCFzej0Iso/m/TnoWu2vRAgAJ

--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/87a23691-bf5e-4503-9cf9-9c38fac3dd00n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages