ShaneIsrael / fireshare

Self host your media and share with unique links

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No video posters/thumbnails

xzeldon opened this issue · comments

Describe the bug
No thumbnails are generated after scanning the library

To Reproduce

  1. Upload a video through the UI
  2. Wait or start scanning the library

Expected behavior
Thumbnails are generated after scanning the library

Screenshots
image

Desktop (please complete the following information):

  • Chromium Version 112.0.5615.50 (Official Build) (64-bit)

Additional context
Error log:

fireshare  | 2023-06-18 19:23:24,114 INFO    cli.sync_metadata:149 | Found 2 videos without metadata
fireshare  | Traceback (most recent call last):
fireshare  |   File "/usr/local/bin/fireshare", line 8, in <module>
fireshare  |     sys.exit(cli())
fireshare  |   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
fireshare  |     return self.main(*args, **kwargs)
fireshare  |   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
fireshare  |     rv = self.invoke(ctx)
fireshare  |   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
fireshare  |     return _process_result(sub_ctx.command.invoke(sub_ctx))
fireshare  |   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
fireshare  |     return ctx.invoke(self.callback, **ctx.params)
fireshare  |   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
fireshare  |     return __callback(*args, **kwargs)
fireshare  |   File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
fireshare  |     return f(get_current_context(), *args, **kwargs)
fireshare  |   File "/usr/local/lib/python3.9/site-packages/fireshare/cli.py", line 280, in bulk_import
fireshare  |     ctx.invoke(sync_metadata)
fireshare  |   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
fireshare  |     return __callback(*args, **kwargs)
fireshare  |   File "/usr/local/lib/python3.9/site-packages/fireshare/cli.py", line 154, in sync_metadata
fireshare  |     while not integv.verify(vpath):
fireshare  |   File "/usr/local/lib/python3.9/site-packages/integv/__init__.py", line 57, in verify
fireshare  |     return FileIntegrityVerifier().verify(file, file_type)
fireshare  |   File "/usr/local/lib/python3.9/site-packages/integv/__init__.py", line 48, in verify
fireshare  |     raise ValueError("file_type is required for binary input")
fireshare  | ValueError: file_type is required for binary input

../videos/uploads contents:

total 14176
drwxr-xr-x 2 zeldon zeldon    4096 Jun 18 19:00  ./
drwxr-xr-x 3 zeldon zeldon    4096 Jun 18 18:54  ../
-rw-r--r-- 1 zeldon zeldon 9526124 Jun 18 19:00 '2022-05-25 00-02-49.mp4'
-rw-r--r-- 1 zeldon zeldon 4979028 Jun 18 18:54 '2023-04-08 20-12-10.mp4'

You have a video (or file) in your videos folder that does not have a file type. You videos folder should only contain video files. If they don't have a file type on them or if you have a file that is not a video in there that is what is causing the problem. The scan is failing before it gets to the step of creating the thumbnails.

Check your /videos path.

In /videos directory only one file: image, but thumbnails are not created.
Log:

fireshare  | 2023-06-18 23:37:22,162 INFO    __init__.update_config:27 | Validating configuration file...
fireshare  | 2023-06-18 23:37:22,180 INFO    cli.create_posters:227 | Checking for videos with missing posters...
fireshare  | 2023-06-18 23:37:22,180 WARNING cli.create_posters:232 | Skipping creation of poster for video 07d60f8bdfe60ef6a1957f13cda543a1 because the video at /processed/video_links/07d60f8bdfe60ef6a1957f13cda543a1.mp4 does not exist or is not accessible
fireshare  | 2023-06-18 23:37:22,180 INFO    cli.bulk_import:286 | Finished bulk import. Timing info: {"scan_videos": 0.04590892791748047, "sync_metadata": 0.020049571990966797, "create_posters": 0.01930689811706543}

Well right there in your log it says one of your videos is not accessible.

Delete the videos via the fireshare ui and try uploading a video again. Make sure you have 0 videos. If you don't delete them with the fireshare ui they will still be in the database creating issues. OR you can delete everything in the /data and /processed folders and restart the application and see if that solves the issue.

This was an error on my end when coding #199
I'll make a patch and pull request it in ASAP

Fixed in #202 Waiting for the pull request to be accepted

@J-Stuff Ah! Thank you for catching that. I never came across that issue since I haven't added a new video in a while myself.

@xzeldon Here in about 45 minutes you can pull down a new docker container tagged v1.2.11 or latest which includes @J-Stuff fix. Please let me know if that resolves the issue.

@ShaneIsrael Ok I pulled the develop tag and the problem may have been solved, but the thumbnail is still not generated. The error message is gone, but the following warning appears:

fireshare  | 2023-06-20 16:14:58,104 WARNING cli.sync_metadata:186 | Missing or invalid symlink at /processed/video_links/07d60f8bdfe60ef6a1957f13cda543a1.mp4 to video 07d60f8bdfe60ef6a1957f13cda543a1 (original location: 123.mp4)

It is worth mentioning that my instance of Fireshare is running inside a Docker container that is running in an LXC container on the Proxmox host with ext4 filesystem.

I created a Qemu virtual machine, pulled the develop tag and everything seems to work as it should, thumbnails are created...
It seems that the problem was actually related to running inside the LXC container.

Anyway, thank you all for your help!

@xzeldon Awesome. Glad you were able to figure it out.

Keep in mind, the develop tag will always be updated with what is on the develop branch which is more likely to have an issue or not work at all. I would either use the latest tag or hard set it to v1.2.11. Latest is always the latest production ready build which is less likely to be plagued with an issue.

@ShaneIsrael Thank you! I will do so. It's just that at the time of testing the v1.2.11 tag was not on the Docker Hub.