My input is
My Input is
grayframe = Mat(H,W, CV_8UC1,p_buff);
I want to create cv:writer to encode it with h265
It didn’t work for me
sprintf(buff,"appsrc ! video/x-raw, format=(string)GRAY8,width=(int)704, height=(int)540 "
"! nvvidconv ! video/x-raw(memory:NVMM), width=(int)704, height=(int)540,format=(string)I420 "
“! nvvidconv ! video/x-raw(memory:NVMM) ! omxh265enc control-rate=2 bitrate=2000000 ! h265parse”
“! mpegtsmux ! udpsink host=%s port=%d”
,sdest_ip.c_str(),pmux->port);
writer.open(buff
, 0, (double)18, cv::Size(704, 540), true);
if (!writer.isOpened()) {
printf("=ERR= can't create video writer\n");
return 0;
}