[BUG] Pixel Motion Photos only show a single frame #1155

Closed
opened 2026-02-05 00:39:35 +03:00 by OVERLORD · 22 comments
Owner

Originally created by @zsolt-donca on GitHub (Jul 25, 2023).

The bug

Motion photos that I took on my Pixel 7 don't seem to play well the newest release. When I click the video icon on the photo, it changes to the first frame of the video, but the video does not play (the same frames is stuck on the screen), even though it plays 2-3 seconds according to the controls at the bottom of the screen.

I experience the same behavior both in the web (Firefox) and on mobile.

The OS that Immich Server is running on

Arch

Version of Immich Server

1.69.0 build.92

Version of Immich Mobile App

1.69.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Default

Your .env content

Default

Reproduction steps

1. Take a motion photo with Google Camera (using Pixel 7)
2. Open the photo in Immich on the mobile or on the web
3. Hit play, and notice that it does not play (even though the actual shot changes when compared to the photo)

Additional information

No response

Originally created by @zsolt-donca on GitHub (Jul 25, 2023). ### The bug Motion photos that I took on my Pixel 7 don't seem to play well the newest release. When I click the video icon on the photo, it changes to the first frame of the video, but the video does not play (the same frames is stuck on the screen), even though it plays 2-3 seconds according to the controls at the bottom of the screen. I experience the same behavior both in the web (Firefox) and on mobile. ### The OS that Immich Server is running on Arch ### Version of Immich Server 1.69.0 build.92 ### Version of Immich Mobile App 1.69.0 ### Platform with the issue - [ ] Server - [X] Web - [X] Mobile ### Your docker-compose.yml content ```YAML Default ``` ### Your .env content ```Shell Default ``` ### Reproduction steps ```bash 1. Take a motion photo with Google Camera (using Pixel 7) 2. Open the photo in Immich on the mobile or on the web 3. Hit play, and notice that it does not play (even though the actual shot changes when compared to the photo) ``` ### Additional information _No response_
Author
Owner

@zsolt-donca commented on GitHub (Jul 25, 2023):

Note that I have the following errors in my logs:

immich_postgres          | 2023-07-20 08:27:02.874 UTC [179] ERROR:  duplicate key value violates unique constraint "UQ_userid_checksum"
immich_postgres          | 2023-07-20 08:27:02.874 UTC [179] DETAIL:  Key ("ownerId", checksum)=(d30dd4c8-53c2-4f26-81f2-f7b743ac76e0, \xe541e7fba9ad80b99e4082b3b97b7b4f1ca312bc) already exists.
immich_postgres          | 2023-07-20 08:27:02.874 UTC [179] STATEMENT:  INSERT INTO "assets"("id", "deviceAssetId", "ownerId", "deviceId", "type", "originalPath", "resizePath", "webpPath", "thumbhash", "encodedVideoPath", "createdAt", "updatedAt", "fileCreatedAt", "fileModifiedAt", "isFavorite", "isArchived", "isReadOnly", "checksum", "duration", "isVisible", "livePhotoVideoId", "originalFileName", "sidecarPath") VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, DEFAULT, DEFAULT, $10, $11, $12, $13, $14, $15, $16, $17, DEFAULT, $18, $19) RETURNING "id", "webpPath", "encodedVideoPath", "createdAt", "updatedAt", "isFavorite", "isArchived", "isReadOnly", "isVisible"

Which makes my issue similar to https://github.com/immich-app/immich/issues/3411

UPDATE: these are probably unrelated, as these are not fresh errors. I've been seeing them since at least a month ago:

immich_postgres          | 2023-06-27 10:45:11.081 UTC [4677] ERROR:  duplicate key value violates unique constraint "UQ_userid_checksum"
immich_postgres          | 2023-06-27 10:45:11.081 UTC [4677] DETAIL:  Key ("ownerId", checksum)=(d30dd4c8-53c2-4f26-81f2-f7b743ac76e0, \x0c904c7b723fcb2ec7a3f29b77a9eec19d4c4e91) already exists.
immich_postgres          | 2023-06-27 10:45:11.081 UTC [4677] STATEMENT:  INSERT INTO "assets"("id", "deviceAssetId", "ownerId", "deviceId", "type", "originalPath", "resizePath", "webpPath", "thumbhash", "encodedVideoPath", "createdAt", "updatedAt", "fileCreatedAt", "fileModifiedAt", "isFavorite", "isArchived", "isReadOnly", "mimeType", "checksum", "duration", "isVisible", "livePhotoVideoId", "originalFileName", "sidecarPath") VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, DEFAULT, DEFAULT, $10, $11, $12, $13, $14, $15, $16, $17, $18, DEFAULT, $19, $20) RETURNING "id", "webpPath", "encodedVideoPath", "createdAt", "updatedAt", "isFavorite", "isArchived", "isReadOnly", "isVisible"
@zsolt-donca commented on GitHub (Jul 25, 2023): Note that I have the following errors in my logs: ``` immich_postgres | 2023-07-20 08:27:02.874 UTC [179] ERROR: duplicate key value violates unique constraint "UQ_userid_checksum" immich_postgres | 2023-07-20 08:27:02.874 UTC [179] DETAIL: Key ("ownerId", checksum)=(d30dd4c8-53c2-4f26-81f2-f7b743ac76e0, \xe541e7fba9ad80b99e4082b3b97b7b4f1ca312bc) already exists. immich_postgres | 2023-07-20 08:27:02.874 UTC [179] STATEMENT: INSERT INTO "assets"("id", "deviceAssetId", "ownerId", "deviceId", "type", "originalPath", "resizePath", "webpPath", "thumbhash", "encodedVideoPath", "createdAt", "updatedAt", "fileCreatedAt", "fileModifiedAt", "isFavorite", "isArchived", "isReadOnly", "checksum", "duration", "isVisible", "livePhotoVideoId", "originalFileName", "sidecarPath") VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, DEFAULT, DEFAULT, $10, $11, $12, $13, $14, $15, $16, $17, DEFAULT, $18, $19) RETURNING "id", "webpPath", "encodedVideoPath", "createdAt", "updatedAt", "isFavorite", "isArchived", "isReadOnly", "isVisible" ``` Which makes my issue similar to https://github.com/immich-app/immich/issues/3411 UPDATE: these are probably unrelated, as these are not fresh errors. I've been seeing them since at least a month ago: ``` immich_postgres | 2023-06-27 10:45:11.081 UTC [4677] ERROR: duplicate key value violates unique constraint "UQ_userid_checksum" immich_postgres | 2023-06-27 10:45:11.081 UTC [4677] DETAIL: Key ("ownerId", checksum)=(d30dd4c8-53c2-4f26-81f2-f7b743ac76e0, \x0c904c7b723fcb2ec7a3f29b77a9eec19d4c4e91) already exists. immich_postgres | 2023-06-27 10:45:11.081 UTC [4677] STATEMENT: INSERT INTO "assets"("id", "deviceAssetId", "ownerId", "deviceId", "type", "originalPath", "resizePath", "webpPath", "thumbhash", "encodedVideoPath", "createdAt", "updatedAt", "fileCreatedAt", "fileModifiedAt", "isFavorite", "isArchived", "isReadOnly", "mimeType", "checksum", "duration", "isVisible", "livePhotoVideoId", "originalFileName", "sidecarPath") VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, DEFAULT, DEFAULT, $10, $11, $12, $13, $14, $15, $16, $17, $18, DEFAULT, $19, $20) RETURNING "id", "webpPath", "encodedVideoPath", "createdAt", "updatedAt", "isFavorite", "isArchived", "isReadOnly", "isVisible" ```
Author
Owner

@alextran1502 commented on GitHub (Jul 25, 2023):

Can you post a sample file for troubleshooting?

@alextran1502 commented on GitHub (Jul 25, 2023): Can you post a sample file for troubleshooting?
Author
Owner

@zsolt-donca commented on GitHub (Jul 25, 2023):

Sure: PXL_20230725_143859434 MP

