Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Multimedia
  4. Qt Multimedia Issues
Forum Updated to NodeBB v4.3 + New Features

Qt Multimedia Issues

Scheduled Pinned Locked Moved Unsolved Qt Multimedia
5 Posts 3 Posters 842 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.
  • D Offline
    D Offline
    DigitalArtifex
    wrote on last edited by
    #1

    Hello,

    I am nearing completion of a Qt project and am running into several issues related to playing a video stream (webcam). I have tried a few versions of Qt to solve the issue and have different results and could use some guidance. This is using Qt C++

    I have not been able to test the example media player because it's a qtquick application but also confirmed these results in isolated projects using code snippets from Qt Docs

    Qt version 6.6.3 GCC 64 QVideoWidget & QMediaPlayer
    Host: Linux 64bit (wayland)

    Most of the gui is frozen when I switch pages to the one with QVideoWidget. Animations stop running and signals/slots from the parent widget of QVideoWidget stop functioning. Other gui elements (like my menu buttons) still respond.

    Qt version 6.6.3 GCC 64 QGraphicsVideoItem & QMediaPlayer
    Host: Linux 64bit (wayland)

    Setting up the video in a QGraphicsView/Scene seems to mostly function. It plays the webcam stream without issue...until I resize it. I seem to have to leave it in it's native resolution - otherwise it's filled with green bars whose size depends on how much I've scaled the video. In the screenshots I changed the aspect ratio to show this.

    16:9 4:3

    Qt version 6.7.1 GCC 64 QGraphicsVideoItem & QMediaPlayer
    Host: Linux ARM64 (wayland)

    Just got a new raspberry pi 5 and wanted to see if the banding issue was present on there too. The installer is only letting me choose Qt6.7+. Got everything setup (at least whats needed for my desktop environment) and this results in a black screen with qt complaining about no Multimedia Backends being available. I have ffmpeg and libva packages installed.

    Some googling suggests this is an issue introduced recently with 6.7.0 but cannot confirm that and the preview of 6.8.0 is the same.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vincent9874
      wrote on last edited by
      #2

      For the issues with video streaming in your Qt project:

      QVideoWidget Freezing: Move video processing to a separate thread to prevent GUI freezing.
      QGraphicsVideoItem Green Bars: Check resizing logic and maintain aspect ratio during resize.
      No Multimedia Backends on Raspberry Pi: Ensure all required multimedia backend packages are installed and configured for Qt.
      Consider visiting Qt forums for more detailed support if needed.

      D 1 Reply Last reply
      0
      • V vincent9874

        For the issues with video streaming in your Qt project:

        QVideoWidget Freezing: Move video processing to a separate thread to prevent GUI freezing.
        QGraphicsVideoItem Green Bars: Check resizing logic and maintain aspect ratio during resize.
        No Multimedia Backends on Raspberry Pi: Ensure all required multimedia backend packages are installed and configured for Qt.
        Consider visiting Qt forums for more detailed support if needed.

        D Offline
        D Offline
        DigitalArtifex
        wrote on last edited by
        #3

        @vincent9874 said in Qt Multimedia Issues:

        For the issues with video streaming in your Qt project:

        QVideoWidget Freezing: Move video processing to a separate thread to prevent GUI freezing.
        QGraphicsVideoItem Green Bars: Check resizing logic and maintain aspect ratio during resize.
        No Multimedia Backends on Raspberry Pi: Ensure all required multimedia backend packages are installed and configured for Qt.
        Consider visiting Qt forums for more detailed support if needed.

        Thank you for your responding :)

        QVideoWidget Freezing: there is no media playing at the time of it freezing - the media is loaded after the page load. Just having it on the actively visible widget causes it to lockup.

        QGraphicsVideoItem Green Bars: I am maintaining the aspect ratio of the source. For the examples I changed my camera config from 16:9 to 4:3 to show how the bars propagate differently based on size. If I do it on my isolated project the bars change in size and frequency as I resize the window.

        Raspberry pi: ffmpeg, libav and gstreamer are all installed and Qt 6.5+ should be configured for ffmpeg by default.

        What forums do you suggest? A sub here or like qt centre?

        JoeCFDJ 1 Reply Last reply
        0
        • D DigitalArtifex

          @vincent9874 said in Qt Multimedia Issues:

          For the issues with video streaming in your Qt project:

          QVideoWidget Freezing: Move video processing to a separate thread to prevent GUI freezing.
          QGraphicsVideoItem Green Bars: Check resizing logic and maintain aspect ratio during resize.
          No Multimedia Backends on Raspberry Pi: Ensure all required multimedia backend packages are installed and configured for Qt.
          Consider visiting Qt forums for more detailed support if needed.

          Thank you for your responding :)

          QVideoWidget Freezing: there is no media playing at the time of it freezing - the media is loaded after the page load. Just having it on the actively visible widget causes it to lockup.

          QGraphicsVideoItem Green Bars: I am maintaining the aspect ratio of the source. For the examples I changed my camera config from 16:9 to 4:3 to show how the bars propagate differently based on size. If I do it on my isolated project the bars change in size and frequency as I resize the window.

          Raspberry pi: ffmpeg, libav and gstreamer are all installed and Qt 6.5+ should be configured for ffmpeg by default.

          What forums do you suggest? A sub here or like qt centre?

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by
          #4

          @DigitalArtifex I guess this is more a Qt issue than a FFmpeg or gstreamer problem. If you run a FFmpeg pipeline from command line and a default windows pops up, you may not have any freezing problem with the widget. It could be an issue if Qt widget is resized too quickly, for example.

          D 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @DigitalArtifex I guess this is more a Qt issue than a FFmpeg or gstreamer problem. If you run a FFmpeg pipeline from command line and a default windows pops up, you may not have any freezing problem with the widget. It could be an issue if Qt widget is resized too quickly, for example.

            D Offline
            D Offline
            DigitalArtifex
            wrote on last edited by
            #5

            @JoeCFD

            Thank you, it does seem to be a Qt issue with Gnome. I had issues with QVideoWidget, QWidget::createWindowContainer and QColorDialog::getColor corrupting the rendering of my application.

            Out of desperation I switched everything to KDE and it works as expected.

            The raspberrypi was my fault and fixed it by explicitly specifying the backend

            1 Reply Last reply
            0
            • Nhan NguyenN Nhan Nguyen moved this topic from General and Desktop on

            • Login

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