LiTr icon indicating copy to clipboard operation
LiTr copied to clipboard

Expose more Utility Functions from MediaTransformer

Open timcreatedit opened this issue 2 years ago • 1 comments

MediaTransformer does a really nice job of being very simple to use when you're first getting started. Once you want advanced functionality however, you are faced with creating your own MediaTarget, MediaFormat, TrackTransforms etc.

There's a lot of nice logic in LiTr that has been written to do exactly that, but a lot of it is private, even if it doesn't have any side effects. When building my own more custom transformer, I found myself copying logic from MediaTransformer (createTargetMediaFormat, isAudioIncompatible, ...) constantly.

I think there is a big opportunity to make LiTr more approachable by exposing more of the Utility that is hidden away inside. Dealing with MediaFormats is both a daunting task for beginners, but also very essential in a lot of cases, so I assume a lot of users would benefit from improving the usability in that regard :)

A first step would be opening up some of the functions that are already there, but on top of that, more utility functions could still be written

timcreatedit avatar Jan 09 '23 10:01 timcreatedit

This is an excellent suggestion! I have been thinking about writing some helper methods for MediaFormat creation - things like typical resolutions/aspect ratios, etc. But I didn't think about exposing some internal util methods. Any specific functionality you would want to see exposed?

izzytwosheds avatar Jan 09 '23 16:01 izzytwosheds