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. QMediaRecorder (Qt Multimedia) .avi file format problem (FPS)

QMediaRecorder (Qt Multimedia) .avi file format problem (FPS)

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtmultimediaqmediarecorderavi
4 Posts 2 Posters 389 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.
  • O Offline
    O Offline
    Olivier Duguay
    wrote on 14 Mar 2024, 16:14 last edited by
    #1

    Hi Qt forum,

    I was wondering if I am the only one with problem using the .AVI video format file with the QMediaRecorder.

    My problem is that the FrameRate I get on the file save in .AVI format is always 600.00 frames/second even if I explicitly call those functions :

        QMediaFormat mediaFormat;
        mediaFormat.setFileFormat(QMediaFormat::FileFormat::AVI);
        mMediaRecorder->setMediaFormat(mediaFormat);
        mMediaRecorder->setVideoFrameRate(30);
        qDebug() << Q_FUNC_INFO << mMediaRecorder->mediaFormat().fileFormat() << mMediaRecorder->mediaFormat().videoCodec() << mMediaRecorder->videoFrameRate();
    

    Debugger :
    void __cdecl USBCameraHandler::updateTargetName(class QString) QMediaFormat::AVI QMediaFormat::VideoCodec::Unspecified 30

    If I used .MP4 or any other format, I get the right FPS. Does anyone have any clue ?

    Screen capture of the details of the .AVI video saved :
    format_avi.PNG

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 14 Mar 2024, 19:37 last edited by SGaist
      #2

      Hi,

      You should add which version of Qt you are using.

      Did you notice that the video codec is Unspecified ? What if you set one ?

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

      O 1 Reply Last reply 4 Apr 2024, 18:43
      0
      • S SGaist
        14 Mar 2024, 19:37

        Hi,

        You should add which version of Qt you are using.

        Did you notice that the video codec is Unspecified ? What if you set one ?

        O Offline
        O Offline
        Olivier Duguay
        wrote on 4 Apr 2024, 18:43 last edited by
        #3

        @SGaist

        Qt Version : 6.2.2 (MSVC 2019, 64 bits)

        Yeah, I realize the video codec is Unspecified, but once I record it get a default one. But even if I especially specify one, I still have the same problem :(

        (I tried pretty much all of the codec listed)

        S 1 Reply Last reply 4 Apr 2024, 18:47
        0
        • O Olivier Duguay
          4 Apr 2024, 18:43

          @SGaist

          Qt Version : 6.2.2 (MSVC 2019, 64 bits)

          Yeah, I realize the video codec is Unspecified, but once I record it get a default one. But even if I especially specify one, I still have the same problem :(

          (I tried pretty much all of the codec listed)

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 4 Apr 2024, 18:47 last edited by
          #4

          @Olivier-Duguay can you update to a more recent version of Qt ? Since 6.5, the default backend has been switched to ffmpeg which may give better results.

          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

          • Login

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