-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Video Thumbnails Failing to Generate on NextCloud Snap #1327
Comments
Note that the snap is confined, and will be unable to access the ffmpeg you have installed on your host. If that's required in order to generate these thumbnails (not something I know for sure), I'm afraid this won't be possible. |
This is a general issue, right? Not an individual and specific configuration question of one user. Video thumbnails are not generated in the snap. At this point one assumption as to why that happens is a missing dependency in the snap, e.g. ffmpeg (?) Should ffmpeg then be bundeled in the snap (if the assumption as to why it fails is true)? |
Here's a conversation in an old nextcloud issue mentioning the dependency to ffmpeg and/or avconf nextcloud/server#2011 (comment) So indeed, in order to generate video thumbs, those additional dependencies must be installed and currently there is no way to do it in the snap version (apart from shipping ffmpeg with the snap). Or is it possible somehow? |
Duplicate: #1314 |
Is there a reason for not including ffmpeg in the snap? |
I am very unlucky because of the lack of ffmpeg content in snap nextcloud. Due to the lack of this library, I am forced to install nexcloud manually. The developers promised that it would be fast and good with snap, and it is as usual... ;( |
@kyrofa - would you accept a PR that appended ffmpeg to the snap ? |
@per2jensen I'd be willing to entertain the idea. Depends on how much bloat and new code it introduces, and I'll need to give ffmpeg a review from a security standpoint. |
Both security and bloat are important points, take a look and decide. |
It looks like ffmpeg can be pulled from core18. Saw an ffmpeg with a 2018 timestamp in one of my build tries earlier this evening. |
You're spot on. If you can make stage-packages work I would agree that is preferable. |
I have a snap running with ffmpeg, but struggle to persuade "previewgenerator" doing movie previews. previewgenerator expects to be run from cron every so often. Does the snapped NC include a cron, if yes I have not yet found out how to set it up. |
@per2jensen Just in case: did you append the following config to
After adding that, I believe they should be generated when you run Thanks for looking into it 👍 |
Can one use a static build of ffmpeg if sudo snap connect nextcloud:removable-media is enabled? How to set this up? Where to write the path to ffmpeg in the nextcloud snap? I think it is a pain in the eyes that there are no thumbnails of videos as the photos app shows them but one can't discern by a generic thumbnail. I propose to disable the showing of video thumbnails in the photos app if ffmpeg is not included but how to do it @kyrofa? |
@per2jensen the snap has something that runs the nextcloud cron.php at various intervals: https://github.com/nextcloud/nextcloud-snap/blob/master/src/nextcloud/bin/nextcloud-cron |
Is there a solution for this problem yet? I still cannot generate thumbnails in nextcloud snap. Thanks |
Good afternoon, also tormented by this problem, tell me did not solve it? |
I'm not a developer but I found this in the snap documentation: https://snapcraft.io/docs/thumbnailer-service-interface Idea: Could it be used (after connecting it) by the preview app (for instance as option to set via occ command) so that snaps can create previews as well? It would be great for nextcloud snap users! 🙂 |
I am also an user in queue to get video previews / thumbnails. My installation details => Ubuntu 20 LTS / Snap NextCloud 22.2.3 Is there any update to this thread? For getting video thumbnails? Thanks. |
Another user without video thumbnails here! Why isn't this fixed? |
As I've said before, I'm willing to review a PR that adds ffmpeg/libav if someone wants to take a crack at this.
Because we're volunteers and have a finite amount of time that needs to be prioritized. |
Got it. Sorry! I didn't mean for it to sound like that. |
I decided to rebuild to a lamp stack. |
@kyrofa do you think it would be possible to use this https://forum.snapcraft.io/t/using-chromium-ffmpeg-in-third-party-browser-snaps/6545 instead? |
@pachulo I don't trust that type of thing to stick around or stay stable, to be honest. |
Is there not a hacky way to achieve this on our personal servers? |
Yes, it was a bit uncharitable and I apologize. I was frustrated that, after having fumbled for days trying to fix it, I finally discover it is un-fixable. Then I had to move all my stuff somewhere else, delete the snap and re-install the regular version so nextcloud could work as it should. For me, thumbs for vids is a basic necessity. You are also correct in saying that if I want a functionality, I should add it. As I (also) don't have the time, I will take your advice and use another version. However, and to be fair to your users, I think you should warn your users that this basic functionality will not be available in the snap version. If I had known, I would not have used the snap in the first place, and saved myself a ton of headache with all the work required to migrate to another setup. Finally, I would like to say that I greatly value all the work you have done for this project which really, really simplifies the installation and updating process of Nextcloud, and makes a self-hosted Nextcloud a possibility for a much larger group than the original version appeals to. I would go so far as to say that I would happily pay for your version (with working vid thumbs of course) if I found it somewhere else. This is the problem with open source. People forget or procrastinate with donations, but if they are charged up front, many will be happy to pay, but I'm drifting into another subject now... |
This should enable the creation of Movie files thumbnails Fixes nextcloud-snap#1327
By adding ffmpeg and libslang2 to php stage-packages. Also trim some unnecesary folders from the installed packages. Fixes nextcloud-snap#1327
Looks like we're close to a fix for the snap version? See this PR from @pachulo Seems all we need is feedback from @kyrofa on whether the switch from the Universe PPA to this PPA and validation that the static build approach is a non-starter. Who knows when that will happen? With 5 kids, robots, and us ingrates making demands, might be a while. |
I just have 2 questions:
|
Hello,
The official Docker based Nextcloud AIO doesn't have this issue. Thanks. |
Summarizing this for any other unfortunate souls that installed Nextcloud via snap: There is no fix for your issue. Stop the hunt, and give up.. Uninstall the snap (sudo snap remove nextcloud), and reinstall via docker (https://github.com/nextcloud/docker) and avoid using this snap (and all other snaps for that matter) in the future. |
Dear, I can understand your frustration. But let me clarify to the readers, that after hours of work by many people who voluntarily put their hands to work (@kyrofa , @pachulo , @szaimen , @Jachhj-sc , @shaman79 , and others.) , it is possible to see the previews of the images and videos using SNAP. I was frustrated for a long time because it couldn't be done, but now if it's possible, I'll share what I have running in case it helps: environment data:SO - Distributor ID: Ubuntu - Description: Ubuntu 20.04.6 LTS - Codename: focal SNAP Preview Generator 5.3.0 install ffmpeg I suggest you use memories, it has some improvements over Photos and include ffmpeg and exiftool I hope it's helpful if you want to return to SNAP. |
hello, I followed the tutorial except that it does not work, can you detail a little more the steps to follow please. thanking you in advance |
Dear, trying to help In my Jul-10, 2023 post, I tried to comment on the versions I use and how I got the video previews to work. If I think of a step by step, I hope I don't forget anything:
Here more info. https://github.com/nextcloud/previewgenerator
Here an illustrative example, related to what we talked about here, the file contains much more data:
Various Memories settings can be done from the Nextcloud backend (admin user) by selecting settings->memories After the above, I suggest you do: Force re-index all files: Right now, after the long day at work, I can't think of any other suggestions. I hope they help you & someone else |
Good morning, Thank you for your answer but it still doesn't work: if I put this path there: /var/snap/nextcloud/bin/ffmpeg I don't remember it finding the ffmpeg executable. so I placed it here: /var/snap/nextcloud/common/nextcloud/data/bin/ffmpeg-git-20230721-amd64-static/ffmpeg there it recognizes it fine however still no video thumbnail even after typing the commands above. Will everything be integrated in a future version? |
hello I managed to configure the same path as you /var/snap/nextcloud/bin my ffmpeg and ffprobe are well seen in memories I have restarted an indexing but still the same no videos thumbnail. are you available to help me in remote maintenance please? wishing you a pleasant day |
it's good everything finally works! I put this line: */30 * * * * nextcloud.occ preview:pre-generate is that enough? |
Great to hear that everything works!with patience and dedication the benefits come! I hope you enjoy your video/image thumbnails I shared my line in the contrab (#1327 (comment)), it is the same as what you write. needed to generate preview for new files if applicable. Today we laugh :-) and celebrate because you made it |
Thank you for your answer, |
Folks, Just want to share that I had been struggling with this issue for weeks now and what worked was putting the binaries inside You can have ffmpeg in /usr/bin/ffmpeg, run the command in verbose mode and see all the "Generating views for..." messages but none of that really matters because it doesn't work. If someone is still having troubles:
Maybe the Memories app isn't even necessary, but it's such a better app than Photos (because it works) that I'd rather keep it. The problem with photos is that no matter what kind of sorting method I use (by date modified/created/uploaded), my gallery is always messed up. The memoirs state that "Sort photos and videos by capture date, parsed from Exif data". and it works perfectly. But this is another topic... |
HI, so if I understood correctly, you managed to make it work, we can count it as another case that you can see the previews of photos and videos? |
Yes, working on both: web and mobile |
Confirmed got my config working too now. Previews on video's and photos |
After @FedeBx steps mine still failed on Videos (MP4), tried and check that even on memories is showing fine, but nothing seems to make it work. |
Hi, any suggestions:
if it fails again you will have to share information from your OS and Snap versions , configuration file, -be careful to delete keys or security data before sharing- |
Worked, as you say, that little change there made the whole difference. Thanks and apologies that I didn't pay attention to it. |
you are welcome. you made it , congratulations!!! |
Many thanks FedeBx !!! Now I love my Nextcloud snap installation again ! In my case it works without re-indexing, the only advise I can give to others is to uninstall ffmpeg in case was installed previously as snap pakcage. I'm not 100% sure, but in my case regardless changes in paths (config.php) previews were not working until snap version of ffmpeg was removed and cron job for preview generator added. |
I am running Ubuntu Server version 20.04 LTS and successfully installed NextCloud Snap; however, video thumbnails are not working.
I installed FFmpeg and edited the config.php with the following text:
But the same issue of not video thumbnails is occurring. Any assistance you might be able to provide would be incredibly helpful.
Thank you so much!
The text was updated successfully, but these errors were encountered: