Planned maintenance: From Sunday 8th December 10:00 CET there will be changes to try and solve the caching issues that have been experienced. If anyone has a problem connecting after this period then please PM @AndyS or any of the moderators.

QML CameraRecorder Crashing QT5.10



  • 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.