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
Import: Extract metadata with Exiftool so that video filepath uses the actual creation date #810
Comments
This is because files are first moved, then indexed. However, PhotoPrism can't natively read video metadata - so the "real" date is unknown and the file system date is used. The indexer later won't move any files, so the "mistake" is not corrected. For now, it seems best for you to manually copy files to originals if the correct folder with the right date is critical for you. Mobile sync apps often already structure uploads in sub-folders using YEAR/MONTH, so you don't need to use import in this case. |
Note that videos don't use Exif. Exiftool also reads other metadata models & formats, other than its name suggests. |
Ah - so I'm curious then, PhotoPrism is correctly identifying the date in the UI, and the sidecar .yml file has picked up the 'TakenAt' date:
Shouldn't the 'TakenAt' date be used for the file naming too? |
That's what I mean: The INDEXER uses Exiftool, but the IMPORTER doesn't as importing happens before indexing. |
Thank you for your help - one quick question if I may, for the files that are already imported, as there's no delete function - if I simply remove the files from the originals/ directory will PhotoPrism automatically clean up all associated sidecar files and so on? If so, do I need to re-index for that clean up to happen? |
Yes. If you don't delete via WebDAV, you have to manually trigger indexing as there is no way for PhotoPrism to know when you're done. |
You may also move files, PhotoPrism should automatically update the index (again, when you trigger indexing or use WebDAV). |
It's part of our latest release, see https://github.com/photoprism/photoprism/releases/tag/210104-7f9e806a Let us know if importing works for you as expected! |
This works perfectly now, thank you - very impressed with the quick response here and PhotoPrism overall! |
Thank you ❤️ Glad we have such an amazing community! |
tl;dr - importing mp4 videos from import/ -> originals/ seems to be ignoring the exif data for determining the new filename in originals/, it's using the file modification time only causing new filename to be incorrect.
I'm importing mp4 video files from import directory to originals directory. Import is being triggered via web interface with the 'move' option selected.
The photos were all correctly moved to year/month/filename structure using exif data to determine when they were taken, but the mp4 videos were all moved into that structure using the file modification times only (ignoring exif). Looking in the logs, I noticed all the mp4 files have messages similar to this one, showing file mod time was used:
Note, despite this, the photoprism web interface correctly shows the file as being taken in 2015, but the file has been renamed to a 2021 filename based on the file modification time which is a bit confusing if looking directly at the 'originals' directory.
The exif data for one of the renamed files is as below:
Using docker version 201231-8e22fbf8-Linux-x86_64
The text was updated successfully, but these errors were encountered: