rocksdanister / lively

Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
https://rocksdanister.com/lively
GNU General Public License v3.0
14.75k stars 1.05k forks source link

Problems regarding Webpage Video (ugly artifact and freezes) #2089

Closed PierKnight closed 7 months ago

PierKnight commented 7 months ago

Describe the bug While using a webpage video in webm format an ugly artifact appears even it works fine while using mpv player. Sometimes when lively is paused by a full screen application, the webpage can freeze.

To Reproduce Steps to reproduce the behavior:

  1. Create a custom wallpaper using web engine
  2. Follow https://github.com/rocksdanister/lively/wiki/Web-Guide-VI-:-Webpage-Video-Support to create a video webpage
  3. Now using a webm sometimes an artifact appears
  4. for the frozen webpage you can now enable the "Pause option" inside performance tab
  5. now when lively is paused by an app and resumed after some time, the player speeds up the video and/or freezes.

Expected behavior A video artifact should not appear

Screenshots/Video Immagine 2024-01-25 140159

Desktop (please complete the following information):

Log file

lively_log_20240125_140717.zip

rocksdanister commented 7 months ago

For the pausing issue you will have to pause the video when wallpaper is paused.

I would try VP8 for compatibility, could be GPU driver related https://github.com/rocksdanister/lively/issues/1984

PierKnight commented 7 months ago

for the pausing I've quicky implemented the following fix function livelyWallpaperPlaybackChanged(data) { var obj = JSON.parse(data); console.log(obj.IsPaused); //true or false const video = document.getElementById("video") console.log(video) if(obj.IsPaused) video.pause() else video.play() }. Regarding the codec the video uses VP9 I'll try VP8, thanks for the response

PierKnight commented 7 months ago

looking at the other github issue I'm having the same problem when using VP8, the video now restarts before the end or freezes

PierKnight commented 7 months ago

I noticed that after the video plays one time, the GPU usage by chef sharp increases from 10 to like 30%, and then artifacts appear it goes for a brief moment to 90% and then back to 10% but now the video is cut off ant it plays the first 2 seconds. Can the video size be a problem?, I tried a video online using an url instead of a local file, and it seems to work in that case, if I download the same file and use that one the problem arises

PierKnight commented 7 months ago

Update: It works perfectly using the Microsoft Web Engine

PierKnight commented 7 months ago

I'm stuck right now, I found out that it works with the microsoft web engine but there is the problem with CORS which there is already an issue, so now I'm stuck. I was thinking if I can downgrade chef sharp

rocksdanister commented 7 months ago

What do you mean by downgrade? is the issue not present in older builds of CefSharp?

PierKnight commented 7 months ago

no, it's just a guess by me. For the time on I will use webview2 with a local server to resolve the CORS problem until it is properly fixed.

rocksdanister commented 7 months ago

You can change the cefsharp plugin by building it: https://github.com/rocksdanister/lively-cef

I am closing this issue since its not directly Lively related.