Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black screen with gstreamer as Qt Media backend (Recent KDE Neon update) #8

Open
linlinxza opened this issue Apr 3, 2024 · 80 comments
Labels
amd gpu bug Something isn't working Qt Likely depends on Qt to implement/fix

Comments

@linlinxza
Copy link

This is what I get according to journalctl -f:

Failed to initialize QMediaPlayer "Could not find the videoconvertscale GStreamer element"

Yes, I have gstreamer1.0-libav installed.

@luisbocanegra
Copy link
Owner

According to a search in Ubuntu's package files database the package that provides libgstvideoconvertscale.so is gstreamer1.0-plugins-base please check that you have it installed. Install it if you don't, then reboot and try again.

If you do but still isn't working please send the output of apt policy gstreamer1.0-plugins-base.

According to that database, versions of ubuntu older than lunar (23.04) don't include that library and you may be in one of those versions or maybe the library moved to another package, to check if your package provides the library run apt-file list gstreamer1.0-plugins-base should return the files of the package and it must contain libgstvideoconvertscale.so

@linlinxza
Copy link
Author

linlinxza commented Apr 3, 2024

According to sudo apt-file list gstreamer1.0-plugins-base, this is what I get:

gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstadder.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstapp.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudioconvert.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiomixer.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiorate.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudioresample.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiotestsrc.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcdparanoia.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcompositor.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstencoding.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstgio.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibvisual.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstogg.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopus.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstoverlaycomposition.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpbtypes.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrawparse.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstsubparse.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsttcp.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsttheora.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsttypefindfunctions.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideorate.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoscale.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideotestsrc.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvolume.so
gstreamer1.0-plugins-base: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvorbis.so
gstreamer1.0-plugins-base: /usr/share/doc/gstreamer1.0-plugins-base/changelog.Debian.gz
gstreamer1.0-plugins-base: /usr/share/doc/gstreamer1.0-plugins-base/copyright

Guess I am shit out of luck given that KDE Neon is still using 22.04 as the Ubuntu base.

Unless you have an older version I could use until the 24.04 upgrade is available?

@luisbocanegra
Copy link
Owner

Hmm I don't think using an older package is a good idea. You would need to downgrade qt6-multimedia but I am sure other packages that require the latest version will break. What you could try instead is manually building and installing gstreamer1.0-plugins-base but is an advanced task.

Maybe you can open an issue in KDE's bug tracker requesting an updated package as it is breaking qt-multimedia functionality.

@luisbocanegra
Copy link
Owner

luisbocanegra commented Apr 3, 2024

What happens if you run the test.qml as per instructions here?

@linlinxza
Copy link
Author

linlinxza commented Apr 3, 2024

No. I am talking about you having an older version of your plugin. Because that worked. Before I updated my system today.

Anyway, I ran this: QSG_INFO=1 QT_LOGGING_RULES="qml.debug=true" qml test.qml

Changed the qml6 to a qml because it wouldn't work otherwise.

This is what I got:

qt.scenegraph.general: threaded render loop
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 13.35 ms
Failed to initialize QMediaPlayer "Could not find the videoconvertscale GStreamer element"
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 13.35 ms
qt.scenegraph.general: Creating QRhi with backend OpenGL for window 0x5c583af61de0 (wflags 0x1)
  Graphics API debug/validation layers: 0
  Debug markers: 0
  Timestamps: 0
  Prefer software device: 0
  Shader/pipeline cache collection: 0
qt.rhi.general: Created OpenGL context QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QColorSpace(), profile  QSurfaceFormat::CompatibilityProfile)
qt.rhi.general: OpenGL VENDOR: AMD RENDERER: AMD Radeon RX 580 Series (polaris10, LLVM 15.0.7, DRM 3.54, 6.5.0-26-generic) VERSION: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
qt.scenegraph.general: Created QRhi 0x7d27ec00d8a0 for window 0x5c583af61de0
qt.scenegraph.general: MSAA sample count for the swapchain is 1. Alpha channel requested = no.
qt.scenegraph.general: rhi texture atlas dimensions: 2048x2048
qml: playing next video
qml: playing next video
qml: playing next video
qml: playing next video
qml: playing next video
qml: PAUSING ABOUT TO QUIT
qml: PAUSING ON DESTRUCTION
qt.scenegraph.general: Total time spent on pipeline creation during the lifetime of the QRhi 0x7d27ec00d8a0 was 7 ms

@luisbocanegra
Copy link
Owner

Unfortunately I am not sure its possible to get around that error aside from trying to switch back to ffmeg to see if the situation has improved with it.

@luisbocanegra
Copy link
Owner

The test.qml shows a black video too right? I am going to make the bug report if that's true.

@linlinxza
Copy link
Author

The test.qml shows a black video too right? I am going to make the bug report if that's true.

Yeah. No video.

@linlinxza
Copy link
Author

linlinxza commented Apr 3, 2024

Unfortunately I am not sure its possible to get around that error aside from trying to switch back to ffmeg to see if the situation has improved with it.

I tried ffmpeg. Still a crashing. And it was just working with gstreamer fine before I updated KDE Neon. Pain in the ass.

@luisbocanegra
Copy link
Owner

Yeah, searching for package related errors there are many examples of this kind of problem where a dependency is not up-to date which I think is unfortunate and I'd rather would have preferred KDE people recommended Fedora instead of what seems to be a KDE demo distro mostly intended for developers?

@linlinxza
Copy link
Author

linlinxza commented Apr 3, 2024

Yeah, searching for package related errors there are many examples of this kind of problem where a dependency is not up-to date which I think is unfortunate and I'd rather would have preferred KDE people recommended Fedora instead of what seems to be a KDE demo distro mostly intended for developers?

Meanwhile, I have been using this 'demo distro' for about 8 years as my daily driver for myself and the entire household now. Like, there is a user edition of KDE Neon. But with how crap Ubuntu has become due to Canonical, I may consider the Fedora KDE spin at some point. lol

Anyway, if there was no more issue with ffmpeg as the backend that made plasmashell crash, then I wouldn't need gstreamer.

@luisbocanegra
Copy link
Owner

I really need to get my hands on a AMD system to investigate these ffmpeg crashes, I am not even sure if that has been reported yet.

For the packaging problem maybe this but for gstreamer1.0-plugins-base could work?

@linlinxza
Copy link
Author

linlinxza commented Apr 3, 2024

I really need to get my hands on a AMD system to investigate these ffmpeg crashes, I am not even sure if that has been reported yet.

For the packaging problem maybe this but for gstreamer1.0-plugins-base could work?

Nah. I think I am done for tonight. Can live without it for now. Besides, I don't feel like screwing with my system. It's stable, and that's what's important right now. Since Plasma 6 came out, I had a few dependency issues. Much rather not mess with something that works; especially late in the evening.

And yeah, please get an AMD system. A lot of people who want better GPU drivers turn to AMD because of the better out of box experience that it is on Linux. Compared to Nvidia's nonsense (where they give the second class provider treatment to Linux users). It's precisely why I no longer use anything Nvidia.

All I have left is an old 750 Ti that I use for GPU pass through for a Spydows virtual machine that I keep completely offline and isolated like the malware that it is (which I don't even use anymore; it's just there).

@luisbocanegra
Copy link
Owner

Nah. I think I am done for tonight. Can live without it for now. Besides, I don't feel like screwing with my system. It's stable, and that's what's important right now. Since Plasma 6 came out, I had a few dependency issues. Much rather not mess with something that works; especially late in the evening.

Good call, I wouldn't mess with it either. I do for Arch but only because here is pretty easier for me to undo everything.

All I have left is an old 750 Ti that I use for GPU pass through for a Spydows virtual machine that I keep completely offline and isolated like the malware that it is (which I don't even use anymore; it's just there).

You just described how I have my GTX 1650 (laptop) lol. I still use it for windows sometimes and for testing things on other distributions but normally is just disabled like it doesn't exist.

@linlinxza
Copy link
Author

linlinxza commented Apr 3, 2024

I thought about Arch based systems. But I don't think I'd want something that temperamental as a daily driver. I don't need bleeding edge either. Just need something that works.

BTW, the more people stop using the Windows and switch to Linux, the better it will be. I think Valve is helping much with that one. Not to mention MS's hostility which is making more people not want to use their platform anymore.

@luisbocanegra
Copy link
Owner

Hi again. I found the Qt issue for broken gstreamer video playback https://bugreports.qt.io/browse/QTBUG-123312 the solution is to wait for an update of either gstreamer or qt-multimedia to land in Neon

@linlinxza
Copy link
Author

Yup. Okay. Just try getting an AMD system so that you can test the plugin on that. Because I'm sure many other AMD users would just prefer to go with the default backend; which is ffmpeg.

@luisbocanegra
Copy link
Owner

Can you please switch back to ffmpeg and run the test.qml file again? If that one crashes I can skip KDE and report this problem to Qt/AMD

@linlinxza
Copy link
Author

linlinxza commented Apr 4, 2024

Yeah. I switched to ffmpeg last night to see if the plugin would work. Anyway, I tried the test file. This is what I got after running it. It just played one of the videos before crashing.

[AVHWFramesContext @ 0x71cc40004ec0] Failed to sync surface 0x19: 13 (the requested VAEntryPoint is not supported).
Error transferring the data to system memory: -5
Cannot map a video frame in ReadOnly mode!
Cannot represent the plane 0 as an image
Cannot represent the plane 1 as an image
malloc(): mismatching next->prev_size (unsorted)
Aborted (core dumped)

@luisbocanegra
Copy link
Owner

luisbocanegra commented Apr 5, 2024

Can you please try to get a backtrace? https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

$ gdb qml6

Reading symbols from qml6...
Enable debuginfod for this session? (y or [n]) y
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.          
(gdb) run /home/luis/projects/plasma-smart-video-wallpaper/playground/000videoTest.qml

Wait for debug symbols to finish downloading if needed. Wait for the video window to show. This process may take a while.

When the crash occurs you'll see something like this:

Thread 1 "qml6" received signal SIGSEGV, Segmentation fault.
0x00007ffff6b54b0a in QRhi::makeThreadLocalNativeContextCurrent (this=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.3/src/gui/rhi/qrhi.cpp:9624
9624        return d->makeThreadLocalNativeContextCurrent();
(gdb) set logging file ~/backtrace.txt
(gdb) set logging enabled on
Copying output to /home/luis/backtrace.txt.
Copying debug output to /home/luis/backtrace.txt.
(gdb) thread apply all bt full
...
--Type <RET> for more, q to quit, c to continue without paging--
c
set logging enabled off
Done logging to /home/luis/backtrace.txt.
(gdb) quit

Finally share the contents of backtrace.txt
recording of the process in case you need it

@linlinxza
Copy link
Author

linlinxza commented Apr 5, 2024

Well, here is the backtrace.

Keep in mind that if I attempt to run gdb qml6 I get this: qml6: No such file or directory.

So, I had to run this gdb qml to get it to work.

Backtrace attached:

backtrace.txt

@luisbocanegra
Copy link
Owner

luisbocanegra commented Apr 5, 2024

Thank you. Can you also send the updated kinfo. Oh and try setting this environment variable QT_DISABLE_HW_TEXTURES_CONVERSION=1 it supposedly helped fix a crash on windows maybe it helps here too.

Edit: Here is the bug report where I found that env var https://bugreports.qt.io/browse/QTBUG-113832?jql=text%20~%20%22ffmpeg%20amd%22

@linlinxza
Copy link
Author

Here is the result of kinfo:

Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600G with Radeon Graphics
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series

QT_DISABLE_HW_TEXTURES_CONVERSION=1 it supposedly helped fix a crash on windows maybe it helps here too.

But... that's for Windows? How does this relate?

@luisbocanegra
Copy link
Owner

It was added to windows but is also in ffmpeg if I understood correctly

@linlinxza
Copy link
Author

Where would I add that environment variable?

@luisbocanegra
Copy link
Owner

luisbocanegra commented Apr 5, 2024

In the same file where the qt media back end one ~/.config/plasma-workspace/env/qt-media-backend.sh is okay

@linlinxza
Copy link
Author

So, just QT_DISABLE_HW_TEXTURES_CONVERSION=1 variable in the ~/.config/plasma-workspace/env/qt-media-backend.sh file and that's it? Nothing else?

@luisbocanegra
Copy link
Owner

Yeah

@luisbocanegra
Copy link
Owner

Just verify it shows up in echo $QT_DISABLE_HW_TEXTURES_CONVERSION=1

@linlinxza
Copy link
Author

Well, when I paste this in the terminal echo $QT_DISABLE_HW_TEXTURES_CONVERSION=1, it gives me this:

=1

@larsut
Copy link

larsut commented May 27, 2024

@linlinxza I'm sorry to hear. If you have time, you could try these steps that I mentioned:

Two things that could be checked:

  • Run the qml app with LIBVA_DRIVER_NAME=nothing , which prevents both Qt and FFmpeg from using VAAPI. I’m expecting that to work fine without crashing.
  • Check FFmpeg version with the command “FFmpeg -version”

@linlinxza
Copy link
Author

linlinxza commented May 27, 2024

My FFmpeg version is: 4.4.2-0ubuntu0.22.04.1

Anyway, I'll try the other stuff tomorrow. It's like 5 AM where I am. lol

I just came on here to comment because the rest of the Internet is largely useless (namely with social media); much of which I blocked via my PiHole and used filters on Ublock (that I personally devised) to remove any and all references to social media domains in the search engine and also share buttons. Feels like early 2000's Internet before social media took off with a lot less crap. :)

@linlinxza
Copy link
Author

linlinxza commented May 28, 2024

@linlinxza I'm sorry to hear. If you have time, you could try these steps that I mentioned:

Two things that could be checked:

  • Run the qml app with LIBVA_DRIVER_NAME=nothing , which prevents both Qt and FFmpeg from using VAAPI. I’m expecting that to work fine without crashing.
  • Check FFmpeg version with the command “FFmpeg -version”

UPDATE:

You are my hero! I think this is working. I have been able to have the video background that is a minute long loop for about 10 minutes now without a single crash with plasmashell!

I created the file ~/.config/plasma-workspace/env/qt-media-backend.sh as per Luisbocanegra's instructions. But I altered it to be like this:

#!/bin/bash
export LIBVA_DRIVER_NAME=nothing

And lo and behold, it frigging works! I think this will have to be the only solution for people with AMD cards who are using distros with older packaging!

EDIT:

But this does pose a performance issue now. Because it's relying on the CPU more and not the GPU. So, AMD users who need to use this method are leaving performance on the table. I have to re-encode the video clips from 1080p to 720p so that it isn't so taxing on the CPU.

Is there another driver name I could specify?

@linlinxza linlinxza reopened this May 28, 2024
@larsut
Copy link

larsut commented May 28, 2024

I appreciate your appreciation! Yea this workaround just prevents FFmpeg from using hardware acceleration through VA-API (libva), so the CPU has to do more work. Based on your logs FFmpeg seemed to be using the correct driver before, so (installing) and specifying another driver shouldn't help.

However, I got a new idea. Can you test if these three slightly edited qml test apps also crash? Don't use LIBVA_DRIVER_NAME=nothing for these tests.

Video_test-1_edited_versions.zip

@larsut
Copy link

larsut commented May 28, 2024

@luisbocanegra I wanted to include a test version without "loops: MediaPlayer.Infinite" as well, but that unfortunately leads to a crash because of another bug. Will fix that one asap. However the call to stop() before playNext() should have the same effect. This could prevent the sketchy behaviour I described earlier, where FFmpeg seems to start playing the next video on a new thread using VAAPI hardware texture surfaces that are still in use by the old video thread.

@larsut
Copy link

larsut commented May 28, 2024

@linlinxza Test this file first of all. @luisbocanegra it uses the QML Types MediaPlayer and VideoOutput instead of just Video. This makes it possible to listen for onMediaStatusChanged instead of onPositionChanged. EndOfMedia status is emitted later than positionChanged, and that could prevent this whole VAAPI issue if we are lucky.
video_test-1_without_looping_and_with_mediaplayer.qml.zip

@luisbocanegra
Copy link
Owner

luisbocanegra commented May 28, 2024

@linlinxza Thank you for your patience helping us troubleshoot this issue, it is really appreciated.

it uses the QML Types MediaPlayer and VideoOutput instead of just Video. This makes it possible to listen for onMediaStatusChanged instead of onPositionChanged. EndOfMedia status is emitted later than positionChanged, and that could prevent this whole VAAPI issue if we are lucky. video_test-1_without_looping_and_with_mediaplayer.qml.zip

@larsut Thank you for continuing investigating this issue, hopefully that prevents the problem.

I wanted to include a test version without "loops: MediaPlayer.Infinite" as well, but that unfortunately leads to a crash because of another bug.

Is this bug something that could be platform specific or is also related to AMD? I have tried removing it from the Video type in video_test-1_with_stop and it still works, removing it from video_test-1_without_looping_and_with_mediaplayer.qml also works and doing so allows looping through all the videos.

@linlinxza
Copy link
Author

linlinxza commented May 28, 2024

You are welcome, luisboanegra.

Here's what I have for logs (did these on mom's AMD laptop):

with-delay-log (qml debug enabled).txt
with-stop-and-delay-log (qml debug enabled).txt
with-stop-log (qml debug enabled).txt

Interestingly enough, the test files would go through all the videos if I don't have qml debugging enabled if I run it like this:

/usr/lib/qt6/bin/qml video_test-1_with_delay.qml

Instead of like this this:

QSG_INFO=1 QT_LOGGING_RULES="qml.debug=true" /usr/lib/qt6/bin/qml video_test-1_with_delay.qml

Despite getting this issue after each clip:

[AVHWFramesContext @ 0x7f5c180051c0] Failed to sync surface 0x15: 13 (the requested VAEntryPoint is not supported).
Error transferring the data to system memory: -5
Cannot map a video frame in ReadOnly mode!
Cannot represent the plane 0 as an image
Cannot represent the plane 1 as an image
vaExportSurfaceHandle failed

The next clip will play. It won't crash.

@luisbocanegra
Copy link
Owner

Please try the mediaplayer one #8 (comment)

@luisbocanegra
Copy link
Owner

Switched the wallpaper from Video to Mediaplayer 793ecab in https://github.com/luisbocanegra/plasma-smart-video-wallpaper-reborn/tree/switch-to-mediaplayer branch.

Things to note:

  • Checking for status == MediaPlayer.EndOfMedia is always false if loops: MediaPlayer.Infinite is set
  • Removing loops property (defaults to 1) allows looping through all the videos but when there is only one video the loop is not smooth

So I changed loops to be infinite when there's only one video and 1 otherwise

@linlinxza please download the file below and run kpackagetool6 -t Plasma/Wallpaper -u plasma-smart-video-wallpaper-reborn-v0.2.1.zip, reboot/re-login and try enabling it with a single video first then multiple.

plasma-smart-video-wallpaper-reborn-v0.2.1.zip

@linlinxza
Copy link
Author

linlinxza commented May 29, 2024

I think you are getting somewhere. If I add just one video, plasmashell will crash. But if I add two video clips, they will keep rotating without crashing plasmashell. I tried this on my mom's laptop which doesn't have the config file ~/.config/plasma-workspace/env/qt-media-backend.sh workaround. So far, if I put two copies of the same video (naming them 1 and 2 respectively to have the same recurring clip) in and have them playing, it works perfectly.

PS; I didn't have to reboot, or log off and log back in again. I just changed the wallpaper plugin to "Image" and then changed it back to your plugin after upgrading it.

I then tried this on my PC and I removed that qt-media-backend.sh file (and of course logged off for that). It's been working so far without taxing my CPU with 1080p video now.

@luisbocanegra
Copy link
Owner

Interesting...

Try the following version

plasma-smart-video-wallpaper-reborn-v0.2.1-loops1.zip

@luisbocanegra
Copy link
Owner

Interesting...

Try the following version

plasma-smart-video-wallpaper-reborn-v0.2.1-loops1.zip

Note This version will show the background color (black by default) for a split of a second when there is only one video because it isn't looping MediaPlayer.Infinite but instead repeating (or playing the next) when the current one ends.

@linlinxza
Copy link
Author

linlinxza commented May 29, 2024

Note This version will show the background color (black by default) for a split of a second when there is only one video because it isn't looping MediaPlayer.Infinite but instead repeating (or playing the next) when the current one ends.

