Skip to content
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

Error converting HEIC to JPEG #679

Closed
TheGitaly opened this issue Oct 29, 2024 · 5 comments
Closed

Error converting HEIC to JPEG #679

TheGitaly opened this issue Oct 29, 2024 · 5 comments
Assignees

Comments

@TheGitaly
Copy link

Describe the bug
iOS 18 HEIC photos are unable to be converted by icloudpd when using parameter 'convert_heic_to_jpeg = True'.

Expected behaviour
HEIC images are converted to usable JPEG's and contained within same folder as HEIC.

Actual behaviour
Every image that conversion is attempted on results in the error "Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) `/iCloud/2024/10/28/IMG_1516.HEIC' @ error/heic.c/IsHEIFSuccess/144." JPEG image is present in folder, but is 0kb in size and not an actual JPEG.

Quick Google brings up a bug report in another application using the libheif library - ImageMagick/ImageMagick#7426. Solution is to upgrade libheif - strukturag/libheif#1190

System (The following information must be entered or the issue will be closed):
QNAP QTS 5.2.0.2860
Container Station v3.0.8.981

Debug log file
2024-10-29 03:51:21 INFO Convert HEIC files to JPEG
2024-10-29 03:51:21 INFO Convert HEIC to JPEG...
2024-10-29 03:51:21 INFO Converting /iCloud/2024/10/28/IMG_1516.HEIC to /iCloud/2024/10/28/IMG_1516.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1516.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1516.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:21 INFO Converting /iCloud/2024/10/28/IMG_1513.HEIC to /iCloud/2024/10/28/IMG_1513.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1513.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1513.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:21 INFO Converting /iCloud/2024/10/28/IMG_1511.HEIC to /iCloud/2024/10/28/IMG_1511.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1511.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1511.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:21 INFO Converting /iCloud/2024/10/28/IMG_1510.HEIC to /iCloud/2024/10/28/IMG_1510.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1510.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1510.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1508.HEIC to /iCloud/2024/10/28/IMG_1508.JPG
convert: Invalid input: Unspecified: Too many auxiliary image references (2.0) /iCloud/2024/10/28/IMG_1508.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1508.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1507.HEIC to /iCloud/2024/10/28/IMG_1507.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1507.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1507.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1506.HEIC to /iCloud/2024/10/28/IMG_1506.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1506.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1506.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1505.HEIC to /iCloud/2024/10/28/IMG_1505.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1505.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1505.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1504.HEIC to /iCloud/2024/10/28/IMG_1504.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1504.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1504.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1503.HEIC to /iCloud/2024/10/28/IMG_1503.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1503.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1503.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1502.HEIC to /iCloud/2024/10/28/IMG_1502.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1502.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1502.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1501.HEIC to /iCloud/2024/10/28/IMG_1501.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1501.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1501.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1500.HEIC to /iCloud/2024/10/28/IMG_1500.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1500.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1500.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1499.HEIC to /iCloud/2024/10/28/IMG_1499.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1499.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1499.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1498.HEIC to /iCloud/2024/10/28/IMG_1498.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1498.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1498.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1497.HEIC to /iCloud/2024/10/28/IMG_1497.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1497.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1497.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1496.HEIC to /iCloud/2024/10/28/IMG_1496.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1496.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1496.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1495.HEIC to /iCloud/2024/10/28/IMG_1495.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1495.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1495.JPG' @ error/convert.c/ConvertImageCommand/3362.
2024-10-29 03:51:22 INFO Converting /iCloud/2024/10/28/IMG_1494.HEIC to /iCloud/2024/10/28/IMG_1494.JPG
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) /iCloud/2024/10/28/IMG_1494.HEIC' @ error/heic.c/IsHEIFSuccess/144. convert: no images defined /iCloud/2024/10/28/IMG_1494.JPG' @ error/convert.c/ConvertImageCommand/3362.

@boredazfcuk
Copy link
Owner

boredazfcuk commented Oct 29, 2024

This issue was fixed mid-September: #604

Are you sure your container is up to date?

@TheGitaly
Copy link
Author

I pulled whatever the latest image was on the 26th to resolve the 503 error with --Initialise.

2024-10-30 01:19:39 INFO ***** boredazfcuk/icloudpd container v1.0.987_25-10-2024 started *****
2024-10-30 01:19:39 INFO ***** For support, please go here: https://github.com/boredazfcuk/docker-icloudpd *****
2024-10-30 01:19:39 INFO Alpine Linux 3.20.3
2024-10-30 01:19:39 INFO Python version: 3.12.7
2024-10-30 01:19:39 INFO icloud-photos-downloader version: 1.24.0

@boredazfcuk
Copy link
Owner

And you're seeing the conversion issue with this new build?

The version of libheif in the container, which it was confirmed resolves the issue, is 1.18.2-r0. This version was released in August and hasn't changed since then.

If you are still seeing the issue on the version you have installed, then the only thing I can think of, is that Apple have changed something again and it's resulting in the same issue. It will need to be fixed by the libheif package maintainers before I can include it here.

@TheGitaly
Copy link
Author

I've now pulled the version released on 3 November, and it seems to be working fine now. Are you saying you didn't change anything between this 1.24.0 and 1.24.3 version? That's strange.

2024-11-06 21:31:15 INFO ***** boredazfcuk/icloudpd container v1.0.993_03-11-2024 started *****
2024-11-06 21:31:15 INFO ***** For support, please go here: https://github.com/boredazfcuk/docker-icloudpd *****
2024-11-06 21:31:15 INFO Alpine Linux 3.20.3
2024-11-06 21:31:15 INFO Python version: 3.12.7
2024-11-06 21:31:15 INFO icloud-photos-downloader version: 1.24.3
.
.
.
2024-11-06 03:55:09 INFO Converting /iCloud/2024/10/31/IMG_1566.HEIC to /iCloud/2024/10/31/IMG_1566.JPG
2024-11-06 03:55:09 INFO Converting /iCloud/2024/10/31/IMG_1562.HEIC to /iCloud/2024/10/31/IMG_1562.JPG
2024-11-06 03:55:10 INFO Converting /iCloud/2024/10/31/IMG_1561.HEIC to /iCloud/2024/10/31/IMG_1561.JPG

@boredazfcuk
Copy link
Owner

Are you saying you didn't change anything between this 1.24.0 and 1.24.3 version? That's strange.

1.24.0 and 1.24.3 is the version of the icloud-photos-downloader package incorporated in the container, not the container version.

boredazfcuk/icloudpd container v1.0.979_16-09-2024 is the first version of the container which contains the iOS 18 fix. This was committed on 16th September: 22d7ad0#diff-800b827cf82b92000ae7a9ba881f387b8e570e4fc3aaf3625b9daa58c6081f79R14
...and released shortly afterwards:
https://hub.docker.com/layers/boredazfcuk/icloudpd/1.0.979_16-09-2024/images/sha256-3931c38a3adb3217b2c90c531fea29b5183b60e7c84b17339ffac2a5b26ac994?context=repo

Every container released since then has used libheif 1.18.2-r0, as libheif 1.19.2-r0 was only released yesterday, and I've not rebuilt the container to incorporate this new version yet.

So in answer to your question... no, nothing has changed regarding HEIC to JPG conversion since v1.0.979 was released on 16th September.

@boredazfcuk boredazfcuk closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants