无论我传入哪些QVideoSettings选项,生成的视频文件都会附加.ogg
,编解码器仍为theora
。我在ubuntu 17.04上运行Qt5.9.1。
我做错了吗?
QVideoEncoderSettings videoSettings;
videoSettings.setCodec("video/mpeg2"); // Can be anything
videoSettings.setResolution(640,480);
videoSettings.setFrameRate(30.0);
videoSettings.setQuality(QMultimedia::VeryHighQuality);
videoSettings.setBitRate(500000);
videoSettings.setEncodingMode(QMultimedia::ConstantQualityEncoding);
m_VideoRecorder->setContainerFormat("video/x-matroska"); // Tried almost all other options
m_VideoRecorder->setVideoSettings(videoSettings);
这也发生在所包含的camera
示例...