@zsolt-donca commented on GitHub (Jul 25, 2023): Sure: ![PXL_20230725_143859434 MP](https://github.com/immich-app/immich/assets/6824167/6c72a59c-b85a-4c77-9192-fd33ab200c00)
Author
Owner

@zsolt-donca commented on GitHub (Jul 25, 2023):

If it helps, I can create a recording of my mobile screen where I open the above photo, both with Immich and with Google Photos.

@zsolt-donca commented on GitHub (Jul 25, 2023): If it helps, I can create a recording of my mobile screen where I open the above photo, both with Immich and with Google Photos.
Author
Owner

@alextran1502 commented on GitHub (Jul 25, 2023):

Yes please

@alextran1502 commented on GitHub (Jul 25, 2023): Yes please
Author
Owner

@zsolt-donca commented on GitHub (Jul 25, 2023):

Video with google photos: https://cloud.cozycozy.space/s/ggjd5Hr5DdKYmLx
Video with Immich: https://cloud.cozycozy.space/s/KQCsQxW52ciDtyC

@zsolt-donca commented on GitHub (Jul 25, 2023): Video with google photos: https://cloud.cozycozy.space/s/ggjd5Hr5DdKYmLx Video with Immich: https://cloud.cozycozy.space/s/KQCsQxW52ciDtyC
Author
Owner

@Inrego commented on GitHub (Aug 14, 2023):

I experience the same. If I can contribute with any other information, let me know.

@Inrego commented on GitHub (Aug 14, 2023): I experience the same. If I can contribute with any other information, let me know.
Author
Owner

@jrasm91 commented on GitHub (Aug 15, 2023):

I think I've found the root issue - ffmpeg by default picks only one video stream the default picking mechanism uses highest resolution1 . The google motion pictures actually have two video streams. The first one is the one we want. But, it has a second one that has a higher resolution, so it is getting picked. The second video stream is very, very short.

@jrasm91 commented on GitHub (Aug 15, 2023): I think I've found the root issue - ffmpeg by default picks only one video stream the default picking mechanism uses highest resolution[^1]. The google motion pictures actually have two video streams. The first one is the one we want. But, it has a second one that has a higher resolution, so it is getting picked. The second video stream is very, very short. [^1]: https://ffmpeg.org/ffmpeg.html#Automatic-stream-selection
Author
Owner

@zsolt-donca commented on GitHub (Aug 31, 2023):

The fix does not work for me. I am on version 1.76.1, and with the exception of a single motion-picture that I took, on the mobile all of my motion pictures show a very similar behavior as originally reported here: I only see a single frame, but it shows for longer. That single exception seems to play well on mobile for some reason, but it's like 1 out of 10, and I cannot reproduce it.

On the web, none of the videos play, including the one that works on mobile. When in full screen on an image, the behavior is actually browser-dependent: in Firefox I see a gray screen with the error message "No video with supported format and MIME type found":

image

while in Chrome, the video loader will just keep spinning forever:

image

Still on the web, on both browsers, when hovering over the little "Play" icon with the mouse, the icon changes into a red circle with an exclamation, which happens for motion pictures videos:

image

Should I open a separate bug for this issue? What details would you need for investigating?

@zsolt-donca commented on GitHub (Aug 31, 2023): The fix does not work for me. I am on version 1.76.1, and with the exception of a single motion-picture that I took, on the mobile all of my motion pictures show a very similar behavior as originally reported here: I only see a single frame, but it shows for longer. That single exception seems to play well on mobile for some reason, but it's like 1 out of 10, and I cannot reproduce it. On the web, none of the videos play, including the one that works on mobile. When in full screen on an image, the behavior is actually browser-dependent: in Firefox I see a gray screen with the error message "No video with supported format and MIME type found": ![image](https://github.com/immich-app/immich/assets/6824167/0ce76b25-4b23-474e-8525-7cda4b867379) while in Chrome, the video loader will just keep spinning forever: ![image](https://github.com/immich-app/immich/assets/6824167/3d54d2be-467f-49ff-bc55-3456737cd9de) Still on the web, on both browsers, when hovering over the little "Play" icon with the mouse, the icon changes into a red circle with an exclamation, which happens for motion pictures videos: ![image](https://github.com/immich-app/immich/assets/6824167/a5d4551f-8906-4521-86a0-e28824844fe2) Should I open a separate bug for this issue? What details would you need for investigating?
Author
Owner

@jrasm91 commented on GitHub (Aug 31, 2023):

Can you delete and re-upload the video and see if that changes anything?

@jrasm91 commented on GitHub (Aug 31, 2023): Can you delete and re-upload the video and see if that changes anything?
Author
Owner

@zsolt-donca commented on GitHub (Aug 31, 2023):

I just did that: deleted some of the motion photos on the web, and waited for the mobile app to re-upload them. I actually repeated the procedure twice. No change, exactly the same behavior as before.

@zsolt-donca commented on GitHub (Aug 31, 2023): I just did that: deleted some of the motion photos on the web, and waited for the mobile app to re-upload them. I actually repeated the procedure twice. No change, exactly the same behavior as before.
Author
Owner

@jrasm91 commented on GitHub (Aug 31, 2023):

OK. The cause of the original issue is related to video stream selection, but it looks like the linked PR didn't actually fix it. I'll take a look at this again.

@jrasm91 commented on GitHub (Aug 31, 2023): OK. The cause of the original issue is related to video stream selection, but it looks like the linked PR didn't actually fix it. I'll take a look at this again.
Author
Owner

@zsolt-donca commented on GitHub (Aug 31, 2023):

Thank you! Would my recent photos help investigating the issue, including the one that does work for some reason, and some of the new ones that don't?

@zsolt-donca commented on GitHub (Aug 31, 2023): Thank you! Would my recent photos help investigating the issue, including the one that does work for some reason, and some of the new ones that don't?
Author
Owner

@jrasm91 commented on GitHub (Aug 31, 2023):

I can let you know. I have one that also doesn't seem to work.

@jrasm91 commented on GitHub (Aug 31, 2023): I can let you know. I have one that also doesn't seem to work.
Author
Owner

@mertalev commented on GitHub (Aug 31, 2023):

OK. The cause of the original issue is related to video stream selection, but it looks like the linked PR didn't actually fix it. I'll take a look at this again.

It looks like the option in the PR doesn't do what I thought it did. Selecting a stream like -c:v:0 tells it to encode that particular stream, not to output that particular stream. The map flag is the way to go after all.

@mertalev commented on GitHub (Aug 31, 2023): > OK. The cause of the original issue is related to video stream selection, but it looks like the linked PR didn't actually fix it. I'll take a look at this again. It looks like the option in the PR doesn't do what I thought it did. Selecting a stream like `-c:v:0` tells it to encode that particular stream, not to output that particular stream. The `map` flag is the way to go after all.
Author
Owner

@mertalev commented on GitHub (Sep 3, 2023):

Should be fixed with #3775

@mertalev commented on GitHub (Sep 3, 2023): Should be fixed with #3775
Author
Owner

@zsolt-donca commented on GitHub (Sep 3, 2023):

Thank you, @mertalev, for taking care of this!

After the fix lands in a release, is there a way way for me to reprocess the motion pictures that I already have uploaded in my library, so that their video will play?

@zsolt-donca commented on GitHub (Sep 3, 2023): Thank you, @mertalev, for taking care of this! After the fix lands in a release, is there a way way for me to reprocess the motion pictures that I already have uploaded in my library, so that their video will play?
Author
Owner

@mertalev commented on GitHub (Sep 4, 2023):

You can re-process them by running the transcode job for all videos. There's no way to process only motion pictures, so this will also transcode normal videos too.

@mertalev commented on GitHub (Sep 4, 2023): You can re-process them by running the transcode job for all videos. There's no way to process only motion pictures, so this will also transcode normal videos too.
Author
Owner

@Rihcus commented on GitHub (Oct 1, 2023):

Sure: PXL_20230725_143859434 MP

Are motion photos working for you on server version v1.79.1? I tried taking the motion photo you uploaded and tried putting on the immich demo server. The option to view the motion part of the motion photos doesn't seem to be present. Similarly mobile apps don't seem to be able to detect motion photo.

image

Demo server version:
image

https://demo.immich.app/

@Rihcus commented on GitHub (Oct 1, 2023): > Sure: ![PXL_20230725_143859434 MP](https://user-images.githubusercontent.com/6824167/255937048-6c72a59c-b85a-4c77-9192-fd33ab200c00.jpg) Are motion photos working for you on server version v1.79.1? I tried taking the motion photo you uploaded and tried putting on the immich demo server. The option to view the motion part of the motion photos doesn't seem to be present. Similarly mobile apps don't seem to be able to detect motion photo. ![image](https://github.com/immich-app/immich/assets/30292597/7993c4ef-6df7-491d-b70c-45cd8cc0fd62) Demo server version: ![image](https://github.com/immich-app/immich/assets/30292597/f5615398-5db0-4860-95e8-6e7b2612e82f) https://demo.immich.app/
Author
Owner

@zsolt-donca commented on GitHub (Oct 2, 2023):

This feature indeed got broken in some recent release. It definitely worked after installing the release that came out just after @mertalev 's latest fix (mentioned above), but now it no longer works (new motion photos don't get recognized as such, even though my old motion photos already in the library still work).

Can we please have this reopened?

@zsolt-donca commented on GitHub (Oct 2, 2023): This feature indeed got broken in some recent release. It definitely worked after installing the release that came out just after @mertalev 's latest fix (mentioned above), but now it no longer works (new motion photos don't get recognized as such, even though my old motion photos already in the library still work). Can we please have this reopened?
Author
Owner

@alextran1502 commented on GitHub (Oct 2, 2023):

@zsolt-donca The regression has been fixed but not released yet

@alextran1502 commented on GitHub (Oct 2, 2023): @zsolt-donca The regression has been fixed but not released yet
Author
Owner

@FarisZR commented on GitHub (Aug 15, 2024):

the issue seems to be back again...
Edit: switching to h264 fixed it.

@FarisZR commented on GitHub (Aug 15, 2024): ~~the issue seems to be back again...~~ Edit: switching to h264 fixed it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1155