anufrievroman / waypaper

GUI wallpaper manager for Wayland and Xorg Linux systems
https://anufrievroman.gitbook.io/waypaper
GNU General Public License v3.0
399 stars 29 forks source link

MP4 files fail to generate previews #93

Closed Decards closed 1 week ago

Decards commented 3 weeks ago

Hi,

When i unselect "show gifs only", it starts "caching wallpapers..." and nothing never happens i have 2 MP4s working with mpvpaper manually a gif and 2 pngs in my targeted folder.

Everytime it hangs on "caching wallpapers" and i can only see the gif i have.

when i unselect gif only i get that in my terminal :

Exception in thread Thread-2 (process_images): Traceback (most recent call last): File "/usr/lib/python3.12/threading.py", line 1075, in _bootstrap_inner self.run() File "/usr/lib/python3.12/threading.py", line 1012, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.12/site-packages/waypaper/app.py", line 329, in process_images cache_image(image_path, self.cf.cache_dir) File "/usr/lib/python3.12/site-packages/waypaper/app.py", line 47, in cache_image pixbuf = read_video_frame(str(image_path), cache_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/waypaper/app.py", line 36, in read_video_frame pixbuf = GdkPixbuf.Pixbuf.new_from_file(temp_frame) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Must be bytes, not PosixPath

anufrievroman commented 3 weeks ago

Looks like you have a file in your folder for which it can't build a preview for. If you could figure out which one that would be helpful. But anyway, we should make an exception for this case and just make a black rectangle.

Decards commented 3 weeks ago

I have tried adding files in my wallpaper folder one by one . its works until i add any of my .MP4s

anufrievroman commented 2 weeks ago

Okay, in the recent commits I tried to fix this, now it will show a black image if preview could not be generated. I couldn't test it at the moment. Please try if you have time.

Decards commented 2 weeks ago

I just tried it. It works flawlessly now, it's showing black placeholders for the MP4s. Thanks for your help !

anufrievroman commented 2 weeks ago

Thank you for reporting!

anufrievroman commented 1 week ago

I'll reopen this issue since indeed mp4 files don't generate previews, which is a shame since this is the most popular format.

anufrievroman commented 1 week ago

I think it's caused just by the fact that there are new library used not yet packaged as dependencies. Anyways, I now reimplemented the preview system, now it seems to work.