Can't operate over reproducing local Video .mp4 saved locally.
-
Hello everyone!
I have a code wich reproduces (from local file saved on PC disk) a video in ".mp4" format. The reproducing and play/pause is working fine!
However, I'm not able to set the position (even using seek() function) of video and when I use the stop() event it don't set position back to begin.
To debug, I have printed the seekable property and its value is always false.
Here is a piece of my code:
MediaPlayer { id: videoPlayer muted: true onStatusChanged: { if(status === Enum.PlayerStatus.LOADING || status === Enum.PlayerStatus.BUFFERING ) playerLoading.isLoading = true } onError: { container.setErrorState(qsTr("Error trying to play")); playerLoading.isLoading = false; } onPositionChanged: { playerLoading.isLoading = false; } onPlaying: { CameraAccessState.isPlaying = true; } onStopped: { CameraAccessState.isPlaying = false; } } VideoOutput { id: playerVideoOutput container.state = "VIDEO"; // NOT IMPORTANT FOR THIS CASE anchors.fill: parent source: videoPlayer }
The source of my video is set from one signal and it looks like:
function onVideoGeneratedSignal(videoSrc) { if(viewType === internalViewType) { videoPlayer.source = video; videoPlayer.play(); playerLoading.isLoading = true } }
An example of my video source (sent to MediaPlayer) is:
PS.: I also tried to use "Video" QML component but the behavior is the same.
I couldn't find any way of control my video reproduction.
Could you help me?Thank you!
-
Hello All, I fixed the main problem of this topic. My video was playing as Stream due to one configuration in NVR SDK communication, so it was being downloaded as Stream Type an no Quicktime.
However, I'm facing a new problem:
I have one component once it is clicked my video jump forward/backward for 5000ms.
When I use this a lot of times, my video freeze and I can't reproduce again, only if I stop and play again.
The same problem happened when I change the playbackRate variable from 1 to 2, to 4, to 8....