I
Immichβ€’2y ago
Pixil

Uploading live photos via web

I've started uploading my photos from google takeout via the web interface. When I upload live photos the system recognizes and links the image with the video, but the image and video are both displayed as part of the library. When they upload from my iPhone the video portion is hidden and just the image is shown. Is there a way to achieve this same result with the web interface?
50 Replies
Alex Tran
Alex Tranβ€’2y ago
Have you rewrite the metadata back into the file before uploading?
Alex Tran
Alex Tranβ€’2y ago
GitHub
gphotos import + albums migration Β· immich-app immich Β· Discussion ...
gphotos import + albums With this guide, you STILL have to add images that are in multiple albums manually (except for the first instance of that image, so hopefully this isn’t too many) can get al...
Pixil
PixilOPβ€’2y ago
I rewrote the metadata using Metadata Fixer
Pixil
PixilOPβ€’2y ago
@Alex any thoughts on this? I'm pretty sure they're linking correctly since the photos show as live photos and I can play them. The video file just also shows next to it
No description
Alex Tran
Alex Tranβ€’2y ago
I think the metadata might be incorrect
Pixil
PixilOPβ€’2y ago
I'll try redoing the metadata fixing with mattwilson1024/google-photos-exif and see if it works any better I've gone through the page the linked and followed the workflow using mattwilson1024/google-photos-exif to fix the metadata and then uploading the photos using the cli. I'm still getting the same problem where photos are being linked but it's displaying both anyway. What metadata should they have that would be used to hide the video?
Alex Tran
Alex Tranβ€’2y ago
MediaGroupUUID
Pixil
PixilOPβ€’2y ago
looks like it's getting set on the picture but not the video it looks like the media group on the heic file is set to the same value as the content identifier on the video
Alex Tran
Alex Tranβ€’2y ago
Yeah both should have the same MediaGroupUUID to be linked together
Pixil
PixilOPβ€’2y ago
alright, I'll update my script to link them If I reupload the image will it update the metadata on the image or will I need to delete the images first?
jrasm91
jrasm91β€’2y ago
You'll need to delete and then re-upload Images with MediaGroupUUID are matched to videos with the same value in ContentIdentifier If you are seeing a live photo and a separate video. It's possible that is just a duplicate (image, video, video).
Pixil
PixilOPβ€’2y ago
something weird if definitely going on. I have a photo and associated mp4 file. I've double checked that the heic file links to the mp4 file. When I upload them to an album it shows two entries in the album, one for the live photo and one for the mp4 file. If I go to the main photos page it shows only one entry for the live photo
jrasm91
jrasm91β€’2y ago
Oh, this could be an issue specifically for albums. Did you upload them directly to the album?
Pixil
PixilOPβ€’2y ago
I did I ran the command node bin/index.js upload --key <key> -al --server https://photos.domain/api ~/Desktop/tmp/2017\ -\ New\ York
jrasm91
jrasm91β€’2y ago
When they are linked we set hidden to true for the video. Hidden assets are not shown on the timeline.
Pixil
PixilOPβ€’2y ago
it's inconsistent in the album though, some are displaying correctly
jrasm91
jrasm91β€’2y ago
What do you mean inconsistent?
Pixil
PixilOPβ€’2y ago
I can share my screen if you'd like to see but some live photos are displaying just the live photo and some are displaying both and some seem to display just the video even though the metadata is linked up correctly
jrasm91
jrasm91β€’2y ago
I think I understand what is happening - some video parts of a live photo are added to albums. A live photo is just two separate assets. One, either, or both can be added to an album. I'm not sure what exactly you have added to what albums, but it looks like maybe a combination of the two. Can you confirm that everything is showing up correctly in the timeline for your live photos?
Pixil
PixilOPβ€’2y ago
yes, it looks like they're displaying correctly in my timeline (I have some from a different album that aren't, but I think the metadata might be broken on those, I processed and uploaded them differently)
jrasm91
jrasm91β€’2y ago
To be clear, I don't think this is necessarily related to live photos getting link/not linking correctly, but which parts of each live photo (still vs motion) was added to what albums.
Pixil
PixilOPβ€’2y ago
I agree with you at this point
jrasm91
jrasm91β€’2y ago
Ideally you want only stills added to albums. But they got added before we knew they were live photos and we don't auto remove them from albums when they are linked. If this is just a few here and there you could manually remove them from the associated albums. If you have a lot of them... we could try something else. Like a database delete to remove hidden assets from albums.
Pixil
PixilOPβ€’2y ago
I'm loading in around 30k photos, so it will be whatever subset of those load in wrong the case I don't quite understand is a photo where the video was added to the album but the photo wasn't yet it's correctly a single live photo in the timeline never mind, it's in there correctly, just not where I expected it. I think the timestamp on the video is wrong looks like it's just the problem with videos getting loaded before the image
jrasm91
jrasm91β€’2y ago
That would make more sense actually. Both assets are added to the album, but don't appear next to each other due to some exif timestamp discrepancies between the two In this case one probably shows up as a live photo and you also see the video next to it? Or somewhere else in the album
Pixil
PixilOPβ€’2y ago
In some cases I see a live photo with a video next to it and in others the video is off by a few rows In general I've had some trouble with video timestamps after exporting from google I think it's messing up timezones
jrasm91
jrasm91β€’2y ago
Exif is a mess, even more so when it comes to videos. It sounds like removing videos from albums that are live photos would solve the issue for you though.
Pixil
PixilOPβ€’2y ago
it does, should I write up an issue about this problem so it's tracked somewhere since it's going to be a problem for anyone importing live photos?
jrasm91
jrasm91β€’2y ago
Yeah, that sounds good. Maybe we can add a command/script etc. that makes it easy to clean these up.
Pixil
PixilOPβ€’2y ago
thanks a lot for helping figure it out. I was half way through writing a program to make sure the exif data was set to properly link them when you came along
jrasm91
jrasm91β€’2y ago
Yeah, I wrote the linking code actually πŸ™‚
Pixil
PixilOPβ€’2y ago
I'm not sure how the uploading is written, but would it be possible to add an additional pass that removes any files from the album that were linked to?
jrasm91
jrasm91β€’2y ago
Yes, but it is complicated. It may happen before or after the metadata extraction finishes, which is where/when the files are converted to live photos.
Pixil
PixilOPβ€’2y ago
ah sure, that all runs in a background job?
jrasm91
jrasm91β€’2y ago
Yeah, it's in the jobs panel as one of the jobs and they get queued up. They could still be running after the cli finishes uploading everything and creates the albums.
Pixil
PixilOPβ€’2y ago
they definitely are πŸ™‚
jrasm91
jrasm91β€’2y ago
A few options are: - Add a new cli command to clean up these situations that you could manually run after the jobs finish. Something like immich fix-live-photos-in-albums lol - Enhance the linking process to auto remove them from the albums. Something like when a photo/video are linked, check if they are both in an album and remove the video in that case - Prevent hidden assets from being added to albums
Pixil
PixilOPβ€’2y ago
would the 3rd one work in this case if it's being added before it's hidden?
jrasm91
jrasm91β€’2y ago
2 and 3 together could work I think. If it is added before it is linked, linking would remove it If it is added after it is linked, preventing hidden would also prevent it from being added
Pixil
PixilOPβ€’2y ago
sure, I guess I don't know how I'd go about adding a hidden asset to an album but it can't hurt to prevent it
jrasm91
jrasm91β€’2y ago
Yeah, in the UI you can't get to hidden assets to do anything with them.
Pixil
PixilOPβ€’2y ago
2 would be the ideal solution for me, but I could make do with 1 since this mass import should be a one time thing
jrasm91
jrasm91β€’2y ago
There's not a hard reason to disallow adding hidden assets. I don't know of any specific use cases for it, but we left it open in case someone wanted to write some script or something that used that feature. Well, until now when we have this video problem πŸ™‚ If you could open a github issue to track this, that would be great.
Pixil
PixilOPβ€’2y ago
will do, I'll post a link here shortly
Pixil
PixilOPβ€’2y ago
GitHub
[BUG] Uploading live photos directly to an album doesn't hide the v...
The bug When uploading live photos directly to an album, either through the web ui or the cli, some photos will have both a live photo and the video file added to the album. After talking to @jrasm...
Pixil
PixilOPβ€’2y ago
interestingly it's the timestamp on the picture that's wrong, not the video, but only for live photos. For non-live photos the timestamp on the photo seems fine... but that's not an immich problem
jrasm91
jrasm91β€’2y ago
Yeah, that seems like a general exif-google issue πŸ™‚
Pixil
PixilOPβ€’2y ago
I guess the harder they make it to move away the nicer that $2 a month looks slightly unrelated to this thread, but I was fixing the dates on some of the files I mentioned above and now the albums they're in are treating the file's date as today for album sorting but displaying the date I set as the date of the asset is it using different exif tags for the asset's date and album sorting?
jrasm91
jrasm91β€’2y ago
Yeah, it seems dumb, but it looks like they are sorted (by default) based on when the asset was added to immich, not the date of the image. That should be an easy fix though. AFAIK we have like 100 tickets related to album sorting haha
Pixil
PixilOPβ€’2y ago
It looks like it's not consistent between the mobile app on the web client. On the web it seems to use the most recent created date of the photos and on mobile it's using the created date of the album

Did you find this page helpful?