I am trying to write a mp4 video file on imx8m mini using opencv library. I am using ov5647 camera module.
Below is the code I am using to write video.
However, after I run this program, there is not test.mp4 file created at all.
I have also tried fourcc's *H264 also, but the result is same.
Please suggest. Thanks in advance.
Hi
You must add return value judgment as you don't know if the camera has been opened.
Can you provide the log when you run this test?
BR
Zhiming
Hi Zhiming,
Thanks for your response.
The return value of cap.isOpened was True, and also cap.read() also returns True.
However, this problem is now solved for me.
I understood that codecs were missing on the board to write mp4 video file.
I have added ffmpeg in local.conf file, and compiled the image.
After deploying, opencv was able to detect ffmpeg and now I am able to write mp4 video files.
Thanks