Android Developers Blog

Common media processing operations with Jetpack Media3 Transformer

Android users are increasingly creating and sharing video content, making media editing a crucial feature in many apps. Historically, developers have relied on external libraries for media editing, but these solutions can introduce complexity and performance issues. The Jetpack Media3 Transformer APIs offer a native Android solution for media editing with fast performance, customizability, and broad device compatibility. To get started with Transformer, developers need to add the dependency to their project, create MediaItem instances, apply edits, and start the export process. The Transformer API supports various editing operations, including transcoding, trimming, muting, and resizing. These operations can be combined to apply multiple edits to a video. The Transformer API also prioritizes transmuxing over transcoding where possible, resulting in faster processing times and higher-quality output. Benchmarking measurements show that the Transformer API performs well on various devices and input video formats. The API is continuously being optimized, with features like trim optimization and support for stitching part of the input file with newly-encoded output. As part of Media3, Transformer is a native solution with low integration complexity, ensuring compatibility with a wide variety of devices and customizability to fit specific needs.
favicon
android-developers.googleblog.com
android-developers.googleblog.com
Create attached notes ...