-
Notifications
You must be signed in to change notification settings - Fork 0
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
linux%20administration/nextcloud-photos/ #4
Comments
Hello, this a very useful tutorial. But I had a problem, the exiftool command used here didnt work for me when I need to change the date of .mov or .mp4 files. In my case I had to use this command instead "-FileModifyDate<CreateDate" as they dont have the DateTimeOriginal original tag. |
@jbenitosantoni Thanks for the feedback! I'll look at adding some simple if/then logic to the script for video files which don't have the same EXIF data as photos. |
Hi, this is great. I use Nextcloud as a jail in TrueNAS. I had to adapt it to my setup. I have a couple problems: To start of first. In the Photo Sorting portion of your tutorial using the script for servers. It writes all photo filenames with metadata "create date" but in nextcloud the filenames remain with the old filenames. root@nextcloud-jail:~ # ls -al /usr/local/www/nextcloud/data/steven/files/Photos/'Steven Ipad'/2019/04/ Files in Nextcloud webpage Any ideas why this is happening. I think maybe mysql db is not updating with the new filename. Thanks for help. |
@fly800 Make sure the last line of the server script is running successfully on your machine.
This command is what updates the Nextcloud db to recognize the name changes. Try running it on its own and see if you get a result. |
Thanks Ray,
I had to use <--all> at the end to make it work.
In my case sudo -u www php "$nextclouddir"/occ files:scan *--all*
Great works now thanks.
Steven Vézina
…On Sun, Mar 14, 2021 at 4:05 PM Ray Lyon ***@***.***> wrote:
@fly800 <https://github.com/fly800> Make sure the last line of the server
script is running successfully on your machine.
sudo -u www-data php "$nextclouddir"/occ files:scan
This command is what updates the Nextcloud db to recognize the name
changes. Try running it on its own and see if you get a result.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATHIJMSGVRXH4VUTRFBTZ43TDUCHLANCNFSM4WVQICGA>
.
|
Thanks for your guide. I am using gphtosync to pull my pictures of Google Photos. So a couple fo tips for those that are doing the same thing: All pictures synced from GPhotos are JPEGs, but they keep their original file extension. This is going to mess things up in both exiftool and media players. So I change all extensions to .jpg find "$albumdir" -type f -name '.PNG' -print0 | xargs -0 rename 's/.PNG$/.jpg/' @jbenitosantoni exiftool -if 'not defined $datetimeoriginal' "-FileModifyDate>DateTimeOriginal" -r "$albumdir" -overwrite_original first. No I can continue with the script from Ray. exiftool "-filemodifydate<datetimeoriginal" -r "$albumdir" -overwrite_original |
Ray, This is great. It takes exiftool a step further and uses tools I didn't realized Nextcloud even had. I like sorting my photos into directories based on date. I show how to that here. |
I keep having it say |
@Ap0them I am having the same issue. Have you found a solution yet? |
Yea I just gave up on Nextcloud & went to samba & photosync |
@Ap0them @jcm4atx Typically this error appears when exiftool finds a file that doesn't contain image metadata, like a video or document. The message will show for each applicable file but the script should still work on your other files with no output. Can you confirm whether or not your image files are being updated despite the error? |
@skoobasteeve I think it is actually mostly working for me. It may have just been taking longer to update filenames in the browser for some reason but they are looking good now. Something to note though, it looks like any photos I had that were in HEIC format (for a live photo from iphone) have now been separated into jpg and mov files. The still image jpeg looks like it updated filenames properly, but the mov file of the live photo doesn't have any metadata associated with it. Do you know if it is possible to insert metadata into a file based on the current filename? Most of my photos have a date and time already in the filename, so they just need metadata inserted based on that. Thanks for the awesome scripts by the way! |
@bpottle1 Great to hear! The issue is that video files don't have any EXIF metadata associated with them, they're just treated as standard files with the a modified date. You can manually change the modified date of a file using the |
@skoobasteeve @bpottle1 I modified the code so that it didn't change the file names when it was scanning. The Live Photo preview on Nextcloud appears to look if there are two files that have the same name one with a MOV extension and combines them into a Live Photo preview. Alternatively, I was thinking about setting it up so that whatever the JPG gets changed to try to change the MOV file to the same... but I haven't gotten a chance to test that one out. |
Yeah I was actually working on the same problem haha. I figured out how to make it not rename it if it is a Live Photo, but my OCD demands that they all have the same naming scheme 😂 so I’ll keep looking at it as well. |
I was already headed down the exiftool path to properly date sort my images. Unfortunately, I scanned old family pictures and gave them appropriate historical exif dates, but you cannot set a Windows file modification date prior to 1980. I see some pokes at getting Nextcloud to use the exif created date directly, but it appears not to be there yet. |
@RobMahn I feel your pain! Nextcloud Photos would be such a killer app if it supported EXIF data. For your case, seems like renaming the files based on the EXIF data and sorting by filename is your best bet. |
Thanks a lot for this guide, very useful for a NextCloud noob and enthusiast as me. A minor comment, according to NextCloud official documentation for previews, the |
I've had to modify it to make it work on docker containers with Ansible but this was very helpful. Thanks! |
Hello, I want to try the exiftool script on my server following your tutorial and before doing so I have a question. I have all my photos organized by subfolders in a main folder, my question is if I put the script in the root folder the program is able to recognize the photos in the subfolders or do I have to put the script in all the folders with photos. |
@belutz88 the script will go through all of the subfolders, when you run the script you specify the root directory to start in i.e. |
thanks for the reply vspaziani |
But my photos do have metadata. but it keeps telling me: |
Great tutorial. I have the images in external drives. Where does preview generator store the previews, along w/ the original images? |
I have nextcloud in a docker container on unraid. It says exiftool not found. What is best to do? The app memories (of nextcloud) does have exiftool, but if I start the script from within that folder, it still says it can't find exiftool. So it needs to be installed within my container somehow. |
@keesfluitman I'm also working with nextcloud container image. I haven't yet got to the point of exif usage but in any case the approach should be suitable for you: basically you can create your own image based on the official one adding to it whatever you need there. For instance: FROM nextcloud:latest
RUN apt-get update \
&& apt-get install -y libimage-exiftool-perl Then building the image locally with something like: docker build -t nextcloud-with-tools:latest . And start the container with this new custom image. It will depend on how is your setup how can you automate some of this for keeping it updated. I'm assuming you have the basic grasps for docker usage, hope this helps. Cheers |
thanks. But I run Unraid and found that using a plugin (NERD) i could easily install exiftool directly on unraid. Then running it (or even setting a script to run regularly) is possible. I just had all my video files that were in the same folder changed wrongly though, but I guess I just need to figure out how to change that properly... |
Ohh, nice! I'm kind of fixed with the idea of not using the host for anything and leave Nextcloud related stuff within its container, but I know is my own poison :) Pity for the error when applying the change but probably you can restore that soon. Cheers |
Hi, I liked your work and altough I'm not very expert I decided to give it a try but I'm failing with your script because of permission issues, for each photo I get: Warning: No writable tags set from /home/nextcloud-folder/data/ ... what am I doing wrong? I even tried with "sudo -u www-data exiftool ..." but it doesn't help |
@KonTiki1957 exiftool throws that error whenever it encounters a non-image file. It means that the file it tried to update the metadata for doesn't have the relevant metadata tag available. In theory, the script should have still worked on all the image files it found during the process. If you want to be sure, point the script at a specific directory containing your photos, not the entire |
Better Nextcloud Photo Albums with Preview Generator and Exiftool - Ray Against the Machine
If you host and use a Nextcloud server, you know that it’s good at many things. Unfortunately, displaying photos is not one of them.
https://rayagainstthemachine.net/linux%20administration/nextcloud-photos/
The text was updated successfully, but these errors were encountered: