Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

Hello.

I was make multi-thread program for multi-viewer for cameras. I have 2 questions. And i've takes opencv v3.4.4.

  1. When it camera was down, open(url) functions return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads. - 1st try takes 3sec, - 2nd try takes 6sec, - ... - #n th try takes 3*n sec

I think try take time have to similar, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

Please help.

VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

Hello.

I was make multi-thread program for multi-viewer for cameras. I have 2 questions. And i've takes opencv Additionally i was use OpenCV v3.4.4.

  1. When it camera was down, open(url) functions function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

2.

  • I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads. - threads.

  • 1st try takes 3sec, - 3sec,

  • 2nd try takes 6sec, - ... - 6sec,
  • ...
  • #n th try takes 3*n sec
  • these time i’ve check as : different of before open() and after open()

    I think try take open() function taken time have to similar, similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

  • Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I was make multi-thread program for multi-viewer for cameras. I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

    3. 1st try takes 3sec,

    4. 2nd try takes 6sec,
    5. ...
    6. #n th try takes 3*n sec
    7. these time i’ve check as : different of before open() and after open()

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I was make multi-thread program for multi-viewer for cameras. I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,

      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • these time i’ve check as : different of before open() and after open()

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I was make multi-thread program for multi-viewer for cameras. I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve these time i’ve check as : different of before open() and after open()

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I was make multi-thread I’ve making multi-threading program for multi-viewer for cameras. of cameras.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve these time check as : different of before open() and after open()

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras.

    cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve check these time check as : different of before open() and after open()as : > time1 = currenttimecheck(); > open("rtsp://ip:port/name"); > diff = currenttimechekc() - time1;

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve check these time as : > time1 = currenttimecheck(); > open("rtsp://ip:port/name"); > diff = currenttimechekc() - time1;

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve check these time as : > :

    time1 = currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1;

    I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve check these time as :

    : >> time1 = currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1;

    I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve check these time as : >> time1 = currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1;

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve check these time as : : >> time1 = currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1;

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st try takes 3sec,
      • 2nd try takes 6sec,
      • ...
      • #n th try takes 3*n sec
      • i’ve check these time as :
        >> time1 = currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1;

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st thread try takes 3sec,
      • 2nd thread try takes 6sec,
      • ...
      • #n th thread try takes 3*n sec
      • i’ve check these time as :
        >> time1 = currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1;

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st thread try open() takes 3sec,
      • 2nd thread try open() takes 6sec,
      • ...
      • #n th thread try open() takes 3*n sec
      • i’ve check these time as :
        >> time1 = currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1;

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st thread open() takes 3sec,
      • 2nd thread open() takes 6sec,
      • ...
      • #n th thread open() takes 3*n sec
      • i’ve check these time as :
        >> > time1 = currenttimecheck(); currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1;time1; >> this "diff" was not similar each threads

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st thread open() takes 3sec,
      • 2nd thread open() takes 6sec,
      • ...
      • #n th thread open() takes 3*n sec
      • i’ve check these time as :
        > time1 = currenttimecheck(); open("rtsp://ip:port/name"); diff = currenttimechekc() - time1; >>
        >
        this "diff" was not similar each threads

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st thread open() takes 3sec,
      • 2nd thread open() takes 6sec,
      • ...
      • #n th thread open() takes 3*n sec
      • i’ve check these time as :
        > time1 = currenttimecheck(); open("rtsp://ip:port/name");
        open("rtsp://ip:port/name");
        diff = currenttimechekc() - time1;
        > >> this "diff" was not similar each threads

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.

    VideoCapure::open(const String & filename) blocked 30s, Camera not running /On multi-thread, open() do like single-thread

    Hello.

    I’ve making multi-threading program for multi-viewer of cameras. On thread, to connect and get frame and show on MFC windows.

    function of I've use : VideoCapture::open, VideoCapture::read(), and show function using windows c++ api.

    I have 2 questions. Additionally i was use OpenCV v3.4.4.

    1. When it camera was down, open(url) function return not immediately. After about 30 seconds, it was return. How can i set this open function running as non-blocked?(like as when it camera not working return -1 immediately)

    2. I've made multi-threads for multi-viewers on one Process. So, multi thread try to connect at the same time to use VideoCapture::open(url) fucntion. Then return from open() was not seems like independent each threads.

      • 1st thread open() takes 3sec,
      • 2nd thread open() takes 6sec,
      • ...
      • #n th thread open() takes 3*n sec
      • i’ve check these time as :
        > time1 = currenttimecheck();
        open("rtsp://ip:port/name");
        diff = currenttimechekc() - time1;
        >> > this "diff" was not similar each threads

      I think open() function taken time have to similar each thread, but the result was not. Like as when 1st camera connection was finish, 2nd connection was start......... do until last connection.

    Please help.