RTSP Stream Delay

170 views
Skip to first unread message

Saravanamurthy K

unread,
Jul 22, 2021, 8:35:05 AM7/22/21
to discuss-doubango
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, 8:38:59 AM7/22/21
to doub...@googlegroups.com, Saravanamurthy K

Hi,

This is not the right forum. You have to post to https://groups.google.com/g/doubango-ai

Before posting to the right forum:

    1/ Add parallel delivery

    2/ Very important: Attach full logs

Regards,

--
You received this message because you are subscribed to the Google Groups "discuss-doubango" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango/a6d812a0-bd29-4f16-a616-34a18b3f2ae3n%40googlegroups.com.

Saravanamurthy K

unread,
Jul 22, 2021, 9:01:35 AM7/22/21
to doub...@googlegroups.com
Hi,
Can help me how to implement rtsp stream in c++

Thanks
K.Saravanamurthy.
9894802877



On Thu, Jul 22, 2021 at 6:21 PM Mamadou DIOP <diopm...@doubango.org> wrote:

Another note: add real RTSP code. What you have posted has noting to do with RTSP. You just copy/paste'ed code from https://github.com/DoubangoTelecom/ultimateALPR-SDK/blob/ccd4b58153e9ad087fe36a0333b9e2d16e413822/samples/c%2B%2B/recognizer/recognizer.cxx#L236

Your code will not compile as many parts are missing and you're opening the camera not an RTSP stream.

Reply all
Reply to author
Forward
0 new messages