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
Have you rewrite the metadata back into the file before uploading?
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...
I rewrote the metadata using Metadata Fixer
@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

I think the metadata might be incorrect
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?
MediaGroupUUID
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
Yeah both should have the same
MediaGroupUUID
to be linked togetheralright, 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?
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).
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
Oh, this could be an issue specifically for albums. Did you upload them directly to the album?
I did
I ran the command
node bin/index.js upload --key <key> -al --server https://photos.domain/api ~/Desktop/tmp/2017\ -\ New\ York
When they are linked we set hidden to true for the video. Hidden assets are not shown on the timeline.
it's inconsistent in the album though, some are displaying correctly
What do you mean inconsistent?
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
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?
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)
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.
I agree with you at this point
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.
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
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
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
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.
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?
Yeah, that sounds good.
Maybe we can add a command/script etc. that makes it easy to clean these up.
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
Yeah, I wrote the linking code actually π
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?
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.
ah sure, that all runs in a background job?
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.
they definitely are π
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 albumswould the 3rd one work in this case if it's being added before it's hidden?
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
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
Yeah, in the UI you can't get to hidden assets to do anything with them.
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
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.
will do, I'll post a link here shortly
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...
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
Yeah, that seems like a general exif-google issue π
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?
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
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