[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [BUG] Issues with QMediaPlayer after PyQt6-Qt6 v6.6.3 (v6.7.0 included)
From:       Gdaliy Garmiza <gdalik () gmail ! com>
Date:       2024-05-05 15:22:23
Message-ID: CAC3-=9A6bxcc7hGOiYr7_=DXbKG7f=qmNXvYhg1YK97z0Ukq2g () mail ! gmail ! com
[Download RAW message or body]

Hello!

I have developed a Free and Open-Source app which uses PyQt6 for GUI,
including the extensive use of QtMultimedia/QMediaPlayer for playing audio
files.
It is called EarQuiz Frequencies, and the codebase is available here:
https://github.com/Gdalik/EarQuiz_Frequencies
I tried to upgrade to PyQt6 v6.6.3, and then to the latest version 6.7.0,
but this resulted in buggy behavior of QMediaPlayer, especially on Windows!
My app lets a user switch the audio backend from GUI. This setting is
stored in the 'config.ini' file, and the required backend is activated
after launching/restarting the program.

Here is what I get on different platforms as results of manual testing.

On Windows 10:
QMediaPlayer simply doesn't work with either FFmpeg or native backend
chosen.
Audio files are not loaded, nothing is played back, the app just freezes
without any error messages.

On Windows 11:
QMediaPlayer works with FFmpeg, but doesn't work with native backend.

On macOS 12 (Monterey) with Intel and macOS 14 (Sonoma) with Apple Silicon:
FFmpeg works much more stable than it used to in the version 6.6.2 which
could just freeze the application on loading a next file, especially when
trying to switch between different audio files too fast. This didn't occur
with the native backend, and this doesn't occur since the v6.6.3.
But now the switching between backends is performed in a weird way. When
trying to switch to the native 'darwin' backend (AVFoundation), it still
works as FFmpeg (e.g., plays OGG files), then after switching back to
FFmpeg, it behaves in the opposite way.

On Linux (Ubuntu 22.04.4) I haven't found any serious issues. The only
thing that with 6.7.0 it still behaves as if it uses FFmpeg (and not
GStreamer) in both cases. No matter what is the value of the
QT_MEDIA_BACKEND variable, it still throws the warning messages from FFmpeg
which do not result in any real performance issues.

When reinstalling PyQt6 with 'PyQt6<6.7.0' and 'PyQt6-Qt6==6.6.2'
directives, everything works as expected without changing anything in my
code on all the platforms. So, I had to update the 'requirements.txt' file
correspondingly.

Best,
Gdaliy

[Attachment #3 (text/html)]

<div dir="ltr">Hello!<br><br>I have developed a Free and Open-Source app which uses \
PyQt6 for GUI, including the extensive use of QtMultimedia/QMediaPlayer for playing \
audio files.  <div>It is called EarQuiz Frequencies, and the codebase is available \
here:  <a href="https://github.com/Gdalik/EarQuiz_Frequencies">https://github.com/Gdalik/EarQuiz_Frequencies</a></div><div>I \
tried to upgrade to PyQt6 v6.6.3, and then to the latest version 6.7.0, but this \
resulted in buggy behavior of QMediaPlayer, especially on Windows!</div><div>My app \
lets a user switch the audio backend from GUI. This setting is stored in the \
&#39;config.ini&#39; file, and the required backend is activated after \
launching/restarting the program.</div><div><br></div><div>Here is what I get on \
different platforms as results of manual testing.</div><div><br>On Windows \
10:</div><div>QMediaPlayer simply doesn&#39;t work with either FFmpeg or native \
backend chosen.<br>Audio files are not loaded, nothing is played back, the app just \
freezes without any error messages.<br><br>On Windows 11:<br>QMediaPlayer works with \
FFmpeg, but doesn&#39;t work with native backend.</div><div><br></div><div>On macOS \
12 (Monterey) with Intel and macOS 14 (Sonoma) with Apple Silicon:<br>FFmpeg works \
much more stable than it used to in the version 6.6.2 which could just freeze the \
application on loading a next file,  especially when trying to switch between \
different  audio files too fast. This didn&#39;t occur with the native backend, and \
this doesn&#39;t occur since the v6.6.3.<br>But now the switching between backends is \
performed in a weird way. When trying to switch to the native &#39;darwin&#39; \
backend (AVFoundation), it still works as FFmpeg (e.g., plays OGG files), then after \
switching back to FFmpeg, it behaves in the opposite way.</div><div><br></div><div>On \
Linux (Ubuntu 22.04.4) I haven&#39;t found any serious issues. The only thing that \
with 6.7.0 it still behaves as if it uses FFmpeg (and not GStreamer) in both cases. \
No matter what is the value of the QT_MEDIA_BACKEND variable, it still throws the \
warning messages from FFmpeg which do not result in any real performance \
issues.<br><br>When reinstalling PyQt6 with &#39;<span \
style="color:rgb(8,8,8);font-family:&quot;JetBrains \
Mono&quot;,monospace;font-size:9.8pt">PyQt6&lt;6.7.0&#39; and &#39;</span><span \
style="color:rgb(8,8,8);font-family:&quot;JetBrains \
Mono&quot;,monospace;font-size:9.8pt">PyQt6-Qt6==6.6.2&#39; directives, everything \
works as expected without changing anything in my code on  all the platforms. So, I \
had to update the &#39;requirements.txt&#39; file \
correspondingly.<br><br>Best,</span></div><div><span \
style="color:rgb(8,8,8);font-family:&quot;JetBrains \
Mono&quot;,monospace;font-size:9.8pt">Gdaliy</span></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic