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

Encode EditedMediaItems as a motion photo #2150

Open
Correct-Syntax opened this issue Feb 16, 2025 · 1 comment
Open

Encode EditedMediaItems as a motion photo #2150

Correct-Syntax opened this issue Feb 16, 2025 · 1 comment

Comments

@Correct-Syntax
Copy link

Use case description

Currently, the media3 Transformer APIs allow you to either use the photo or video portion of the Motion Photo as an EditedMediaItem.

This is the opposite of what I need to do. My use case is combining a sequence of images (EditedMediaItems) and encoding a Motion Photo. The image sequence would be encoded as the video portion and one of the images would be set as the photo portion.

Proposed solution

Provide and API to encode Motion Photos from EditedMediaItems.

A naive take on what the API could look like:

Transformer.Builder(context)
    .setMotionPhotoMimeType(MimeTypes.IMAGE_JPEG)
    .setMotionPhotoPrimaryPhoto(EditedMediaItem(...))
    .setMotionPhotoMediaItems(ImmutableList.of(
        EditedMediaItem(...),
        EditedMediaItem(...),
        ...
    )).build()

Alternatives considered

@droid-girl
Copy link
Contributor

Thank you for the feature request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants