08-02-2020 10:43 PM
08-02-2020 11:15 PM
Hi @deepg799
If you enable openmax library to support VCU in petalinux, you can describe your source code with gstreamer (openmax) in opencv.
Best regards,
08-02-2020 11:47 PM
08-03-2020 03:43 AM
I am trying with the following code.
string gst_pipeline = " latency=0 io-mode=4 ! rtph264depay ! h264parse ! queue ! video/x-h264, alignment=nal ! omxh264dec internal-entropy-buffers=5 low-latency=1 ! queue ! videoscale method=0 ! video/x-raw, width=640,height=360 ! vi deoconvert ! appsink sync=false async=false"; gst_pipeline = IP + gst_pipeline; cv::VideoCapture cap(gst_pipeline,cv::CAP_GSTREAMER); VideoWriter video; video.open("appsrc ! autovideoconvert ! omxh265enc ! matroskamux ! filesink location=test.mkv sync=false",cv::CAP_GSTREAMER,0,(double)15,Size(1920,1080),true); Mat img; Mat img_re; while(1){ cap.read(img); cv::imshow("Ch-1", img); // working fine resize(img,img_re,Size(1920,1080)); video.write(img_re); // not encoding & wrinting to the file. }
By using the above code I can capture, decode & display the video frame. But when I am trying to encode the Mat img_re image then I am getting the below warning message.:
!! Warning : Adapting profile to support bitdepth and chroma mode
!! The specified Level is too low and will be adjusted !!
08-03-2020 02:49 PM
Hi @deepg799
Did you prepare proper streaming data and/or set proper caps. on gstreamer pipeline ?
Best regards,
08-05-2020 01:44 AM
Currently, my VCU conf. is as shown below set for YUV color format.
But in the programming, I am giving the BGR color format frame to the encoder. I think that is the mistake I am doing.
Can u recommend a suitable configuration of the VCU for the BGR format encoding?
Thank you in advance.
08-07-2020 05:07 AM
It will be very helpful for me if you can share any sample code/application for the openmax library
08-10-2020 03:51 PM
Hi @deepg799
Read PG252 and refer ex. the following.
https://www.xilinx.com/support/documentation/ip_documentation/vcu/v1_2/pg252-vcu.pdf#page=122
Best regards,