默认情况下,QML camera.videoRecorder.record()保存视频文件的位置?
默认情况下,QML camera.videoRecorder.record()保存视频文件的位置默认情况下,QML camera.videoRecorder.record()保存视频文件的位置?,qml,Qml,默认情况下,QML camera.videoRecorder.record()保存视频文件的位置 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.vide
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
}
}
我使用的是Win8操作系统,不知道视频去哪里,也不知道如何设置录制路径。我试过了
videoRecorder.outputLocation: "sameDirectory"
为什么仍然不起作用?从文档中可以看出,您可以通过属性
imageCapture
来设置要保存的位置,该属性具有方法capturetLocation
它还有一个名为capturedImagePath
的属性,可能包含您要查找的内容
查看和以了解更多详细信息
抱歉,刚才看到你要求录像。
它也有actualallocation
属性,它的工作原理与上面的一样,不是吗
声明该属性保存上次保存的媒体内容的实际位置。请注意,它在录制开始后可用,因此您应该在调用
record
方法后查看它。它仍然不适用于我,无法录制视频。除了在“recordingSt”函数中将st设置为false或true,它应该是rstat。否则,您将修改局部变量。