Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to find duration of a video
Qt 6.11 is out! See what's new in the release blog

How to find duration of a video

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.2k Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    hello guys,
    I have build a video player now i want to find duration of video when i upload anyvideo its should calculate duration of it and display it
    can u guys help me how to do this.

    Thanks.

    P.S.- I am using qmediaplyer class and Qvideowidget class

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

      Hey, ~herculis.

      If I am not mistaken, it comes to using "QMediaPlayer::duration":http://qt-project.org/doc/qt-5/qmediaplayer.html#duration-prop property.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        ElboyQt
        wrote on last edited by
        #3

        or u can use "QMediaObject::metaData(const QString & key)":http://qt-project.org/doc/qt-5/qmediaobject.html#metaData method where its argument is "Duration"

        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