无论我传入什么 QVideoSettings 选项,生成的视频文件都会附加 a.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
示例中......