Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Can't operate over reproducing local Video .mp4 saved locally.
Forum Updated to NodeBB v4.3 + New Features

Can't operate over reproducing local Video .mp4 saved locally.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 192 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    ThalesEduardo_389
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      ThalesEduardo_389
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved