pulsejet / memories

Fast, modern and advanced photo management suite. Runs as a Nextcloud app.
https://memories.gallery
GNU Affero General Public License v3.0
3.19k stars 86 forks source link

Live photos don't play #1014

Closed thegrasshopper104 closed 7 months ago

thegrasshopper104 commented 9 months ago

Describe the bug Live photos from iPhones or Motion photos from android phones don't play. The live photo icon shows Tried in the web interface and the android app (1.6 from Google Play)

To Reproduce, upload some live photos.

Platform:

thegrasshopper104 commented 9 months ago

Here's a weird thing: Pixel photos edited using Google Photos (locally) before the upload do play, but the original file doesn't

pvince commented 8 months ago

Also, much, much older motion photos DO play. Scrolling back through my history of uploaded photos, I can see a motion picture from Dec. 4, 2023 plays fine, however one taken on Dec. 14, 2023 does not.

From the scattershot I tested, all before Dec 4th play fine, all after Dec 14th do not.

I don't see the same console error, instead I see the following warnings:

HTTP “Content-Type” of “text/html” is not supported. Load of media resource https://files.example.com/apps/memories/api/video/livephoto/429779?etag=f10e48b2f2eec9051e9011a8464b38c0&liveid=self__trailer&transcode=jjnj93669q00 failed.
Cannot play media. No decoders for requested formats: text/html

Filling in some of the 'Platform' information:

AstroPhotoJay commented 8 months ago

I'm experiencing the same issue.

Date of last of motion photo displaying correctly in NC Memories: 03 Dec 2023

Since then, I get the following error in my log whenever a motion photo is uploaded {"reqId":"GTozW35FA5qHjODfGRfo","level":3,"time":"2024-03-07T23:48:48+00:00","remoteAddr":"172.17.0.1","user":"REDACTED","app":"PHP","method":"PUT","url":"/remote.php/dav/files/REDACTED/My%20Photos/Phone%20Backup/2024/03/PXL_20240307_234521963.MP.jpg","message":"Undefined array key \"Copy2:DirectoryItemLength\" at /var/www/html/custom_apps/memories/lib/Db/LivePhoto.php#78","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.28.0","version":"28.0.3.2","data":{"app":"PHP"},"id":"65ea71c3f129b"}

MOBILE DEVICE

PLATFORM INFO

PHP

ZeroKun265 commented 7 months ago

Well I've got the same issue and editing the photo with Google photo did work Wanted to try and edit it in memories but ofc it told me it's a disabled feature.

Would love to help if you need something

csm10495 commented 7 months ago

Same issue on a fresh memories install. Motion photos (Android in my case) won't play.

I can tap the play icon but nothing happens.

jonassvatos commented 7 months ago

I can confirm that live photos made by Pixel 7a currently don't play, but photos shot before December 6 feature drop do play.

In the following album, there is a live photo taken by Pixel 5 (plays), followed by photo taken by Pixel 7a on Dec. 3 just before the feature drop (plays), and another one shot on Jan. 9 after the feature drop (doesn't play).

Currently I do not have time to investigate it further myself, therefore I hope at least these photos can serve a purpouse to somebody who does. https://nextcloud.lsde.org/apps/memories/a/Q1FvDB9kCozTegPLi0p4sF8lUilELrA4

thegrasshopper104 commented 7 months ago

Memories 7.0.2, Android v1.7 on Nextcloud AIO v8.0.0 shows Android motion photos :)

but still doesn't play iPhone live photos. not sure if this is relevant:

[24-Mar-2024 09:51:14] ERROR: epoll: unable to remove fd 12
[24-Mar-2024 09:51:14] ERROR: epoll: unable to remove fd 15
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 73728 bytes) in /var/www/html/custom_apps/recognize/lib/Classifiers/Classifier.php on line 360
Warning: Error rebuilding maker notes (may be corrupt) - /mnt/ncdata/aronkvh/files/InstantUpload/Camera/PXL_20240223_125337353.RAW-02.ORIGINAL.dng
Warning: Error rebuilding maker notes (may be corrupt) - /mnt/ncdata/aronkvh/files/InstantUpload/Camera/PXL_20240308_204218401.RAW-02.ORIGINAL.dng
Warning: Error rebuilding maker notes (may be corrupt) - /mnt/ncdata/aronkvh/files/InstantUpload/Camera/PXL_20240228_170439333.RAW-02.ORIGINAL.dng

. . .

NOTICE: PHP message: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 2608592 bytes) in /var/www/html/lib/private/Files/Storage/Local.php on line 327
NOTICE: PHP message: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 2608592 bytes) in /var/www/html/lib/private/Files/Storage/Local.php on line 327
NOTICE: PHP message: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 2608592 bytes) in /var/www/html/lib/private/Files/Storage/Local.php on line 327
[24-Mar-2024 16:19:26] ERROR: epoll: unable to remove fd 12
[24-Mar-2024 16:19:26] ERROR: epoll: unable to remove fd 15
NOTICE: PHP message: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 2608592 bytes) in /var/www/html/lib/private/Files/Storage/Local.php on line 327
pulsejet commented 7 months ago

Currently I do not have time to investigate it further myself, therefore I hope at least these photos can serve a purpouse to somebody who does. https://nextcloud.lsde.org/apps/memories/a/Q1FvDB9kCozTegPLi0p4sF8lUilELrA4

This helps. Please leave this link up for a few days.

but still doesn't play iPhone live photos. not sure if this is relevant:

Do you have transcoding enabled? The error messages are irrelevant; please check the JS console for any other errors and provide samples.

pulsejet commented 7 months ago

and another one shot on Jan. 9 after the feature drop (doesn't play)

@lsde what's happening here is this image was indexed with Memories v6 but the bug here was fixed only in v7. This however won't invalidate the previous index. All you need is to reindex this forcibly.

occ memories:index --force

You can specify a folder to the command to reindex more specifically,

occ memories:index --force --folder /path/to/folder

This reminds me there should be an option to reindex selected files for cases like this.

https://github.com/pulsejet/memories/issues/1095

thegrasshopper104 commented 7 months ago

Currently I do not have time to investigate it further myself, therefore I hope at least these photos can serve a purpouse to somebody who does. https://nextcloud.lsde.org/apps/memories/a/Q1FvDB9kCozTegPLi0p4sF8lUilELrA4

This helps. Please leave this link up for a few days.

but still doesn't play iPhone live photos. not sure if this is relevant:

Do you have transcoding enabled? The error messages are irrelevant; please check the JS console for any other errors and provide samples.

Transcoding is enabled, (go-vod binary exists and is usable (0.2.4).) Console errors:

Doubling multipreview buffer size 2097152
Doubling multipreview buffer size 1048576
Failed to load resource: the server responded with a status of 404 ()
{"message":"Not found (live video file)"}

Here the first one doesn't play (iPhone) and the other 2 work (Pixel) I also tried reindexing just in case, but it didn't help.

pulsejet commented 7 months ago

Not found (live video file)

There's your error; the live photo's video part simply doesn't exist. Are you sure it was uploaded to begin with?

thegrasshopper104 commented 7 months ago

Not found (live video file)

There's your error; the live photo's video part simply doesn't exist. Are you sure it was uploaded to begin with?

Oh, it's an easy explanation then. Apparently Safari doesn't upload the .mov just the .jpeg. Should I close the issue?

pulsejet commented 7 months ago

You could try uploading the mov too, if that works then we can close this issue.

ZeroKun265 commented 7 months ago

Wait, I updated memories and now I can see the motion photos on both the android app and the chrome browser on Android. But on pc, with Arch Linux and Chrome 123.0.6312.58 (chrome, not chromium) they don't show, I don't know if it's related

pulsejet commented 7 months ago

@ZeroKun265 do you have transcoding set up? It's likely that your mobile supports the format but desktop doesn't.

ZeroKun265 commented 7 months ago

@ZeroKun265 do you have transcoding set up? It's likely that your mobile supports the format but desktop doesn't.

Yes the "Enable Transcoding" is on and it's using the internal transcoder I'm trying a full update on arch and I'll also test it out on my Windows partition, if it works on Windows I'll just mark it as a "classic Linux" moment

pulsejet commented 7 months ago

Either way, do pull the logs and file a separate issue for this

ZeroKun265 commented 7 months ago

Either way, do pull the logs and file a separate issue for this

Okok, I will do that if needed, thanks

jonassvatos commented 7 months ago

and another one shot on Jan. 9 after the feature drop (doesn't play)

@lsde what's happening here is this image was indexed with Memories v6 but the bug here was fixed only in v7. This however won't invalidate the previous index. All you need is to reindex this forcibly.

occ memories:index --force

You can specify a folder to the command to reindex more specifically,

occ memories:index --force --folder /path/to/folder

This reminds me there should be an option to reindex selected files for cases like this.

1095

ok, you're obviously right, reindexing the folder did fix the issue for me indeed!

pulsejet commented 7 months ago

Closing this, if the issue persists please open a new issue (since it will likely be unrelated to this one at this point)