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

Live Photo path is wrong for referenced libraries #1459

Closed
oPromessa opened this issue Mar 24, 2024 · 5 comments · Fixed by #1460
Closed

Live Photo path is wrong for referenced libraries #1459

oPromessa opened this issue Mar 24, 2024 · 5 comments · Fixed by #1460
Labels
bug Something isn't working

Comments

@oPromessa
Copy link
Contributor

Before submitting a bug report, please ensure you are running the most recent version of osxphotos and that the bug is reproducible on the latest version

$  osxphotos --version
osxphotos, version 0.67.7
Python 3.11.5 (main, Aug 24 2023, 15:23:30) [Clang 14.0.0 (clang-1400.0.29.202)]
macOS 12.7.3, x86_64

Describe the bug
I'm getting a missing live photo error on export. Tried with a few pics.

To Reproduce

osxphotos export live --library "/Users/Shared/Pictures/iPhoto Shared Library.photoslibrary/database/Photos.sqlite" --name IMG_20220416_140931 --name IMG_20240205_124713 --verbose --timestamp
XXXX-03-24 20:36:15.012167 -- osxphotos version: 0.67.7
XXXX-03-24 20:36:15.012607 -- Python version: 3.11.5 (main, Aug 24 2023, 15:23:30) [Clang 14.0.0 (clang-1400.0.29.202)]
XXXX-03-24 20:36:15.026325 -- Platform: macOS-12.7.3-x86_64-i386-64bit, 12.7.3
XXXX-03-24 20:36:15.028072 -- Verbose level: 1
XXXX-03-24 20:36:15.029792 -- Warning: found previous export database in '/Users/XXXX/Documents/GitHub/Export/recreate/live' but --update not specified; osxphotos will not consider 
state of previous export which may result in duplicate files. Please confirm that you want to continue without using --update
Do you want to continue? [y/N]: y
XXXX-03-24 20:36:17.475997 -- Using osxphotos export database: version 9.1 located at /Users/XXXX/Documents/GitHub/Export/recreate/live/.osxphotos_export.db
XXXX-03-24 20:36:17.477548 -- Processing database /Users/Shared/Pictures/iPhoto Shared Library.photoslibrary/database/Photos.sqlite
XXXX-03-24 20:36:17.487786 -- Processing database /Users/Shared/Pictures/iPhoto Shared Library.photoslibrary/database/Photos.sqlite
XXXX-03-24 20:36:17.500745 -- Photos database version: 5001, 7.
XXXX-03-24 20:36:17.502806 -- Processing persons in photos.
XXXX-03-24 20:36:17.577857 -- Processing detected faces in photos.
XXXX-03-24 20:36:17.690313 -- Processing albums.
XXXX-03-24 20:36:18.316108 -- Processing keywords.
XXXX-03-24 20:36:18.655973 -- Processing photo details.
XXXX-03-24 20:36:23.851739 -- Processing import sessions.
XXXX-03-24 20:36:24.114376 -- Processing additional photo details.
XXXX-03-24 20:36:25.783356 -- Processing face details.
XXXX-03-24 20:36:26.317135 -- Processing photo labels.
XXXX-03-24 20:36:35.193787 -- Processing EXIF details.
XXXX-03-24 20:36:36.012235 -- Processing computed aesthetic scores.
XXXX-03-24 20:36:36.860676 -- Processing comments and likes for shared photos.
XXXX-03-24 20:36:36.866244 -- Processing moments.
XXXX-03-24 20:36:36.945540 -- Processing syndication info.
XXXX-03-24 20:36:37.258534 -- Done processing details from Photos library.
XXXX-03-24 20:36:37.640860 -- Exporting 3 photos to /Users/XXXX/Documents/GitHub/Export/recreate/live...
XXXX-03-24 20:36:37.689366 -- Exporting IMG_XXXX0205_124713_1.HEIC (IMG_XXXX0205_124713_1.HEIC) (1/3)
XXXX-03-24 20:36:37.692606 -- Exported IMG_XXXX0205_124713_1.HEIC to /Users/XXXX/Documents/GitHub/Export/recreate/live/IMG_XXXX0205_124713_1 (2).HEIC
XXXX-03-24 20:36:37.696271 -- Skipping missing live photo for IMG_XXXX0205_124713_1.HEIC (83C58E7B-F328-4C83-BDD1-8B1712C9D40A)
XXXX-03-24 20:36:37.697414 -- Exported /Users/XXXX/Documents/GitHub/Export/recreate/live/IMG_XXXX0205_124713_1 (2).HEIC
XXXX-03-24 20:36:37.698753 -- Exporting IMG_XXXX0416_140931.HEIC (IMG_XXXX0416_140931.HEIC) (2/3)
XXXX-03-24 20:36:37.700565 -- Exported IMG_XXXX0416_140931.HEIC to /Users/XXXX/Documents/GitHub/Export/recreate/live/IMG_XXXX0416_140931.HEIC
XXXX-03-24 20:36:37.703713 -- Skipping missing live photo for IMG_XXXX0416_140931.HEIC (C4F609E9-1283-4F0D-980C-7A6287ED8A9A)
XXXX-03-24 20:36:37.705646 -- Exported /Users/XXXX/Documents/GitHub/Export/recreate/live/IMG_XXXX0416_140931.HEIC
XXXX-03-24 20:36:37.707562 -- Exporting IMG_XXXX0205_124713.HEIC (IMG_XXXX0205_124713.HEIC) (3/3)
XXXX-03-24 20:36:37.709767 -- Exported IMG_XXXX0205_124713.HEIC to /Users/XXXX/Documents/GitHub/Export/recreate/live/IMG_XXXX0205_124713 (2).HEIC
XXXX-03-24 20:36:37.712926 -- Skipping missing live photo for IMG_XXXX0205_124713.HEIC (F625537E-D7F0-49F6-9765-853EB8BC4BC2)
XXXX-03-24 20:36:37.713952 -- Exported /Users/XXXX/Documents/GitHub/Export/recreate/live/IMG_XXXX0205_124713 (2).HEIC
Exporting 3 photos ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
XXXX-03-24 20:36:37.715907 -- Processed: 3 photos, exported: 3, missing: 3, error: 0
XXXX-03-24 20:36:37.716230 -- Elapsed time: 0:00:00
XXXX-03-24 20:36:37.718608 -- Cleaning up lock files

