Skip to content
  • 0 Votes
    2 Posts
    51 Views
    K
    Kernel error during changing play video: Oct 20 07:33:58 PXDEVICE kernel: ------------[ cut here ]------------ Oct 20 07:33:58 PXDEVICE kernel: 3038 pages are still in use! Oct 20 07:33:58 PXDEVICE kernel: WARNING: CPU: 2 PID: 559 at mm/page_alloc.c:9275 free_contig_range+0xa4/0xc0 Oct 20 07:33:58 PXDEVICE kernel: Modules linked in: snd_soc_imx_spdif snd_soc_imx_hdmi snd_soc_wm8904 fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine rng_core authenc libdes imx8mq_interconnect imx_interconnect crct10dif_ce imx8m_ddrc governor_userspace imx_bus rtc_ds1307 snd_soc_fsl_spdif secvio caam error snd_soc_fsl_sai imx_sdma nfsd galcore(O) fuse Oct 20 07:33:58 PXDEVICE kernel: CPU: 2 PID: 559 Comm: QSGRenderThread Tainted: G W O 5.15.60-imx8mq+geeb831e225df #1 Oct 20 07:33:58 PXDEVICE kernel: Hardware name: Variscite DART-MX8M on DT8MCustomBoard 2.x and above SD+HDMI (DT) Oct 20 07:33:58 PXDEVICE kernel: pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) Oct 20 07:33:58 PXDEVICE kernel: pc : free_contig_range+0xa4/0xc0 Oct 20 07:33:58 PXDEVICE kernel: lr : free_contig_range+0xa4/0xc0 Oct 20 07:33:58 PXDEVICE kernel: sp : ffff80001bae3ae0 Oct 20 07:33:58 PXDEVICE kernel: x29: ffff80001bae3ae0 x28: ffff0000c1bac740 x27: 0000000000000000 Oct 20 07:33:58 PXDEVICE kernel: x26: 0000000000000000 x25: ffff0000c2e8cc00 x24: 0000000000000000 Oct 20 07:33:58 PXDEVICE kernel: x23: ffff80000980e248 x22: fffffc0000000000 x21: 00000000000d72d8 Oct 20 07:33:58 PXDEVICE kernel: x20: 0000000000000bde x19: 00000000000d72d8 x18: ffffffffffffffff Oct 20 07:33:58 PXDEVICE kernel: x17: 0000000000000000 x16: 0000000000000000 x15: ffff800009efe96e Oct 20 07:33:58 PXDEVICE kernel: x14: ffffffffffffffff x13: ffff800009d82810 x12: 000000000000067b Oct 20 07:33:58 PXDEVICE kernel: x11: 0000000000000229 x10: ffff800009d82810 x9 : ffff800009d82810 Oct 20 07:33:58 PXDEVICE kernel: x8 : 00000000ffffefff x7 : ffff800009dda810 x6 : ffff800009dda810 Oct 20 07:33:58 PXDEVICE kernel: x5 : ffff0000ff7839d0 x4 : 0000000000000000 x3 : 0000000000000027 Oct 20 07:33:58 PXDEVICE kernel: x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0000c1bac740 Oct 20 07:33:58 PXDEVICE kernel: Call trace: Oct 20 07:33:58 PXDEVICE kernel: free_contig_range+0xa4/0xc0 Oct 20 07:33:58 PXDEVICE kernel: cma_release+0x78/0xbc Oct 20 07:33:58 PXDEVICE kernel: dma_free_contiguous+0xa8/0xbc Oct 20 07:33:58 PXDEVICE kernel: dma_direct_free+0xbc/0x110 Oct 20 07:33:58 PXDEVICE kernel: dma_free_attrs+0x9c/0xe0 Oct 20 07:33:58 PXDEVICE kernel: vb2_dc_put+0x88/0xc0 Oct 20 07:33:58 PXDEVICE kernel: vb2_dc_dmabuf_ops_release+0x14/0x50 Oct 20 07:33:58 PXDEVICE kernel: dma_buf_release+0x40/0xa0 Oct 20 07:33:58 PXDEVICE kernel: __dentry_kill+0x13c/0x1d0 Oct 20 07:33:58 PXDEVICE kernel: dput+0x1c4/0x300 Oct 20 07:33:58 PXDEVICE kernel: __fput+0xb0/0x234 Oct 20 07:33:58 PXDEVICE kernel: ____fput+0x10/0x20 Oct 20 07:33:58 PXDEVICE kernel: task_work_run+0x80/0x180 Oct 20 07:33:58 PXDEVICE kernel: do_notify_resume+0x208/0x12ec Oct 20 07:33:58 PXDEVICE kernel: el0_svc+0x6c/0x80 Oct 20 07:33:58 PXDEVICE kernel: el0t_64_sync_handler+0xa4/0x130 Oct 20 07:33:58 PXDEVICE kernel: el0t_64_sync+0x1a0/0x1a4 Oct 20 07:33:58 PXDEVICE kernel: ---[ end trace 65d78baf2fb2bd43 ]--- Oct 20 07:33:58 PXDEVICE kernel: ------------[ cut here ]------------ Oct 20 07:33:58 PXDEVICE kernel: 3038 pages are still in use! Oct 20 07:33:58 PXDEVICE kernel: WARNING: CPU: 2 PID: 559 at mm/page_alloc.c:9275 free_contig_range+0xa4/0xc0 Oct 20 07:33:58 PXDEVICE kernel: Modules linked in: snd_soc_imx_spdif snd_soc_imx_hdmi snd_soc_wm8904 fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine rng_core authenc libdes imx8mq_interconnect imx_interconnect crct10dif_ce imx8m_ddrc governor_userspace imx_bus rtc_ds1307 snd_soc_fsl_spdif secvio caam error snd_soc_fsl_sai imx_sdma nfsd galcore(O) fuse Oct 20 07:33:58 PXDEVICE kernel: CPU: 2 PID: 559 Comm: QSGRenderThread Tainted: G W O 5.15.60-imx8mq+geeb831e225df #1 ... Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.09.00_ARMV8 build on Sep 20 2017 15:02:50. Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: ====== AIUR: 4.7.0 build on May 20 2022 06:51:21. ====== Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Core: MPEG4PARSER_06.20.06 build on May 7 2022 07:52:31 Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm_elinux.so.3.2 Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: ------------------------ Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Track 00 [video_0] Enabled Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Duration: 0:02:07.127000000 Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Language: und Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Mime: Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: video/x-h265, parsed=(boolean)true, alignment=(string)au, stream-format=(string)hev1, width=(int)3840, height=(int)2160, framerate=(fraction)60000/1001, codec_data=(buffer)01222000000090000000000099f000fcfdfafa00000703a00001002040010c01ffff222000000300900000030000030099350300001f4800075300e8a10001029e420101222000000300900000030000030099a001e020021c4d8d35924f841470f1c0903b0e18361a0842f081210088401006e1a306c341085ca0a021044170b02a0ac28035407080e007d02b4180a8200b858150561401aa038407003e8158a10d35e9e860d7430341b1b8c0d0703a1b1b181a0e432130c8602418101f1f1c1e307426120e0c04304038108200940ff0869af21720482659024120984f09048381d0984e1209072190985c2c120c080f8f8e0f183a130907060218201c0841004a07f286894d082c838e52181702f2c80b80dc06b05f82e03503a06606b06306006a0640e00b20730660c80e405803900ab07707402a81c7ffc12434498e6182620c7290c0b81796405c06e03582fc1701a81d03303583183003503207005903983306407202c01c805583b83a01540e3ffe090a10e9af4f4306ba181a0d8dc6068381d0d8d8c0d072190986430120c080f8f8e0f183a130907060218201c0841004a07f843a6bc85c81209964090482613c24120e0742613848241c86426170b04830203e3e383c60e84c241c1808608070210401281fca1a929a1059071ca4302e05e5901701b80d60bf05c06a0740cc0d60c60c00d40c81c01640e60cc1901c80b007201560ee0e8055038fff82486a498e6182620c7290c0b81796405c06e03582fc1701a81d03303583183003503207005903983306407202c01c805583b83a01540e3ffe090a10e9af4f4306ba181a0d8dc6068381d0d8d8c0d072190986430120c080f8f8e0f183a130907060218201c0841004a07f86a498e6182620c7290c0b81796405c06e03582fc1701a81d03303583183003503207005903983306407202c01c805583b83a01540e3ffe091115c96a5de02d4244026d9400007d20001d4c03e46818dc0002625a0001312d00004c4b40002625a8b840208a2000100084401c172438d6224 Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: ------------------------ Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: ------------------------ Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Track 01 [audio_0] Enabled Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Duration: 0:02:07.168000000 Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Language: eng Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Mime: Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, bitrate=(int)192000, stream-format=(string)raw, codec_data=(buffer)1190 Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: ------------------------ Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: ====== BEEP: 4.7.0 build on May 20 2022 06:51:21. ====== Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Core: AAC decoder Wrapper build on Jul 28 2020 10:45:34 Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: file: /usr/lib/imx-mm/audio-codec/wrap/lib_aacd_wrap_arm_elinux.so.3 Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.09.00_ARMV8 build on Sep 20 2017 15:02:50. Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: Oct 20 07:33:58 PXDEVICE PXDEVICE-main[501]: ====== V4L2DEC: 1.20.0 build on Apr 24 2022 09:19:42. ======
  • 1 Votes
    2 Posts
    536 Views
    A
    Found out this is a known bug: https://bugreports.qt.io/browse/QTBUG-136493
  • 0 Votes
    2 Posts
    493 Views
    C
    Regarding your notes: it may be independent of all those things but it may be dependent on the compiler toolchain used, the Qt version in use, and the Windows version for both recording and playback. The Windows component that generated the audio stream provided something odd that Windows Media Player cannot understand. ffmpeg produces valid AAC Low Complexity the Windows Media Player does understand. It's unclear what the original stream is. If the original stream was AAC Main Profile then ffprobe would have reported "Audio: aac (Main) (mp4a / 0x6134706D)...". High Efficiency AAC would be reported as "Audio: aac (HE-AAC) (mp4a / 0x6134706D)" (and less likely to be playable). Does the audio play correctly if extracted from the container? ffmpeg.exe -i original_video.mp4 -c: copy -vn original_video_audio.m4a
  • 0 Votes
    6 Posts
    945 Views
    Axel SpoerlA
    Then your package manager provides EOL-software! You can download later versions via the link in @Christian-Ehrlicher's signature.
  • Multimedia Developer Expertise in Qt and GStreamer - Remote

    Unsolved Jobs jobs gstreamer qt6 multimedia
    1
    0 Votes
    1 Posts
    898 Views
    No one has replied
  • 0 Votes
    3 Posts
    914 Views
    K
    @Cleiton-Bueno Command output: PACKAGECONFIG="gstreamer alsa gstreamer" PACKAGECONFIG_CONFARGS=" -alsa -gstreamer 1.0 -no-feature-openal -no-pulseaudio" PACKAGECONFIG_OPENSSL="openssl" @edit I also discovered that there is no "qmlgl" (qmlgloverlay, qmlglsink, qmlglsrc) in the system which should be provided by gstreamer1.0-plugins-good. I forced to build packet configurated for qt5 by add line in my local.conf: PACKAGECONFIG:append:pn-gstreamer1.0-plugins-good = " qt5" After that I have available qmlglsink and other. I still can't play video directly from file because effect is the same no image. I tried to build pipeline: source: "gst-pipeline: filesrc location=/home/root/dillama_1080p.mp4 ! decodebin name=dec ! videoconvert ! qmlglsink widget" I can't set required pointer to qml widget for qmlglsink. How do it?
  • 0 Votes
    4 Posts
    1k Views
    C
    @Saviz The example does not come copy-n-paste from the docs, it comes from reading the docs. This will list all the combinations that are possible on the running platform concerned: #include <QCoreApplication> #include <QDebug> #include <QMediaFormat> int main(int argc, char **argv) { QCoreApplication app(argc, argv); const QList<QMediaFormat::FileFormat> containers = { QMediaFormat::WMA, QMediaFormat::AAC, QMediaFormat::Matroska, QMediaFormat::WMV, QMediaFormat::MP3, QMediaFormat::Wave, QMediaFormat::Ogg, QMediaFormat::MPEG4, QMediaFormat::AVI, QMediaFormat::QuickTime, QMediaFormat::WebM, QMediaFormat::Mpeg4Audio, QMediaFormat::FLAC }; const QList<QMediaFormat::AudioCodec> audioCodecs = { QMediaFormat::AudioCodec::WMA, QMediaFormat::AudioCodec::AC3, QMediaFormat::AudioCodec::AAC, QMediaFormat::AudioCodec::ALAC, QMediaFormat::AudioCodec::DolbyTrueHD, QMediaFormat::AudioCodec::EAC3, QMediaFormat::AudioCodec::MP3, QMediaFormat::AudioCodec::Wave, QMediaFormat::AudioCodec::Vorbis, QMediaFormat::AudioCodec::FLAC, QMediaFormat::AudioCodec::Opus, QMediaFormat::AudioCodec::Unspecified }; const QList<QMediaFormat::VideoCodec> videoCodecs = { QMediaFormat::VideoCodec::VP8, QMediaFormat::VideoCodec::MPEG2, QMediaFormat::VideoCodec::MPEG1, QMediaFormat::VideoCodec::WMV, QMediaFormat::VideoCodec::H265, QMediaFormat::VideoCodec::H264, QMediaFormat::VideoCodec::MPEG4, QMediaFormat::VideoCodec::AV1, QMediaFormat::VideoCodec::MotionJPEG, QMediaFormat::VideoCodec::VP9, QMediaFormat::VideoCodec::Theora, QMediaFormat::VideoCodec::Unspecified }; for (const auto &c : containers) { QMediaFormat format(c); for (const auto &v : videoCodecs) { format.setVideoCodec(v); for (const auto &a : audioCodecs) { format.setAudioCodec(a); if (format.isSupported(QMediaFormat::Encode)) { qDebug() << QMediaFormat::fileFormatName(c) << "(" << QMediaFormat::videoCodecName(v) << ", " << QMediaFormat::audioCodecName(a) << ")"; } } } } return 0; } If you only want to support "closely aligned" combinations then only check those. There's no direct connection between the container format and the name of the file it is contained in. This is done purely by convention. If you want to put an MPEG4 container with audio-only in a file called blah.acc then go right ahead. Most players, I assume, only use this as a hint as to the file content and actually read the content to determine what is sane to do.
  • 0 Votes
    11 Posts
    2k Views
    S
    @SGaist That is correct. The same application tested on different Windows machines presents exactly the same behavior.
  • 0 Votes
    3 Posts
    743 Views
    J
    @Bonnie Thank you for the reply. Since my last post, I made some significant progress by debugging the Windows Qt multimedia source. I swapped QBuffer for a QRingBuffer. As it turns out, the performance issues were not related to the QBuffer in my previous implementation, however I prefer to use a lighter weight object as the Single Producer Single Consumer (SPSC) buffer between the microphone (the default input device) and the speaker (the default output device). The remaing problem that I need help with is how to schedule a restart after I encounter a buffer underrun or Eof condition (where there are no bytes available in the SPSC buffer). I swapped QBuffer for Qt's private QRingBuffer class which is used in other multimedia QIODevice derived objects. This class is not really well documented but it is relatively straight forward to understand - this link shows the impmentation). The ring buffer is basically made up from a list of RingChunks - each of which is effectively a wrapper around a QByteArray (with supporting head and tail offsets). The problem now is that I once the pull mode AudioSink encounters an error in its timer callback method - in this case the pullSource method (see below for Qt's windows AudioSink implementation) (QWindowsAudioSink::pullSource), the audio output changes its state to QAudio::IdleState with QAudio::IOError or QAudio::UnderrunError, and stops the pull timer. The pull timer callback is resposible for requesting the next raw chunk of audio from the QRingBuffer via the m_pullSource->read(readLen)) and writing it to the speaker ourput device. Meanwhile the capture slot in my worker thread keeps appending microphone data to this shared mpSinkDevice - so the buffer keeps growing (which would prevent the buffer underrun/eof condition) but I have no idea how to restart the audio output. void RtpWorker::handleAudioAvailable(const QAudioBuffer& rAudioBuffer) const { // append captured audio to mpSinkDevice's QRingBuffer mpSinkDevice->write(rAudioBuffer.constData< const char>(), rAudioBuffer.byteCount()); } The m_pullSource field in the code below is a pointer to the QIODevice containing the QRingBuffer which was opened for Read/Write (write is required by the audio capture slot to copy the raw audio from the microphone to the QRingBuffer). void QWindowsAudioSink::pullSource() { qCDebug(qLcAudioOutput) << "Pull source"; if (!m_pullSource) return; auto bytesAvailable = m_pullSource->isOpen() ? qsizetype(m_pullSource->bytesAvailable()) : 0; auto readLen = qMin(bytesFree(), bytesAvailable); if (readLen > 0) { QByteArray samples = m_pullSource->read(readLen); if (samples.size() == 0) { deviceStateChange(QAudio::IdleState, QAudio::IOError); return; } else { write(samples.data(), samples.size()); } } auto playTimeUs = remainingPlayTimeUs(); if (playTimeUs == 0) { deviceStateChange(QAudio::IdleState, m_pullSource->atEnd() ? QAudio::NoError : QAudio::UnderrunError); } else { deviceStateChange(QAudio::ActiveState, QAudio::NoError); m_timer->start(playTimeUs / 2000); } } Here is my SinkDevice //! Modeled after the Generator class example from QT 6.x audio output example. class SinkDevice : public QIODevice { Q_OBJECT public: /** * Explicit constructor * * @param parent [in] parent. */ explicit SinkDevice(QObject* parent = nullptr) : QIODevice(parent) , mBuffer{} {} /** * Explicit constructor * * @param rByteArray [in] array of multi-channel audio * samples. * @param parent [in] parent. */ explicit SinkDevice(const QByteArray& rByteArray, QObject* parent = nullptr) : QIODevice(parent) , mBuffer{} { mBuffer.append(rByteArray); } ~SinkDevice() override = default; /** * Start the IO device - open in read/write mode * so it can act like a ring buffer. */ void start(); /** * Close IO device. */ void stop(); //! Audio device should give sequential access [[nodiscard]] bool isSequential() const override { return true; } [[nodiscard]] qint64 bytesAvailable() const override { return mBuffer.size() + QIODevice::bytesAvailable(); } // Our size [[nodiscard]] qint64 size() const override { return mBuffer.size(); } protected: [[nodiscard]] qint64 readData(char* data, qint64 maxlen) override; [[nodiscard]] qint64 writeData(const char* data, qint64 maxlen) override; private: // disable copy & move semantics on QObject subclasses // https://www.cleanqt.io/blog/why-qobject-subclasses-are-not-copyable Q_DISABLE_COPY_MOVE(SinkDevice) void generateData(const QAudioFormat& format, qint64 durationUs, int sampleRate); QRingBuffer mBuffer; };
  • 0 Votes
    2 Posts
    483 Views
    D
    OK, I found the cause of the problem. Well, the problem is the right combination of codec, format and QMediaRecorder configuration. In the case of my systems, it turned out that they do not support WAV. Using AAC and a bitrate of 256kbit solved the problem. Previously I tried with AAC and 320kbit but the codec does not work with such a high bitrate and there was no error message.
  • 0 Votes
    5 Posts
    1k Views
    S
    @mzimmers Yes, I am sure that the url is pointing to the correct source. In fact what seems strange is that the first time I call setPosition it works, but any other time, regardless of the url being identical or changed to point to a different file, it ends up being in the StalledMedia state.
  • creating a dummy QAudioDevice

    Unsolved General and Desktop multimedia audio device widget qt6
    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    I would check the internals of the other platform plugins to see how they are used by these classes.
  • Installing the Multimedia component?

    Unsolved Installation and Deployment windows multimedia cmake
    2
    0 Votes
    2 Posts
    1k Views
    J
    I'm hoping for an answer on this. Here is a screenshot of the QT Maintenance Tool. Shouldn't I see a way to install the QT Multimedia component here? I have a red arrow where I would have assumed I'd see it (I've seen examples on the web with screenshots showing it.) I have 6.3.1 installed. [image: c1d20127-19af-4f07-a331-4bdddb9de559.jpg] Thanks, ...John
  • 0 Votes
    3 Posts
    854 Views
    B
    @Chris-Kawa said in QMediaRecorder(QMediaFormat) not support wave format: Is that on Windows? By default Qt uses Windows Media Foundation backend, which does support PCM audio in WAV containers, but for some reason this format doesn't seem to be mentioned in the windows platform plugin. I don't know if it's a omission by mistake or intentional. You might want to ask the developers on the mailing list. Qt 6.4 introduced experimental ffmpeg backend that seems to at least mention this format in the code. It's a technology preview, so you might need to compile it yourself though. Target platform and backend notes. Yes, I use Qt6.2.4 on Win 11. Thanks for you reply.
  • 0 Votes
    4 Posts
    874 Views
    F
    @SGaist looking at the QCamera example gave me a lot of info to fix my issue. I was using the QCamera wrongly. Too many start/stop followed by lock/unlock etc. Now the image is captured correctly.
  • 0 Votes
    1 Posts
    423 Views
    No one has replied
  • 0 Votes
    1 Posts
    407 Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    R
    @GrecKo It does, but it seems to be a read-only reflection of the viewport set for the video frame objects that are coming through the videoSink. When I attempt to assign to it, I get the QML error: Invalid property assignment: "sourceRect" is a read-only property. The docs do not appear to reflect the fact that sourceRect is read-only. I am using Qt 6.3. Looking at the source for VideoOutput (https://github.com/qt/qtmultimedia/blob/37c2d097eb5dd8671cc752dc920da11d66105905/src/multimediaquick/qquickvideooutput_p.h#L41), we can see that the Q_PROPERTY for sourceRect is read-only in both the 6.3 and dev branches. I have had the thought of attempting to manually set the viewport of the QVideoFrameFormat of the frames coming through the VideoOutput's videoSink, but I haven't created a working solution for that strategy yet.
  • Failing to build with 5.15.5 on Windows 10

    Unsolved General and Desktop multimedia 5.15 msbuild
    4
    0 Votes
    4 Posts
    1k Views
    Christian EhrlicherC
    Since 5.15.5 is a commercial version you should ask the Qt support for help.
  • 0 Votes
    1 Posts
    380 Views
    No one has replied