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. QVideoWidget subtitles
Qt 6.11 is out! See what's new in the release blog

QVideoWidget subtitles

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 2.8k 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

    I'm wondering, does QVideoWidget supports subtitles? If not, how can I do that?

    Thanks in advance.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What do you mean by support ? If it's able to show them ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Thanks SGaist.
        Yes, if it's able to display. I tried to install some codecs (even with my drivers all updated), I thought that Qt were using it to render the video as backend and might use some filter to load the subtitle but doesn't work.
        How can I load subtitles and display them along with the video?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rafaelgm
          wrote on last edited by
          #4

          I'm interested on that solution too. I'm trying to paint over QVideoWidget but nothing happened. What I tried was to override paintEvent, but when playback starts, paintEvent is not called at all, althought the frames are displayed normally.

          Does anyone know a way to paint over the video on QVideoWidget?

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            I remember that the old versions of Qt with phonon were possible to add subtitles and now, with QMediaWidget I don't find a solution.

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rafaelgm
              wrote on last edited by
              #6

              Well, I came up with a solution to draw on top of the video. You could adapt the solution and, on paintEvent, use painter.drawText(...) to draw the subtitles.

              Here is the solution: http://qt-project.org/forums/viewreply/200242/

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #7

                Thanks rafaelgm - I made a bug ticket: https://bugreports.qt-project.org/browse/QTBUG-42133

                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