QML CameraRecorder Crashing QT5.10
Unsolved
QML and Qt Quick
-
Hi Guys,
I wondered if you can help. I am using the Camera Recorder on my Rpi Project (Stretch Image). The camera works fine. however when I try and record I the application crashes. I get this error info:
AL lib: (EE) ALCcaptureAlsa_open: Could not open capture device 'default': No such file or directory
CameraBin warning: "not negotiated"
CameraBin error: "Could not open device."
CameraBin error: "Internal data stream error."This is my implementation in QML:
Camera { id: csi2Device; objectName: "csi2Device"; deviceId: QtMultimedia.availableCameras[0] ? QtMultimedia.availableCameras[0].deviceId : 0; captureMode: Camera.CaptureVideo; videoRecorder { resolution: "640x480"; frameRate: 30; videoCodec: "h264"; mediaContainer: "mp4" outputLocation: "test.mp4"; onRecorderStateChanged: { if (csi2Device.videoRecorder.recorderState == CameraRecorder.StartingStatus) { DataModel.IsRecording = true; console.log("saved to: " + csi2Device.videoRecorder.outputLocation) } else { DataModel.IsRecording = false; } } } } VideoOutput { id: viewfinder; x: 0; y: 0; width: parent.width; height: parent.height; source: csi2Device; fillMode: VideoOutput.Stretch autoOrientation: true; … }
Any help most appreciated.