android-libraries: [AndroidX.Media3.Transformer] EditedMediaItem.Builder missing

Android application type

Android for .NET (net8.0-android)

Description

I am trying to follow Googles “Getting Started” for the Media3 Transformer package to do a media file transformation, documented here.

Steps to Reproduce

In C#, this would be something like the following:

var inputMediaItem = MediaItem.FromUri(uri);
var editedMediaItem = new EditedMediaItem.Builder(inputMediaItem).SetRemoveAudio(true).Build();

The EditedMediaItem class doesn’t seem to be present (not bound?), the same seems to be the case for many other classes in the same package/namespace. Maybe the class hasn’t been bound (using remove-node) or has only been added in a recent version of Media3, which hasn’t been bound yet.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

@moljac is there any chance this will get fixed at some point in this year? 😃 Thanks in advance!

2025? I think it might be squeezed into my schedule.

You re welcome

Thanks for reporting

Will there be any efforts in resolving the issues I have reported over the last couple of weeks?

Yes. For sure, but I need to see the priorities first. Probably bindings errors/problems 1st.

And I also had to manually reference Xamarin.AndroidX.Collection.Jvm again to install the package along with Xamarin.AndroidX.Preference.

This is not bindings issue but nuget transitive dependencies. We are working on solutions for that.

Thanks

Thanks @moljac for getting this done quickly. I was searching for the tools to add an overlay watermark+timer to video on the weekend and was pleased to come across this conversation already in progress. Good work!

I’m looking to use the Media3.Transformer plus OverlayEffect along with a BitmapOverlay to apply my overlay watermark+timer.

Comparing the 1.1.1 generated OverlayEffect class with the java source code here, there is a constructor required for the OverlayEffect class:

  1. The AndroidX.Media3.Effect.OverlayEffect class is included in the latest build but it is currently missing its constructor method (which accepts an input param of [ImmutableList]<TextureOverlay> textureOverlays);

  2. The toGlShaderProgram method in the OverlayEffect class looks like it needs to call OverlayShaderProgram and not return a SingleFrameGlShaderProgram as it currently does. (Edited this out since SingleFrameGlShaderProgram has been deprecated in a later version of AndroidX/Media so should auto-resolve with a later AndroidX/Media version.)

If there’s anything else I can provide to help, happy to oblige. Thanks.