Good day! I make a program for creating video with Qt and OpenCV. If I have the correct information using OpenCV, I cannot add text to the video. How, by making a video from a sequence of pictures, can you add text or audio to it?
1 answer
As far as I understand OpenCV you use for pattern recognition. For the very creation of a video file, I recommend using ffmpeg. Here is an article on how to record a video file with a video and audio track "Recording a video file using ffmpeg" .
As for the text, you need to create a picture with the text you need. Freetype is usually used for this (the article is a bit different about that, but it has an example of how to render text using Freetype ). But if you are developing for Windows, then you can use WinGDI ( An example can be found in this article ).
- Do not tell me where to read about the output video with ffmpeg and Qt? - Julia
- With ffmpeg, you need to decode the file, i.e. get a separate frame ( unick-soft.ru/article.php?id=10 ). And with Qt, just output the frames. This is no different from outputting individual images (QImage :: loadFromData) and displaying a QImage on a form. - Unick
- Great, thanks - Julia
- How not to connect ffmpeg to QtCreator? - Julia
- Apparently there are a lot of articles about it: google.com/ ... you can choose the most suitable - Unick
|