Ask Your Question

bdm77's profile - activity

2020-05-27 05:10:16 -0600 received badge  Popular Question (source)
2017-03-22 07:34:14 -0600 received badge  Scholar (source)
2017-03-21 13:08:17 -0600 received badge  Self-Learner (source)
2017-03-21 08:52:16 -0600 commented question Read video stream from VLC plyaer

If I use command line ffmpeg -i rtsp://@127.0.0.1:18554/streamer -acodec copy -vcodec copy c:/events/abc.mp4 then it works fine.

2017-03-21 08:27:04 -0600 asked a question Read video stream from VLC plyaer

Hello!

I get a stream from the camera using the RTSP protocol.

    int main()
    {
     std::stringstream fmt;
fmt << "rtsp://" << "127.0.0.1" << ":" << "18554" << "/" << "streamer";

m_url = fmt.str();
    int count = 0;
double fps = 0.0;
bool isExit = false;
Mat frame;

std::string displayName_1 = "Display window_1";

namedWindow(displayName_1, WINDOW_NORMAL);// Create a window for display.   
resizeWindow(displayName_1, 400, 400);

do {
    std::cout << std::endl << " Try connection to camera: " << +m_url.c_str() << std::endl;
    VideoCapture cam(m_url.c_str());

    while (true)
    {
        count++;

        if (!cam.read(frame)) {
            printf(" Not get frames from camera %s\n", m_url.c_str());
            if (count >= 10) {
                count = 0; break;
            }
            continue;
        }

        if (frame.data) {
            imshow(displayName_1, frame);                   // Show our image inside it.            }
        else
        {
            printf("Failed to get frames from the camera!!! count %d of 10 \n", count);
            if (count == 10) {
                count = 0;
                break;
            }
        }

        if (cvWaitKey(10) == 27) {
            isExit = true;
            break;
        }

    }
} while (!isExit);
}

Works great.

Now I need to write a simulation of the camera.

In the VLC player, I read the video file and send it to the stream. (:sout=#rtp{sdp=rtsp://:18554/streamer} :sout-all :sout-keep)

When I try to read the stream, I get an error - "[rtsp @ 000002a02cead760] method SETUP failed: 461 Client error"

How can this problem be solved. Thank you!

2015-07-06 09:26:09 -0600 answered a question How to fix H264 decoding?

I have the same problem! There is the answer?

2015-07-03 05:34:24 -0600 received badge  Enthusiast
2015-07-02 07:07:48 -0600 commented answer How to read pixel every frame?

No answer to this question.

2015-07-02 05:19:30 -0600 commented answer How to read pixel every frame?

You can build on your computer?

2015-07-02 05:16:31 -0600 commented answer How to read pixel every frame?
2015-07-02 01:21:09 -0600 commented answer How to read pixel every frame?

still error when compiled. .... 25>Linking... 25>LINK : fatal error LNK1104: cannot open file '....\lib\Debug\opencv_core300d.lib' 25>Build log was saved at "file://d:\Developer\SDK\opencv\OpenCV300\build\x86\vc8\apps\annotation\opencv_annotation.dir\Debug\BuildLog.htm" 25>opencv_annotation - 1 error(s), 0 warning(s) 23>cascadedetect_convert.cpp 23>..........\sources\modules\objdetect\src\hog.cpp(1412) : error C2146: syntax error : missing ')' before identifier 'signedGradient' 23>..........\sources\modules\objdetect\src\hog.cpp(1412) : error C2660: 'cv::ocl_compute' : function does not take 12 arguments 23>..........\sources\modules\objdetect\src\hog.cpp(1412) : error C2059: syntax error : ')' ......

2015-07-01 06:06:30 -0600 received badge  Editor (source)
2015-07-01 06:05:42 -0600 answered a question How to read pixel every frame?

This is out of Cmake:

Check for working CXX compiler using: Visual Studio 8 2005
Check for working CXX compiler using: Visual Studio 8 2005 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working C compiler using: Visual Studio 8 2005
Check for working C compiler using: Visual Studio 8 2005 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Performing Test HAVE_CXX_FSIGNED_CHAR
Performing Test HAVE_CXX_FSIGNED_CHAR - Failed
Performing Test HAVE_C_FSIGNED_CHAR
Performing Test HAVE_C_FSIGNED_CHAR - Failed
Check if the system is big endian
Searching 16 bit integer
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - not found
Looking for stddef.h
Looking for stddef.h - found
Check size of unsigned short
Check size of unsigned short - done
Using unsigned short
Check if the system is big endian - little endian
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Check size of off64_t
Check size of off64_t - failed
Looking for assert.h
Looking for assert.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for io.h
Looking for io.h - found
Looking for jbg_newlen
Looking for jbg_newlen - not found
Looking for mmap
Looking for mmap - not found
Looking for search.h
Looking for search.h - found
Looking for string.h
Looking for string.h - found
Looking for unistd.h
Looking for unistd.h - not found
ICV: Removing previous unpacked package: D:/Developer/SDK/opencv/OpenCV300/sources/3rdparty/ippicv/unpack
ICV: Unpacking ippicv_windows_20141027.zip to D:/Developer/SDK/opencv/OpenCV300/sources/3rdparty/ippicv/unpack...
ICV: Package successfully downloaded
found IPP (ICV version): 8.2.1 [8.2.1]
at: D:/Developer/SDK/opencv/OpenCV300/sources/3rdparty/ippicv/unpack/ippicv_win
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.3", required is "2.7")
Found PythonLibs: C:/Python27/libs/python27.lib (Required is exact version "2.7.3")
Could NOT find PythonInterp: Found unsuitable version "2.7.3", but required is at least "3.4" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "2.7.3", but required is at least "3.2" (found C:/Python27/python.exe)
Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
  videoio: Removing WinRT API headers by default

General configuration for OpenCV 3.0.0 =====================================
  Version control:               unknown

  Platform:
    Host:                        Windows 6.1 x86
    CMake:                       2.8.7
    CMake generator:             Visual Studio 8 2005
    CMake build tool:            C:/PROGRA~2/MI30EB~1/Common7/IDE/devenv.com
    MSVC:                        1400

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                cl
    C++ flags (Release):         /DWIN32 /D_WINDOWS ...
(more)
2015-07-01 06:03:34 -0600 answered a question How to read pixel every frame?
Check for working CXX compiler using: Visual Studio 8 2005
Check for working CXX compiler using: Visual Studio 8 2005 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working C compiler using: Visual Studio 8 2005
Check for working C compiler using: Visual Studio 8 2005 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Performing Test HAVE_CXX_FSIGNED_CHAR
Performing Test HAVE_CXX_FSIGNED_CHAR - Failed
Performing Test HAVE_C_FSIGNED_CHAR
Performing Test HAVE_C_FSIGNED_CHAR - Failed
Check if the system is big endian
Searching 16 bit integer
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - not found
Looking for stddef.h
Looking for stddef.h - found
Check size of unsigned short
Check size of unsigned short - done
Using unsigned short
Check if the system is big endian - little endian
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Check size of off64_t
Check size of off64_t - failed
Looking for assert.h
Looking for assert.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for io.h
Looking for io.h - found
Looking for jbg_newlen
Looking for jbg_newlen - not found
Looking for mmap
Looking for mmap - not found
Looking for search.h
Looking for search.h - found
Looking for string.h
Looking for string.h - found
Looking for unistd.h
Looking for unistd.h - not found
ICV: Removing previous unpacked package: D:/Developer/SDK/opencv/OpenCV300/sources/3rdparty/ippicv/unpack
ICV: Unpacking ippicv_windows_20141027.zip to D:/Developer/SDK/opencv/OpenCV300/sources/3rdparty/ippicv/unpack...
ICV: Package successfully downloaded
found IPP (ICV version): 8.2.1 [8.2.1]
at: D:/Developer/SDK/opencv/OpenCV300/sources/3rdparty/ippicv/unpack/ippicv_win
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.3", required is "2.7")
Found PythonLibs: C:/Python27/libs/python27.lib (Required is exact version "2.7.3")
Could NOT find PythonInterp: Found unsuitable version "2.7.3", but required is at least "3.4" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "2.7.3", but required is at least "3.2" (found C:/Python27/python.exe)
Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
  videoio: Removing WinRT API headers by default

General configuration for OpenCV 3.0.0 =====================================
  Version control:               unknown

  Platform:
    Host:                        Windows 6.1 x86
    CMake:                       2.8.7
    CMake generator:             Visual Studio 8 2005
    CMake build tool:            C:/PROGRA~2/MI30EB~1/Common7/IDE/devenv.com
    MSVC:                        1400

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                cl
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4  /EHa /GR  /D _CRT_SECURE_NO_DEPRECATE ...
(more)
2015-06-30 09:14:38 -0600 commented question How to read pixel every frame?

There's a lot of information. Maybe copy something specific?

2015-06-30 03:00:15 -0600 commented question How to read pixel every frame?

that is kind of bogus, does not compile actually means that you could not compile it. Please add the errors and we will walk you through it! Do you understand what the problem is ??

2015-06-29 09:05:03 -0600 commented question How to read pixel every frame?

error C3861: '_mm_cvtss_f32': identifier not found in file intrin_sse.hpp error C3861: '_mm_cvtsd_f64': identifier not found in file intrin_sse.hpp error C3861: '_mm_castsi128_ps': identifier not found in file intrin_sse.hpp ..............

2015-06-29 09:00:54 -0600 commented question How to read pixel every frame?

image description

2015-06-29 07:42:30 -0600 commented question How to read pixel every frame?

Thank you very much! I have another question. How to get a time of frame (hh.mm.ss.millisecond)?

2015-06-29 07:03:08 -0600 commented question How to read pixel every frame?

To be honest I don't know what you're asking or what you want us to resolve, and I don't think anyone does at this point. How can I add text to a frame and save to disk? (using opencv)

2015-06-29 06:59:24 -0600 commented question How to read pixel every frame?

Why would you not be able to do it? You will need to rebuild opencv yourself, but it should work just fine. I tried to compile version 3.0.0 but for VS 2005 does not compile.

2015-06-29 06:56:02 -0600 commented question How to read pixel every frame?

Once again, you can add text to a frame and save it as bmp file without using cimg. If we're not understanding your problem, please give more details. Of course I can use Opencv but then it will not match the design of the program. If it does not I will use Opencv.

2015-06-29 05:58:20 -0600 commented question How to read pixel every frame?

This design. I have the function of receiving a frame (char*) this function adds a text in frame, and writes in the BMP file.

2015-06-29 03:40:27 -0600 commented answer How to read pixel every frame?

I know about it! But I have a lot of cameras, not all cameras work with opencv. And before writing to the disk, I must add text to image bmp. Thank you.

2015-06-29 03:31:58 -0600 commented question How to read pixel every frame?

No, because I have a lot of cameras, not all cameras work with opencv. And before writing to the disk, I must add text to image bmp.

2015-06-29 03:07:06 -0600 commented question How to read pixel every frame?

I can't update opecv because i working in visual studio 2005.

2015-06-29 02:53:36 -0600 asked a question How to read pixel every frame?

Hello!

I using Opencv 2.3.1 and cimg!

I need to read every frame with IP camera and record it into the BMP file.

I have the following code:

       Mat frame;
    VideoCapture cam("rtsp://admin:[email protected]/defaultPrimary?streamType=u");
    while(true)
    {   
        if (!cam.read(frame))
            continue;

        count++;
        cimg_library::CImg<unsigned char>* m_frameData = new cimg_library::CImg<unsigned char>(1920, 1080, 1 , 3);

        if (frame.data)
        {
            cvtColor(frame, frameRGB, CV_BGR2RGB);
            uchar* pixelsRGB = frameRGB.data;

            for (unsigned int x = 0; x < frame.rows; x++)               
            {
                for (unsigned int y = 0; y < frame.cols; y++)   
                {                       
                    m_frameData->atXYZC(x,y,0,0) = (int) pixelsRGB[ y + x];
                    m_frameData->atXYZC(x,y,0,1) = (int)pixelsRGB [ y + x + 1];
                    m_frameData->atXYZC(x,y,0,2) = (int) pixelsRGB[ y + x + 2];
                }
            }

            std::string fileWrite = "C:\\Temp\\out" +count+ ".bmp";             
            m_frameData->save_bmp(fileWrite.c_str());

            delete m_frameData;
     }

When I open the BMP file I get: image description

But it should be this: image description

Please help me! Thanks.

2015-06-29 01:56:29 -0600 answered a question Problem while get video from IP Camera (OpenCV 2.3.1)

There was a problem in the old library ffmpeg.

2015-06-25 02:35:59 -0600 asked a question Problem while get video from IP Camera (OpenCV 2.3.1)

I use OpenCV 2.3.1. I am trying get video from IP Camera (rtsp protocol) but get the following error:

IplImage* frame;   
CvCapture* cam = cvCaptureFromFile("rtsp://admin:[email protected]/defaultPrimary?streamType=u");    while(true)
{               
    frame = cvQueryFrame(cam);          
    cvShowImage("Test", frame);
    if (cvWaitKey(10) == 27){
            break; }
}

In the console I get errors and poor quality video!

[h264 @ 009da1a0] Cannot parallelize deblocking type 1, decoding such frames in sequential order

[h264 @ 009da1a0] error while decoding MB 96 11, bytestream (-3)

[h264 @ 009da1a0] concealing 6793 DC, 6793 AC, 6793 MV errors

[h264 @ 009da1a0] concealing 4473 DC, 4473 AC, 4473 MV errors

[h264 @ 009da1a0] concealing 7729 DC, 7729 AC, 7729 MV errors

[h264 @ 009da1a0] error while decoding MB 82 66, bytestream (-3)

[h264 @ 009da1a0] concealing 207 DC, 207 AC, 207 MV errors

[h264 @ 009da1a0] cabac decode of qscale diff failed at 37 34

[h264 @ 009da1a0] error while decoding MB 37 34, bytestream (16556)

[h264 @ 009da1a0] concealing 4092 DC, 4092 AC, 4092 MV errors

2015-06-25 02:22:13 -0600 commented question Where can I download OpenCV 3.0 for Visual Studio 2005?

Thank you!

I can't update my compiler.

2015-06-25 01:44:33 -0600 asked a question Where can I download OpenCV 3.0 for Visual Studio 2005?

Hi. I working in Visual Studio 2005. I want to use OpenCV 3.0 but i did not found duild version for Visual Studio 2005. Where can I download OpenCV 3.0 for Visual Studio 2005?

2015-06-25 01:44:32 -0600 asked a question OpenCV 3.0 Visual studio 2005

Hi. I working in Visual Studio 2005. I want to use OpenCV 3.0 but i did not found duild version for Visual Studio 2005. Where can I download OpenCV 3.0 for Visual Studio 2005?

Thank you.