QMediaRecorder (Qt Multimedia) .avi file format problem (FPS)
-
Hi Qt forum,
I was wondering if I am the only one with problem using the .AVI video format file with the QMediaRecorder.
My problem is that the FrameRate I get on the file save in .AVI format is always 600.00 frames/second even if I explicitly call those functions :
QMediaFormat mediaFormat; mediaFormat.setFileFormat(QMediaFormat::FileFormat::AVI); mMediaRecorder->setMediaFormat(mediaFormat); mMediaRecorder->setVideoFrameRate(30); qDebug() << Q_FUNC_INFO << mMediaRecorder->mediaFormat().fileFormat() << mMediaRecorder->mediaFormat().videoCodec() << mMediaRecorder->videoFrameRate();
Debugger :
void __cdecl USBCameraHandler::updateTargetName(class QString) QMediaFormat::AVI QMediaFormat::VideoCodec::Unspecified 30If I used .MP4 or any other format, I get the right FPS. Does anyone have any clue ?
Screen capture of the details of the .AVI video saved :
-
Hi,
You should add which version of Qt you are using.
Did you notice that the video codec is
Unspecified
? What if you set one ? -
Qt Version : 6.2.2 (MSVC 2019, 64 bits)
Yeah, I realize the video codec is Unspecified, but once I record it get a default one. But even if I especially specify one, I still have the same problem :(
(I tried pretty much all of the codec listed)
-
@Olivier-Duguay can you update to a more recent version of Qt ? Since 6.5, the default backend has been switched to ffmpeg which may give better results.