Closed PrinceVergil closed 3 months ago
If this is the exact copy of your code, I think you are missing to setUri of your item in the clippedMediaItem:
val clippedMediaItem = MediaItem.Builder()
.setUri(YOUR_URI) // here
.setClippingConfiguration(
MediaItem.ClippingConfiguration.Builder()
.setStartPositionMs(0)
.setEndPositionMs(10000)
.build()).build()
Thanks @droid-girl it was silly mistake.
@calren maybe we should investigate if we can give a better error message here?
@PrinceVergil no problem. Happens to everyone
will look into providing a better message for this use cases. @PrinceVergil thanks for reporting to help us make the API more robust!
Description: I am encountering an
androidx.media3.transformer.ExportException: Unexpected runtime error
when attempting to trim a video and then change its resolution and frame rate using thetransformer
library.Steps to Reproduce:
MediaItem
with clipping configuration to trim the video.EditedMediaItem
to apply video effects (changing resolution).Composition
with theEditedMediaItem
.Transformer
with the required settings.Code Snippet:
Expected Behavior: The video should be trimmed to the first 10 seconds and have its resolution changed to 640x480.
Actual Behavior: I receive a
ExportException: Unexpected runtime error
.Notes:
clippedMediaItem
without applying any effects, the transformation works as expected.Dependencies: