Use Gst-RTSP-Server with OpenCV c++ Windows

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Use Gst-RTSP-Server with OpenCV c++ Windows

anuragkush
I am able to successfully use GStreamer to transmit `videotestsrc` to RTSP
and received it using VLC on windows using  gst-rtsp-server test-video.c
<https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-video.c>  

Now I have built OpenCV with GStreamer and successfully transmitted UDP
stream and received it via GStreamer command. I am reading a video and
sending it to localhost.

Code to stream UDP is:

    #include <opencv2\opencv.hpp>
    #include <opencv2\core\core.hpp>
    #include <opencv2\highgui\highgui.hpp>
   
    using namespace cv;
   
    VideoCapture cap;
    int _tmain(int argc, _TCHAR* argv[])
    {
   
    Mat image1,frame;
    /*Read Image*/
   
   
    /*Read Video*/
    cap.open("Wildlife.mp4");
    VideoWriter out = VideoWriter("appsrc ! queue ! videoconvert !
video/x-raw, format=I420, width=640, height=360, framerate=30/1 ! rtpvrawpay
! udpsink host=127.0.0.1 port=5004",CAP_GSTREAMER,0,30,Size(640,360));
    while(1)
    {
    cap>>frame;
    if(frame.empty())
    break;
    out.write(frame);
    imshow("frame",frame);
    cvWaitKey(30);
   
    }
    return 0;
    }

Now I want to send a stream of my cv::Mat frames via RTSP so that it can be
played via VLC or any other video player. I am also following  this
<https://stackoverflow.com/questions/55410507/how-can-i-write-open-cv-frames-to-an-rtsp-stream-with-gstreamer-and-c>  
question but it is so confusing





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Use Gst-RTSP-Server with OpenCV c++ Windows

Stephenwei
May be you could show the error message or more detail information



-----
GStreamer is a convenient multimedia platform, I like it.
Develop the NVR system on ARM/x86(c/python)
Use python to generate NVR is crazy, of course works fine.

--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Use Gst-RTSP-Server with OpenCV c++ Windows

anuragkush
There is no error in the above two procedures.
But I am trying to send OpenCV mat frames using gst-rtsp-server and there
isn't any documentation about it.
I just want to know how to introduce OpenCV frame in gst-rtsp-server.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel