Can I add subttiles to MP4 with OpenCV?

Hi, I have captured a video that is saved as MP4 by default. I want to caption it. I just wonder if I can add subtitles to MP4 video in OpenCV?

OpenCV is not a media library.

I would recommend ffmpeg’s libraries. there are python bindings for ffmpeg called “PyAV”.

There is no sound support see issue Support audio in OpenCV · Issue #16394 · opencv/opencv · GitHub
You can add text to image using putText. You have to read video using videocapture add text and save new video without sound.
As wrote crackwitz Yes opencv is not a media library.