This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: Gstreamer and OpenCV video capture issue

Part Number: AM5728

Tool/software: Linux

Dear e2e community,

I am using the latest processor SDK and AM5728 board

I have created a gstreamer pipeline, used shared memory as sink, created rtp packets and used AM5728's IP address as below

Open first terminal:

-->gst-launch-1.0   v4l2src device=/dev/video1 !   video/x-raw,width=640,height=480,framerate=10/1,format=YUY2 !   shmsink     socket-path=/tmp/foo2     sync=true     wait-for-connection=false     shm-size=10000000

Open second terminal:

-->gst-launch-1.0 shmsrc socket-path=/tmp/foo2 ! video/x-raw,width=640,height=480,framerate=25/1,format=YUY2 ! jpegenc! rtpjpegpay !  udpsink host=192.168.2.207 port=5200

Below is my opencv program:

#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
#include <iostream>
#include <fstream>
#include <string>
int main()
{
    VideoCapture camera0("rtp://192.168.2.207:5200/?action=stream");
    while(camera0.isOpened()) {
        Mat frame0;
        camera0 >> frame0;
        imshow("Video0", frame0);
        int c = waitKey(1);
        if(27 == char(c)) break;
    }
    return 0;
}

I get the following error:

OpenCV Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /home/gtbldadm/processor-sdk-linux-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/opencv/3.1+gitAUTOINC+b4f54ac48c-r0.tisdk7/git/modules/videoio/src/cap_gstreamer.cpp, line 1692
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/gtbldadm/processor-sdk-linux-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/opencv/3.1+gitAUTOINC+b4f54ac48c-r0.tisdk7/git/modules/videoio/src/cap_gstreamer.cpp:1692: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
 in function handlemessage

Aborted (core dumped)


can you please help to fix the above issue?

Thanks,

Siddartha