The Pics are Live Photos

  • Photos does recognise it as a Live Photo and when I hover over the "Live icon" it does shot it.
  • The two files HEIC and MOV do exist on the disk side by side and the Live Photos tags exists (they came originally form a iPhoto 11.
$ exiftool -ContentIdentifier IMG_XXXX0416_140931.HEIC IMG_XXXX0416_140931.MOV
======== IMG_XXXX0416_140931.HEIC
Content Identifier              : 29260A4F-5717-4720-B3DF-015104C3B88A
======== IMG_XXXX0416_140931.MOV
Content Identifier              : 29260A4F-5717-4720-B3DF-015104C3B88A
    2 image files read

Dump of one pic
Of course there is no live photo path entry! how come? Would it be because they are REFERENCED?

`osxphotos debug-dump --dump photos --uuid C4F609E9-1283-4F0D-980C-7A6287ED8A9A`
Opening database: /Users/Shared/Pictures/iPhoto Shared Library.photoslibrary
Done; took 21.88 seconds
photo: C4F609E9-1283-4F0D-980C-7A6287ED8A9A
_dbphotos['C4F609E9-1283-4F0D-980C-7A6287ED8A9A']:
{
    '_uuid': 'C4F609E9-1283-4F0D-980C-7A6287ED8A9A',
    'modelID': None,
    'masterUuid': None,
    'masterFingerprint': 'Aaod2U1zibCe7v9kKJ5g0uRrKvhR',
    'name': None,
    'lastmodifieddate_timestamp': None,
    'lastmodifieddate': None,
    'imageTimeZoneOffsetSeconds': 3600,
    'imageDate_timestamp': 671807371.856,
    'imageDate': datetime.datetime(XXXX, 4, 16, 14, 9, 31, 856000, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600))),
    'hidden': 0,
    'favorite': 0,
    'originalFilename': 'IMG_XXXX0416_140931.HEIC',
    'filename': 'IMG_XXXX0416_140931.HEIC',
    'directory': '/Users/Shared/Pictures/Pictures/iPhoto/XXXX',
    'latitude': XXXX,
    'longitude': XXXX,
    'hasAdjustments': 0,
    'cloudbatchpublishdate': None,
    'shared': False,
    'extendedDescription': None,
    'localAvailability': 1,
    'remoteAvailability': 0,
    'isMissing': 0,
    'adjustmentUuid': None,
    'adjustmentFormatID': None,
    'type': 0,
    'UTI': 'public.heic',
    'UTI_original': None,
    'burstUUID': None,
    'burstPickType': 0,
    'burst': False,
    'subtype': 2,
    'live_photo': True,
    'screenshot': False,
    'slow_mo': False,
    'time_lapse': False,
    'customRenderedValue': 0,
    'hdr': False,
    'depth_state': 0,
    'portrait': False,
    'panorama': False,
    'selfie': False,
    'cloudAssetGUID': None,
    'cloudLocalState': None,
    'incloud': None,
    'cloudLibraryState': None,
    'cloudStatus': None,
    'cloudAvailable': None,
    'cloudMasterGUID': None,
    'reverse_geolocation': None,
    'placeIDs': None,
    'placeNames': None,
    'countryCode': None,
    'momentID': 3849,
    'original_resource_choice': 0,
    'raw_is_original': False,
    'intrash': False,
    'trasheddate_timestamp': None,
    'trasheddate': None,
    'height': 4032,
    'width': 3024,
    'orientation': 6,
    'original_height': 3024,
    'original_width': 4032,
    'original_orientation': 6,
    'original_filesize': 1803357,
    'visibility_state': 0,
    'visible': True,
    'saved_asset_type': 10,
    'isreference': True,
    'added_date': datetime.datetime(2024, 3, 24, 20, 7, 24, 512150),
    'pk': 107246,
    'cloudownerhashedpersonid': None,
    'moment_share': None,
    'import_session': 5869,
    'fok_import_session': None,
    'import_uuid': 'FD26BC0A-3293-46B5-B2C6-85EF2C1026A6',
    'has_raw': False,
    'raw_data_length': None,
    'UTI_raw': None,
    'datastore_subtype': None,
    'resource_type': None,
    'raw_master_uuid': None,
    'non_raw_master_uuid': None,
    'alt_master_uuid': None,
    'raw_info': None,
    'edit_resource_id_photo': None,
    'edit_resource_id_video': None,
    'UTI_edited_photo': None,
    'UTI_edited_video': None,
    'active_library_participation_state': None,
    'library_scope_share_state': None,
    'library_scope': None,
    'hasKeywords': 0,
    'keywords': [],
    'hasPersons': 0,
    'persons': [],
    'albums': ['9B5A6350-68A6-4028-B761-5167D114C6E0'],
    'hasAlbums': 1
}
PhotoInfo:
{
    'albums': ['XXXX'],
    'burst': False,
    'cloud_guid': None,
    'cloud_owner_hashed_id': None,
    'comments': [],
    'date_added': datetime.datetime(2024, 3, 24, 21, 7, 24, 512150, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600))),
    'date_modified': None,
    'date_trashed': None,
    'date': datetime.datetime(XXXX, 4, 16, 14, 9, 31, 856000, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600))),
    'description': None,
    'exif_info': {
        'flash_fired': False,
        'iso': 1000,
        'metering_mode': 5,
        'sample_rate': None,
        'track_format': None,
        'white_balance': 0,
        'aperture': 1.8,
        'bit_rate': None,
        'duration': None,
        'exposure_bias': 0.0,
        'focal_length': 4.25,
        'fps': None,
        'latitude': XXXX,
        'longitude': XXXX,
        'shutter_speed': 0.03333333000000001,
        'camera_make': 'Apple',
        'camera_model': 'iPhone 11',
        'codec': None,
        'lens_model': 'iPhone 11 back dual wide camera 4.25mm f/1.8'
    },
    'external_edit': False,
    'face_info': [],
    'favorite': False,
    'filename': 'IMG_XXXX0416_140931.HEIC',
    'fingerprint': 'Aaod2U1zibCe7v9kKJ5g0uRrKvhR',
    'folders': {'XXXX': ['XXXX', 'XXXX']},
    'has_raw': False,
    'hasadjustments': False,
    'hdr': False,
    'height': 4032,
    'hidden': False,
    'incloud': None,
    'intrash': False,
    'iscloudasset': False,
    'ismissing': False,
    'ismovie': False,
    'isphoto': True,
    'israw': False,
    'isreference': True,
    'keywords': [],
    'labels': [],
    'latitude': XXXX,
    'library': '/Users/Shared/Pictures/iPhoto Shared Library.photoslibrary',
    'likes': [],
    'live_photo': True,
    'location': (XXXX, XXXX),
    'longitude': XXXX,
    'orientation': 6,
    'original_filename': 'IMG_XXXX0416_140931.HEIC',
    'original_filesize': 1803357,
    'original_height': 3024,
    'original_orientation': 6,
    'original_width': 4032,
    'owner': None,
    'panorama': False,
    'path_edited_live_photo': None,
    'path_edited': None,
    'path_live_photo': None,
    'path_raw': None,
    'path': '/Users/Shared/Pictures/Pictures/iPhoto/XXXX/IMG_XXXX0416_140931.HEIC',
    'persons': [],
    'place': {},
    'portrait': False,
    'raw_original': False,
    'score': {
        'overall': 0.0,
        'curation': 0.0,
        'promotion': 0.0,
        'highlight_visibility': 0.0,
        'behavioral': 0.0,
        'failure': 0.0,
        'harmonious_color': 0.0,
        'immersiveness': 0.0,
        'interaction': 0.0,
        'interesting_subject': 0.0,
        'intrusive_object_presence': 0.0,
        'lively_color': 0.0,
        'low_light': 0.0,
        'noise': 0.0,
        'pleasant_camera_tilt': 0.0,
        'pleasant_composition': 0.0,
        'pleasant_lighting': 0.0,
        'pleasant_pattern': 0.0,
        'pleasant_perspective': 0.0,
        'pleasant_post_processing': 0.0,
        'pleasant_reflection': 0.0,
        'pleasant_symmetry': 0.0,
        'sharply_focused_subject': 0.0,
        'tastefully_blurred': 0.0,
        'well_chosen_subject': 0.0,
        'well_framed_subject': 0.0,
        'well_timed_shot': 0.0
    },
    'screenshot': False,
    'selfie': False,
    'shared': False,
    'slow_mo': False,
    'time_lapse': False,
    'title': None,
    'tzoffset': 3600,
    'uti_edited': None,
    'uti_original': 'public.heic',
    'uti_raw': None,
    'uti': 'public.heic',
    'uuid': 'C4F609E9-1283-4F0D-980C-7A6287ED8A9A',
    'visible': True,
    'width': 3024,
    'album_info': [
        {
            'uuid': '9B5A6350-68A6-4028-B761-5167D114C6E0',
            'creation_date': datetime.datetime(XXXX, 4, 30, 13, 57, 42, 751924, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600), 'WEST')),
            'start_date': datetime.datetime(XXXX, 4, 3, 14, 30, 43, 526000, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600), 'WEST')),
            'end_date': datetime.datetime(XXXX, 4, 23, 14, 54, 3, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600), 'WEST')),
            'owner': None,
            'title': 'XXXX',
            'folder_names': ['XXXX', 'XXXX'],
            'folder_list': ['B2160083-6DBD-40CA-B81D-7B259182FDDA', 'C3E0095C-011D-4244-8D67-FD71E5813CDE'],
            'sort_order': <AlbumSortOrder.OLDEST_FIRST: 3>,
            'parent': 'C3E0095C-011D-4244-8D67-FD71E5813CDE'
        }
    ],
    'path_derivatives': ['/Users/Shared/Pictures/iPhoto Shared Library.photoslibrary/resources/derivatives/masters/C/C4F609E9-1283-4F0D-980C-7A6287ED8A9A_4_5005_c.jpeg'],
    'adjustments': {},
    'burst_album_info': [
        {
            'uuid': '9B5A6350-68A6-4028-B761-5167D114C6E0',
            'creation_date': datetime.datetime(XXXX, 4, 30, 13, 57, 42, 751924, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600), 'WEST')),
            'start_date': datetime.datetime(XXXX, 4, 3, 14, 30, 43, 526000, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600), 'WEST')),
            'end_date': datetime.datetime(XXXX, 4, 23, 14, 54, 3, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600), 'WEST')),
            'owner': None,
            'title': 'XXXX',
            'folder_names': ['XXXX', 'XXXXX'],
            'folder_list': ['B2160083-6DBD-40CA-B81D-7B259182FDDA', 'C3E0095C-011D-4244-8D67-FD71E5813CDE'],
            'sort_order': <AlbumSortOrder.OLDEST_FIRST: 3>,
            'parent': 'C3E0095C-011D-4244-8D67-FD71E5813CDE'
        }
    ],
    'burst_albums': ['XXXX'],
    'burst_default_pick': False,
    'burst_key': False,
    'burst_photos': [],
    'burst_selected': False,
    'cloud_metadata': {},
    'import_info': {
        'uuid': 'FD26BC0A-3293-46B5-B2C6-85EF2C1026A6',
        'creation_date': datetime.datetime(2024, 3, 24, 20, 7, 24, 524201, tzinfo=datetime.timezone(datetime.timedelta(0), 'WET')),
        'start_date': datetime.datetime(2024, 3, 24, 20, 7, 24, 512150, tzinfo=datetime.timezone(datetime.timedelta(0), 'WET')),
        'end_date': datetime.datetime(2024, 3, 24, 20, 7, 24, 512150, tzinfo=datetime.timezone(datetime.timedelta(0), 'WET')),
        'title': None
    },
    'labels_normalized': [],
    'person_info': [],
    'project_info': [],
    'search_info': {
        'labels': [],
        'place_names': [],
        'streets': [],
        'neighborhoods': [],
        'city': '',
        'locality_names': [],
        'state': '',
        'state_abbreviation': '',
        'country': '',
        'bodies_of_water': [],
        'month': 'April',
        'year': 'XXXX',
        'holidays': [],
        'activities': [],
        'season': 'Spring',
        'venues': [],
        'venue_types': [],
        'media_types': [],
        'detected_text': [],
        'camera': '',
        'source': ''
    },
    'search_info_normalized': {
        'labels': [],
        'place_names': [],
        'streets': [],
        'neighborhoods': [],
        'city': '',
        'locality_names': [],
        'state': '',
        'state_abbreviation': '',
        'country': '',
        'bodies_of_water': [],
        'month': 'april',
        'year': 'XXXX',
        'holidays': [],
        'activities': [],
        'season': 'spring',
        'venues': [],
        'venue_types': [],
        'media_types': [],
        'detected_text': [],
        'camera': '',
        'source': ''
    },
    'syndicated': False,
    'saved_to_library': False,
    'shared_moment': False,
    'shared_library': False,
    'rating': 0
}
ZASSET
[
    {
        'Z_PK': 107246,
        'Z_ENT': 3,
        'Z_OPT': 3,
        'ZAVALANCHEPICKTYPE': 0,
        'ZBUNDLESCOPE': 0,
        'ZCAMERAPROCESSINGADJUSTMENTSTATE': 0,
        'ZCLOUDDELETESTATE': 0,
        'ZCLOUDDOWNLOADREQUESTS': 0,
        'ZCLOUDHASCOMMENTSBYME': None,
        'ZCLOUDHASCOMMENTSCONVERSATION': None,
        'ZCLOUDHASUNSEENCOMMENTS': None,
        'ZCLOUDISDELETABLE': None,
        'ZCLOUDISMYASSET': None,
        'ZCLOUDLOCALSTATE': 0,
        'ZCLOUDPLACEHOLDERKIND': 0,
        'ZCOMPLETE': 1,
        'ZDEFERREDPROCESSINGNEEDED': 0,
        'ZDEPTHTYPE': 0,
        'ZDERIVEDCAMERACAPTUREDEVICE': 0,
        'ZFACEAREAPOINTS': -100,
        'ZFAVORITE': 0,
        'ZHASADJUSTMENTS': 0,
        'ZHDRTYPE': 0,
        'ZHEIGHT': 4032,
        'ZHIDDEN': 0,
        'ZHIGHFRAMERATESTATE': 0,
        'ZKIND': 0,
        'ZKINDSUBTYPE': 2,
        'ZORIENTATION': 6,
        'ZPACKEDACCEPTABLECROPRECT': 0,
        'ZPACKEDBADGEATTRIBUTES': 0,
        'ZPACKEDPREFERREDCROPRECT': 0,
        'ZPLAYBACKSTYLE': 3,
        'ZPLAYBACKVARIATION': 0,
        'ZSAVEDASSETTYPE': 10,
        'ZSYNDICATIONSTATE': 0,
        'ZTHUMBNAILINDEX': 92358,
        'ZTRASHEDSTATE': 0,
        'ZVIDEOCPDURATIONVALUE': 1328,
        'ZVIDEOCPVISIBILITYSTATE': 0,
        'ZVIDEODEFERREDPROCESSINGNEEDED': 0,
        'ZVIDEOKEYFRAMETIMESCALE': 0,
        'ZVIDEOKEYFRAMEVALUE': 0,
        'ZVISIBILITYSTATE': 0,
        'ZWIDTH': 3024,
        'ZADDITIONALATTRIBUTES': 107246,
        'ZCLOUDFEEDASSETSENTRY': None,
        'ZCOMPUTEDATTRIBUTES': None,
        'ZCONVERSATION': None,
        'ZDAYGROUPHIGHLIGHTBEINGASSETS': None,
        'ZDAYGROUPHIGHLIGHTBEINGEXTENDEDASSETS': None,
        'ZDAYGROUPHIGHLIGHTBEINGKEYASSET': None,
        'ZDAYGROUPHIGHLIGHTBEINGSUMMARYASSETS': None,
        'ZEXTENDEDATTRIBUTES': 107246,
        'ZHIGHLIGHTBEINGASSETS': 3929,
        'ZHIGHLIGHTBEINGEXTENDEDASSETS': 3929,
        'ZHIGHLIGHTBEINGKEYASSET': None,
        'ZHIGHLIGHTBEINGSUMMARYASSETS': 3929,
        'ZIMPORTSESSION': 5869,
        'ZLIBRARYSCOPE': None,
        'ZLIBRARYSCOPEORIGINATOR': None,
        'ZMASTER': None,
        'ZMEDIAANALYSISATTRIBUTES': 106009,
        'ZMOMENT': 3849,
        'ZMOMENTSHARE': None,
        'ZMONTHHIGHLIGHTBEINGFIRSTASSET': None,
        'ZMONTHHIGHLIGHTBEINGKEYASSET': None,
        'ZYEARHIGHLIGHTBEINGKEYASSET': None,
        'Z_FOK_CLOUDFEEDASSETSENTRY': None,
        'ZADDEDDATE': 733003644.51215,
        'ZADJUSTMENTTIMESTAMP': None,
        'ZANALYSISSTATEMODIFICATIONDATE': None,
        'ZCLOUDBATCHPUBLISHDATE': None,
        'ZCLOUDLASTVIEWEDCOMMENTDATE': None,
        'ZCLOUDSERVERPUBLISHDATE': None,
        'ZCURATIONSCORE': 0.0,
        'ZDATECREATED': 671807371.856,
        'ZDURATION': 0.0,
        'ZFACEADJUSTMENTVERSION': None,
        'ZHDRGAIN': 0.8432090282440186,
        'ZHIGHLIGHTVISIBILITYSCORE': 0.0,
        'ZLASTSHAREDDATE': None,
        'ZLATITUDE': XXXX,
        'ZLONGITUDE': XXXX,
        'ZMODIFICATIONDATE': 671807371,
        'ZOVERALLAESTHETICSCORE': 0.5,
        'ZPROMOTIONSCORE': 0.0,
        'ZSORTTOKEN': 671807371.856,
        'ZTRASHEDDATE': None,
        'ZAVALANCHEUUID': None,
        'ZCLOUDASSETGUID': None,
        'ZCLOUDBATCHID': None,
        'ZCLOUDCOLLECTIONGUID': None,
        'ZCLOUDOWNERHASHEDPERSONID': None,
        'ZDIRECTORY': '/Users/Shared/Pictures/Pictures/iPhoto/XXXX-04-30-0007-00/XXX',
        'ZFILENAME': 'IMG_XXXX0416_140931.HEIC',
        'ZMEDIAGROUPUUID': '29260A4F-5717-4720-B3DF-015104C3B88A',
        'ZORIGINALCOLORSPACE': 'Display P3',
        'ZUNIFORMTYPEIDENTIFIER': 'public.heic',
        'ZUUID': 'C4F609E9-1283-4F0D-980C-7A6287ED8A9A',
        'ZIMAGEREQUESTHINTS': b'\xd0q\t\x801Z\x00\x00\xc0k\t\x881Z\x00\x00id\t\x8c1Z\x00\x00iT\x0c\x03\x0c\xa8q\x92\x00',
        'ZLOCATIONDATA': 
b')\xbb\x86\x06O\\C@\xdft\xb8C\xb0O"\xc0\xc4\xe8V\xa0&\x80T@\x00\x00\x00\x00\x00\x80A@\x00\x00\x00\x00\x00\x00\x00\x00\xe6\x94\xe4\x1f1<e@\x00\x00\x00\x00\x00\x00\x00\x00h\x91\xed\xc
5{\x05\xc4A',
        'ZISMAGICCARPET': 0
    }
]
ZADDITIONALASSETATTRIBUTES
[
    {
        'Z_PK': 107246,
        'Z_ENT': 1,
        'Z_OPT': 5,
        'ZALLOWEDFORANALYSIS': 1,
        'ZCAMERACAPTUREDEVICE': 0,
        'ZCLOUDAVALANCHEPICKTYPE': 0,
        'ZCLOUDKINDSUBTYPE': 0,
        'ZCLOUDRECOVERYSTATE': 0,
        'ZCLOUDSTATERECOVERYATTEMPTSCOUNT': 0,
        'ZDEFERREDPROCESSINGCANDIDATEOPTIONS': 0,
        'ZDESTINATIONASSETCOPYSTATE': 0,
        'ZEMBEDDEDTHUMBNAILHEIGHT': None,
        'ZEMBEDDEDTHUMBNAILLENGTH': None,
        'ZEMBEDDEDTHUMBNAILOFFSET': None,
        'ZEMBEDDEDTHUMBNAILWIDTH': None,
        'ZIMPORTEDBY': 5,
        'ZINFERREDTIMEZONEOFFSET': 3600,
        'ZLOCATIONHASH': 1803779040,
        'ZORIGINALFILESIZE': 1803357,
        'ZORIGINALHEIGHT': 3024,
        'ZORIGINALORIENTATION': 6,
        'ZORIGINALRESOURCECHOICE': 0,
        'ZORIGINALWIDTH': 4032,
        'ZPENDINGPLAYCOUNT': 2,
        'ZPENDINGSHARECOUNT': 0,
        'ZPENDINGVIEWCOUNT': 1,
        'ZPLAYCOUNT': 0,
        'ZPTPTRASHEDSTATE': 0,
        'ZREVERSELOCATIONDATAISVALID': 0,
        'ZSCENEANALYSISVERSION': 0,
        'ZSHARECOUNT': 0,
        'ZSHARETYPE': 0,
        'ZSHIFTEDLOCATIONISVALID': 0,
        'ZTIMEZONEOFFSET': 3600,
        'ZUPLOADATTEMPTS': 0,
        'ZVARIATIONSUGGESTIONSTATES': 0,
        'ZVIDEOCPDISPLAYTIMESCALE': 600,
        'ZVIDEOCPDISPLAYVALUE': 506,
        'ZVIDEOCPDURATIONTIMESCALE': 600,
        'ZVIEWCOUNT': 0,
        'ZASSET': 107246,
        'ZASSETDESCRIPTION': None,
        'ZEDITEDIPTCATTRIBUTES': None,
        'ZMEDIAMETADATA': None,
        'ZSCENEPRINT': None,
        'ZUNMANAGEDADJUSTMENT': None,
        'ZALTERNATEIMPORTIMAGEDATE': 672505157,
        'ZGPSHORIZONTALACCURACY': 35.0,
        'ZLASTUPLOADATTEMPTDATE': None,
        'ZSCENEANALYSISTIMESTAMP': None,
        'ZACCESSIBILITYDESCRIPTION': None,
        'ZADJUSTEDFINGERPRINT': None,
        'ZIMPORTEDBYBUNDLEIDENTIFIER': 'com.apple.Photos',
        'ZDEFERREDPHOTOIDENTIFIER': None,
        'ZEDITORBUNDLEID': None,
        'ZEXIFTIMESTAMPSTRING': 'XXXX:04:16 14:09:31',
        'ZIMPORTSESSIONID': None,
        'ZMASTERFINGERPRINT': 'Aaod2U1zibCe7v9kKJ5g0uRrKvhR',
        'ZMEDIAMETADATATYPE': None,
        'ZMONTAGE': None,
        'ZORIGINALASSETSUUID': None,
        'ZORIGINALFILENAME': 'IMG_XXXX0416_140931.HEIC',
        'ZORIGINATINGASSETIDENTIFIER': None,
        'ZPHOTOSTREAMTAGID': None,
        'ZPUBLICGLOBALUUID': 'FF62987C-5904-4B97-92C7-9193BA1471C1',
        'ZSHAREORIGINATOR': None,
        'ZSNOWDAYSNOWPLOWIDENTIFIER': None,
        'ZSPATIALOVERCAPTUREGROUPIDENTIFIER': None,
        'ZTIMEZONENAME': 'GMT+0100',
        'ZTITLE': None,
        'ZDISTANCEIDENTITY': None,
        'ZFACEREGIONS': None,
        'ZOBJECTSALIENCYRECTSDATA': None,
        'ZORIGINALHASH': b'\x01\xaa\x1d\xd9Ms\x89\xb0\x9e\xee\xffd(\x9e`\xd2\xe4k*\xf8Q',
        'ZPLACEANNOTATIONDATA': None,
        'ZREVERSELOCATIONDATA': None,
        'ZSHIFTEDLOCATIONDATA': None,
        'ZIMPORTEDBYDISPLAYNAME': 'Photos',
        'ZSYNDICATIONIDENTIFIER': None,
        'ZSOURCEASSETFORDUPLICATIONSCOPEIDENTIFIER': None,
        'ZSOURCEASSETFORDUPLICATIONIDENTIFIER': None,
        'ZSCENEANALYSISISFROMPREVIEW': 0,
        'ZFACEANALYSISVERSION': 0,
        'ZDATECREATEDSOURCE': 1,
        'ZSYNDICATIONHISTORY': 0
    }
]
----------------------------------------

Expected behavior
Live Photos pai HEIC/MOV or JPG/MOV exported.

Screenshots
N/A

Desktop (please complete the following information):

$  osxphotos --version
osxphotos, version 0.67.7
Python 3.11.5 (main, Aug 24 2023, 15:23:30) [Clang 14.0.0 (clang-1400.0.29.202)]
macOS 12.7.3, x86_64

Additional context
Would like to export Live Photos to then use osxphotos import to recreate my full Library. #1267

@RhetTbull RhetTbull added the bug Something isn't working label Mar 24, 2024
@RhetTbull
Copy link
Owner

This is almost certainly due to referenced live photos having a different naming scheme than those in a managed library.

In the managed library, the photo is stored thusly:

originals/D/D3EBBF6F-BE4C-4D9C-BEDD-8CF1F24F43A7.jpeg (or .HEIC)

and the live component is in:

originals/D/D3EBBF6F-BE4C-4D9C-BEDD-8CF1F24F43A7_3.mov

So the code is looking for the the same path with _3.mov but your photos do not have this. They are named with the same name but the .mov extension. This should be an easy fix -- I don't use referenced libraries so the testing on referenced photos is very minimal (though the test libraries do include referenced images for testing). I've never tested against referenced live photos. I can probably get an update out tonight for testing.

@RhetTbull RhetTbull changed the title Exporting Live Photos report Live Photo path is wrong for referenced libraries Mar 24, 2024
@RhetTbull
Copy link
Owner

I have this working using a heuristic but it appears the database stores a bookmark to the actual live video for referenced files. I'm working on figuring out how to read this so I can do a direct lookup instead of the "guess" based on heuristic.

@RhetTbull
Copy link
Owner

RhetTbull commented Mar 24, 2024

This query will retrieve the path to the live video for referenced images by UUID:

SELECT 
    ZASSET.ZUUID,
    ZFILESYSTEMVOLUME.ZNAME,
    ZFILESYSTEMBOOKMARK.ZPATHRELATIVETOVOLUME,
    ZFILESYSTEMBOOKMARK.ZBOOKMARKDATA
FROM 
    ZASSET
    JOIN ZINTERNALRESOURCE ON ZINTERNALRESOURCE.ZASSET = ZASSET.Z_PK
    JOIN ZFILESYSTEMBOOKMARK ON ZFILESYSTEMBOOKMARK.ZRESOURCE = ZINTERNALRESOURCE.Z_PK  
    JOIN ZFILESYSTEMVOLUME ON ZFILESYSTEMVOLUME.Z_PK = ZINTERNALRESOURCE.ZFILESYSTEMVOLUME
WHERE
    ZINTERNALRESOURCE.ZDATASTORESUBTYPE = 18; -- Live video component

@RhetTbull
Copy link
Owner

This should be fixed in v0.67.9. Please upgrade and let me know if you're still seeing the issue. Thanks for the detailed bug report which made finding this issue easy!

@oPromessa
Copy link
Contributor Author

Super thanks for the fix and quick turnaround!
On my initial test looks fixed and perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants