Naqib Hakimi
Naqib Hakimi

Reputation: 912

Where QML camera.videoRecorder.record() save video file by default?

Where QML camera.videoRecorder.record() save video file by default ?

import QtQuick 2.2
import QtMultimedia 5.0


Item {
    id:recoder
    width:640
    height:360

    property bool rstat:true

    function recordingSt(st)
    {
        if(st){
            camera.videoRecorder.record() ;
            st = false;
        }else{
                camera.videoRecorder.stop() ;
                st = true;
            }
    }



    MouseArea
    {
        anchors.fill: parent
        onClicked:recordingSt(rstat)
    }

    Camera {
            id: camera
            videoRecorder.audioEncodingMode: CameraRecorder.ConstantBitrateEncoding
            videoRecorder.audioBitRate: 48000
            videoRecorder.mediaContainer: "mp4"
            videoRecorder.frameRate: 25
    }

    VideoOutput {
        source: camera
        anchors.fill: parent
        focus : visible // to receive focus and capture key events when visible
    }


}

I am using Win8 OS have no idea where the video goes and how to set the path for recording . I tried

videoRecorder.outputLocation: "sameDirectory"

still not working why ?

Upvotes: 2

Views: 1579

Answers (1)

skypjack
skypjack

Reputation: 50568

From the documentation, it looks like you can set the location where you want to save by means of the properties imageCapture, which has the method captureToLocation.

It has also a property called capturedImagePath that maybe contains what you are looking for.

Look here and here and here for further details.

Sorry, just seen you were asking for the videoRecording. It has the actualLocation property as well and it works as above, doesn't it?

The documentation states that that property holds the actual location of the last saved media content. Be aware that it's available once the recording starts, so you should look at it after the record method has been invoked.

Upvotes: 2

Related Questions