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

QMediaRecorder on windows 7

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 3.6k 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.
  • bclayB Offline
    bclayB Offline
    bclay
    wrote on last edited by
    #1

    I have been trying to get QMediaRecorder (from Qt 5.5.1) to work on Windows 7 with Visual Studio 2013 and a Microsoft Cinema webcam. I have seen comments on the web that it does not work. Is that the definitive answer?

    I tried QStringList audioList = mMediaRecorder->supportedAudioCodecs() and
    QStringList videoList = mMediaRecorder->supportedVideoCodecs()

    Both return an empty list.

    I also tried bool supported = mCurrentCamera->isCaptureSupported() and it returned false;

    The video shows in the viewer without any problem but all recorder functions seem to fail.

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

      Hi and welcome to devnet,

      The current limitation of the Windows backends are explained here

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

        Thank you for the reply and the info. I am trying QtAV transcoder but not having any success with that either. It plays video fine but won't create files but that is another issue. Since it is ffmpeg based it should be able to record. I have not found their forum yet.

        Bruce

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

          I haven't used QtAV but I can confirm that you can write video files on windows with the FFMPEG API.

          What error are you getting ?

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

          bclayB 1 Reply Last reply
          0
          • SGaistS SGaist

            I haven't used QtAV but I can confirm that you can write video files on windows with the FFMPEG API.

            What error are you getting ?

            bclayB Offline
            bclayB Offline
            bclay
            wrote on last edited by
            #5

            thank you for your time and input.

            I did a little more testing and switched the Visual Studio system to console to get all of the QT warnings. I was running the QtAV simpletranscode example using Visual Studio 3013. The information below may be more than you need to see what is happening but it looks like it sets the frame work of what is happening. The bottom few rows are repeated over and over until the end of the source file is reached. The normal ffmpeg files (avcodec, avdevice, avfilter etc dlls) are in the applications folder.

            "Build with Qt-5.5.1"
            "FFmpeg/Libav configuration: --disable-static --enable-shared --enable-runtime-c
            pudetect --enable-memalign-hack --disable-avdevice --enable-avfilter --enable-av
            resample --disable-postproc --disable-muxers --disable-encoders --enable-pthread
            s --disable-iconv --disable-bzlib --enable-hwaccels --enable-dxva2 --extra-cflag
            s='-O3 -ftree-vectorize -ffast-math '"
            "Build with avutil-52.48.101"
            "Build with avcodec-55.39.101"
            "Build with avformat-55.19.104"
            "Build with swscale-2.5.101"
            Registered audio backends: ("null", "XAudio2")
            AudioOutputBackend::id("XAudio2")
            "XAudio2_9"
            "Cannot load library XAudio2_9: The specified module could not be found."
            "XAudio2_8"
            "Cannot load library XAudio2_8: The specified module could not be found."
            "XAudio2_7"
            "Build with XAudio2 from Win8 or later SDK"
            "Try inline function 'XAudio2Create' from DXSDK"
            "xaudio2: 0x2f80690"
            "source_voice: 0x0, master: 0x0"
            AudioOutputBackend::id("null")
            VideoEncoder::id("FFmpeg")
            AudioEncoder::id("FFmpeg")
            "framerate: -1.000/0.000"
            Loading QVariant(QString, "J:\SupportLibraries\QtAV-master\lib_win_\Test.av
            i") ...
            "all closed and reseted"
            "avformat_open_input: d->format_ctx:'0x774040', url:'J:\SupportLibraries\QtAV-
            master\lib_win_\Test.avi'..."
            "[FFmpeg:avi] non-interleaved AVI"
            "avformat_open_input: url:'J:\SupportLibraries\QtAV-master\lib_win_\Test.avi
            ' ret:0"
            "avfmtctx.flag: 513"
            "AVFMT_NOTIMESTAMPS: 0, AVFMT_TS_DISCONT: 512, AVFMT_NO_BYTE_SEEK:0"
            "invalid index 0 (valid is 0~0) for stream type 2."
            "notify_interval: 500"
            "stream: 1, duration=-9223372036854775808 (-570753220102399488 ms), time_base=0.
            000062"
            "codec: pcm_s16le(PCM signed 16-bit little-endian)"
            "stream: 0, duration=43138 (1437918 ms), time_base=0.033333"
            "codec: mjpeg(Motion JPEG)"
            "1000000/33333"
            "has audio"
            AudioDecoder::id("FFmpeg")
            Singleton 0053A2A8 created...
            Unknown id Unknown id "QtAV::AudioDecoderFFmpeg thread type: Single, count: 1"
            audio format from codec: QtAV::AudioFormat(16160Hz, 2Bytes, channelCount:1, cha
            nnelLayout: "mono", sampleFormat: "s16")
            AudioOutput format: QtAV::AudioFormat(16160Hz, 2Bytes, channelCount:1, channelL
            ayout: "mono", sampleFormat: "s16")
            "new audio thread"
            "demux thread setAudioThread"
            "output not changed: 0x530090"
            "set AVThread output"
            "stream: 1, duration=-9223372036854775808 (-570753220102399488 ms), time_base=0.
            000062"
            "codec: pcm_s16le(PCM signed 16-bit little-endian)"
            "**********trying video decoder: FFmpeg..."
            "QtAV::VideoDecoderFFmpeg thread type: Single, count: 1"
            "**************Video decoder found:0x53bbb0"
            "setCapture 0x5363b0"
            "stream: 0, duration=43138 (1437918 ms), time_base=0.033333"
            "codec: mjpeg(Motion JPEG)"
            "1000000/33333"
            "Clock initial value: 0.000000"
            "Starting audio thread..."
            "Starting video thread..."

            "onSourceStarted framerate: 0.000/30.000"
            "get av queue a/v thread = 0x531e88 0x53c510"
            "AVClock started!!!!!!!!"
            Can not find encoder for codec "aac"
            "Failed to open audio encoder"
            Unknown id Unknown id "no audio resampler is available"
            Can not find encoder for codec "aac"
            "Failed to open audio encoder"
            Unknown id Unknown id "no audio resampler is available"
            Can not find encoder for codec "aac"
            "Failed to open audio encoder"
            Unknown id Unknown id "no audio resampler is available"
            Can not find encoder for codec "aac"
            "Failed to open audio encoder"
            Unknown id Unknown id Can not find encoder for codec "libx264"
            "no audio resampler is available"
            "Failed to open video encoder"

            Can not find encoder for codec "aac"
            "status: 0, Timeout expired: 43351/30000 -> quit!"
            "no frame could be decompressed: Error number 4 occurred 0/4"
            "Failed to open audio encoder"
            Unknown id "[AVDemuxer] error: Immediate exit requested"
            Unknown id "invalid video frame from decoder. undecoded data size: 0"

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

              Did you build ffmpeg yourself ?

              Looks like there are no encoder nor muxers built for that version..

              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