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
Forum Updated to NodeBB v4.3 + New Features

QMediaRecorder

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 2.1k 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.
  • C Offline
    C Offline
    Chrisw01
    wrote on last edited by
    #1

    Hi everyone,

    I'm writing a QT 5.7.0 app which uses the QCamera class. I have successfully produced the live video stream on the surface and finally figured out the recording issues of QMediaRecorder my problem is it saves the video in vorbis/ogg format and appends .ogg to file filename.

    QCamera *camera = new QCamera(this);
    QCameraViewFinder *viewfinder = new QCameraViewFinder(this);
    QMediaRecorder *recorder = new QMediaRecorder(camera, this);
    QVideoEncoderSettings settings = recorder->videoSettings();
    settings.setCodec("video/mpeg2");
    recorder->setVideoSettings(settings);
    
    

    When you check the recorder->videoSettings().codec() it returns "video/mpeg2" or "video/avi". I have even done the same with QAudioEncoderSettings using "audio/mp3" the outcome is the same. the recorded file is of type "Video (video/x-theora+ogg) and my file ends up with the extension of .ogg even if I assign an extension of say .avi.

    Operating system is Linux Mint Rosa, using Qt 5.2.0

    Thanks for any help you may offer.

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

      Hi,

      Did you check what the supportedAudioCodecs and supportedVideoCodecs methods return ?

      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
      • C Offline
        C Offline
        Chrisw01
        wrote on last edited by
        #3

        Yes I did and actually they return a blank list, that can't be good. I'll research that next.

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

          In any case, you should consider updating Qt. 5.2 is pretty old by now. 5.6 is the LTS, 5.7 current and 5.8 is around the corner.

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

          C 1 Reply Last reply
          0
          • SGaistS SGaist

            In any case, you should consider updating Qt. 5.2 is pretty old by now. 5.6 is the LTS, 5.7 current and 5.8 is around the corner.

            C Offline
            C Offline
            Chrisw01
            wrote on last edited by Chrisw01
            #5

            @SGaist said in QMediaRecorder:

            In any case, you should consider updating Qt. 5.2 is pretty old by now. 5.6 is the LTS, 5.7 current and 5.8 is around the corner.

            Man, I'm so sorry, I am using Qt 5.7.0 off of the Qt website. I hope there is some improvements on the multimedia classes as now I'm fighting a different challenge. I can turn the web cam on and off until I call the QMediaRecorder start and stop function, after that I lose all control of the web cam, it just stays in Active state and Status no mater how many times you call QCamera stop function

            Thanks for your help and I'll keep looking into the Codec poblem after I get this fixed.

            .

            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