I would like to implement gstreamer pipeline in order to get output of Visionworks sample main_opencv_npp_interop.cpp and pass it to RTP via using Opencv videowriter function. Yet, I do not know where I am missing through the process.
//initilization of videowriter
cv::VideoWriter writer("appsrc ! videoconvert ! video/x-raw,format=BGR,width=1920,height=480,framerate=30/1 ! jpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=1234", 0, (double)30, cv::Size(3*cv_src1.cols, cv_src1.rows), true);
cv::Mat bigframe_cv = nvx_cv::VXImageToCVMatMapper(demoImg, 0, NULL, VX_READ_AND_WRITE, VX_MEMORY_TYPE_HOST).getMat();
writer << bigframe_cv;
I make the conversion for Opencv and show the frames in Opencv frame via imshow to get the sense of progress and sanity check.
By using gstreamer command line as below I try to get the output:(appsrc sends BGR but I would like to have with format h264 preferably)
gst-launch-1.0 -v udpsrc port=1234 \ caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! \ rtph264depay ! decodebin ! videoconvert ! autovideosink
In addition, I get this warning repeatedly while sample is running:
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (1629) writeFrame OpenCV | GStreamer warning: cvWriteFrame() needs images with depth = IPL_DEPTH_8U and nChannels = 3.