It does the same thing already with the previous revision; as in a black background color with what I have now (by using two of the same clips).

EDIT:

Anyway, I tried the 0.2.1-loops1 version. This works without having to add the copy of the same clip. Now, if it could be smoothed out so it doesn't show any black background, then this would be great.

@luisbocanegra
Copy link
Owner

Anyway, I tried the 0.2.1-loops1 version. This works without having to add the copy of the same clip. Now, if it could be smoothed out so it doesn't show any black background, then this would be great.

Nice, it means @larsut is right and the problem is on the ffmpeg loop implementation.

Out of curiosity can you try this one. It's basically what we started with but with MediaPlayer instead of Video type. I expect it to also crash but doesn't hurt trying

plasma-smart-video-wallpaper-reborn-v0.2.1-loopsInfiniteOnPosition.zip

@linlinxza
Copy link
Author

linlinxza commented May 29, 2024

Nice, it means @larsut is right and the problem is on the ffmpeg loop implementation.

Out of curiosity can you try this one. It's basically what we started with but with MediaPlayer instead of Video type. I expect it to also crash but doesn't hurt trying

plasma-smart-video-wallpaper-reborn-v0.2.1-loopsInfiniteOnPosition.zip

Well, just tried it. So far, it hasn't crashed plasmashell yet. It just does the same thing as the last one; which is a black background for split second before playing the clip again.

@luisbocanegra
Copy link
Owner

For a single video? For me the black background only shows for multiple videos with that one

@linlinxza
Copy link
Author

linlinxza commented May 29, 2024

For a single video? For me the black background only shows for multiple videos with that one

Well, I could try it on another machine with AMD graphics. But, I am sure the result will be the same. Speaking of, got a machine with AMD graphics on it yet?

@luisbocanegra
Copy link
Owner

For a single video? For me the black background only shows for multiple videos with that one

Well, I could try it on another machine with AMD graphics. But, I am sure the result will be the same. Speaking of, got a machine with AMD graphics on it yet?

Nope

@linlinxza
Copy link
Author

linlinxza commented May 29, 2024

Well, I could try it on another machine with AMD graphics. But, I am sure the result will be the same. Speaking of, got a machine with AMD graphics on it yet?

Nope

Even a cheap old machine with AMD graphics would do it. You need to have access to the that kind of hardware so that you could better troubleshoot. Because I can only do so much (given my lack of comprehending how to read and write code; and not knowing how it works). Best I can do is simple 'if' and 'while' statements.

@linlinxza
Copy link
Author

linlinxza commented May 30, 2024

Well, it was great while it lasted. But after rebooting and then updating, plasmashell crashes again with it. And now the background goes green instead of black again...

And if I try putting ~/.config/plasma-workspace/env/qt-media-backend.sh back to gstreamer, the video stays frozen. Like still picture.

EDIT:

This is so damn weird... it works again. I tried setting ~/.config/plasma-workspace/env/qt-media-backend.sh to ffmpeg as a test. And then, after logging off and logging in again, it works again with no crashing yet.

I am totally lost on why this thing works and then doesn't. Well, guess I'll enjoy it while I have it.

@luisbocanegra luisbocanegra added Qt Likely depends on Qt to implement/fix bug Something isn't working labels Jul 15, 2024
@linlinxza
Copy link
Author

linlinxza commented Aug 28, 2024

I don't know what happened, but the plugin seems to be working now. I tried it on both computers that use AMD graphics. It works. The video has looped every time so far without crashing plasmashell from what I noticed.

The screen goes black for a split second, but still keeps on successfully keeps looping the same video file.

@luisbocanegra
Copy link
Owner

Nice! You can check the packages that have been updated recently either qt (specially qt-multimedia), ffmpeg, plasma, gpu drivers...

The screen goes black for a split second, but still keeps on successfully keeps looping the same video file.

Does the crossfade option work?

@linlinxza
Copy link
Author

Fade doesn't work. Also, I don't know how to check anything. All I do is just keep my system updated regularly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amd gpu bug Something isn't working Qt Likely depends on Qt to implement/fix
Projects
None yet
Development

No branches or pull requests

3 participants