Skip to content
Discussion options

You must be logged in to vote

Since you already have the asset resources as ObjC objects, you're almost there!

Here's how you could get the video file for a live photo:

# ...
resources = PHAssetResource.assetResourcesForAsset_(objc_asset)
for r in resources:
    # PHAssetResourceTypePairedVideo = 9
    if r.type() == 9 and r.isLocallyAvailable():
        file_url = r.privateFileURL()
        video_path = str(file_url.path())
        print(f'Live photo video file: {video_path}')
        # ...

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@timaschew
Comment options

Answer selected by timaschew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants