Tegra multimedia API with OpenCV consumer


I’m trying to get the tegra multimedia API working with OpenCV. I already found a thread from a while ago: https://devtalk.nvidia.com/default/topic/1014481/encoder-and-opencv-consumer

Until now I didn’t get it working, so I will work on that, but I was asking myself: that thread started in 2017. Maybe there is today a much more simple solution available? Can you help me with that?

Besides that: is there some sort of tutorial for the tegra multimedia API?

Thank you in advance.

Hello hardeman_erik,

   Take a look at the article in the below thread to get you started on Tegra multimedia API and openCV consumer as well.


Thank you for your reply!

At the end of your guide there is a block of code about OpenCV wich contains this line:
cv::Mat imgbuf = cv::Mat(iSensorMode->getResolution().height(),

Looks like this line is unfinished, but I don’t know how to complete the line.

Hi Hardeman,
Thanks for pointing this one out. You may need to add iSensorMode->getResolution().width(), CV_8UC4 and pdata at the end. The code for which will be

cv::Mat imgbuf = cv::Mat(iSensorMode->getResolution().height(), iSensorMode->getResolution().width(),CV_8UC4, pdata);

We will correct it at our end.

Hope this article was helpful for you to understand the framework better. We are open to your valuable feedback.

Thank you very much. I got your OpenCV example working.