import QtQuick import QtQuick.Window import QtMultimedia import QtQuick.Controls Window { width: 640 height: 480 visible: true title: qsTr("Hello World") CaptureSession { camera: Camera { id: camera focusMode: Camera.FocusModeAutoNear customFocusPoint: Qt.point(0.2, 0.2) // Focus relative to top-left corner } videoOutput: videoOutput recorder: MediaRecorder { outputLocation: "/not/writable" id: recorder } } VideoOutput { id: videoOutput anchors.fill: parent } Button { id:startRecord width:100 height:50 x:0 y:0 text:"start" visible: recorder.recorderState !== MediaRecorder.RecordingState onClicked: { recorder.record() console.log(recorder.recorderState+ ", " + recorder.error + ", " + recorder.mediaFormat) } } Button { id:stopRecord width:100 height:50 x:0 y:0 text:"stop" visible: recorder.recorderState === MediaRecorder.RecordingState onClicked: { recorder.stop() console.log(recorder.actualLocation) } } }