Video recording Not Supported by Camera in qml Why ? using laptop standard webcam to record video from camera it work fine with direcshow.net but not in qml
ApplicationWindow {
title: qsTr("Hello World")
width: 640
height: 480
menuBar: MenuBar {
Menu {
title: qsTr("File")
MenuItem {
text: qsTr("Record")
onTriggered: camera.videoRecorder.record()
}
MenuItem {
text: qsTr("stop")
onTriggered: camera.videoRecorder.stop()
}
MenuItem {
text: qsTr("test Avail")
onTriggered: console.log(camera.videoRecorder.recorderStatus)
}
}
}
Camera
{
id:camera
captureMode: Camera.CaptureVideo
videoRecorder.audioSampleRate: 48000
videoRecorder.audioBitRate: 96
videoRecorder.audioChannels: 1
videoRecorder.audioCodec: "audio/mpeg, mpegversion=(int)4"
videoRecorder.outputLocation:""
videoRecorder.frameRate: 30
videoRecorder.videoCodec: "video/x-h264"
videoRecorder.mediaContainer: "video/x-matroska"
videoRecorder.onRecorderStateChanged: {
if (camera.videoRecorder.recorderState == CameraRecorder.StartingStatus) {
console.log("saved to: " + camera.videoRecorder.outputLocation)
}
}
}
VideoOutput
{
id:out
source:camera
}
}
when trying to check the recorderStatus it is 0 according to documentation .
Value Description
UnavailableStatus 0 Recording is not supported by the camera.
UnloadedStatus 1 The recorder is available but not loaded. . . .
is there something wrong with the code or qml recording support is limited ?
According to Qt 5.5 documentation video recording is currently not supported for windows: http://doc.qt.io/qt-5/qtmultimedia-windows.html