28 #include <opencv2/core/core.hpp>
29 #include <opencv2/highgui/highgui.hpp>
32 #include <SimoxUtility/algorithm.h>
48 filename_ext +=
".avi";
51 m_file_path /= filename_ext;
65 m_avi_video_writer = std::make_unique<cv::VideoWriter>();
72 writeMetadataFrame(frame, timestamp);
74 if (not m_avi_video_writer->isOpened())
76 const std::string filePath = getFilePath().string();
77 const int fourcc = cv::VideoWriter::fourcc(
'M',
'J',
'P',
'G');
78 m_avi_video_writer->open(filePath, fourcc, m_fps, frame.size());
80 if (not m_avi_video_writer->isOpened())
87 m_avi_video_writer->write(frame);
95 m_avi_video_writer->release();