Media3 Transformer
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Transformer はメディア編集用の API で、形式間の変換(コード変換)、長い動画からのクリップのカット、動画フレーム一部の切り抜きなどの変更の適用、カスタム エフェクトの適用、その他の編集操作などを行います。これは Jetpack Media3 の一部です。
Transformer は Android 5.0 Lollipop(API レベル 21)以降と互換性があり、Android バージョンやデバイス間で動作の一貫性を高めるための回避策が用意されています。この API は、ハードウェア アクセラレーションによる動画のデコードとエンコードを行う MediaCodec
と、グラフィカルな変更を行う OpenGL の上に実装されています。Transformer では、すぐに使用できる形式の変換と複数のタイプの編集がサポートされていますが、より詳細な制御が必要な場合は、パイプラインのさまざまなコンポーネントを完全にカスタマイズまたは置換することもできます。たとえば、動画のエンコードはデフォルト設定で動作しますが、カスタムの動画エンコーダ設定を渡すことも、エンコーダ ファクトリを置き換えて、エンコーダの使用方法を完全に制御することもできます。
アプリで Transformer を使用する方法をスタートガイドで確認し、デモアプリを試す。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],[],null,["# Media3 Transformer\n\nTransformer is an API for editing media, including converting between formats\n(transcoding), applying changes like trimming a clip from a longer video,\ncropping a portion of the video frame, applying custom effects, and other\nediting operations. It's part of [Jetpack Media3](/guide/topics/media/media3).\n\nTransformer is compatible with Android 5.0 Lollipop (API level 21) and higher,\nand includes workarounds to get more consistent behavior across Android versions\nand different devices. The API is implemented on top of `MediaCodec` for\nhardware-accelerated video decoding and encoding, and OpenGL for graphical\nmodifications. Transformer supports format conversions and several types of\nedits out of the box, but you can also customize or replace various components\nin the pipeline entirely if you need more control. For example, video encoding\nworks with default settings, but you can also pass custom video encoder settings\nor replace the encoder factory to get complete control over how encoders are\nused.\n\nLearn how to use Transformer in your app on the [getting\nstarted](/media/media3/transformer/getting-started) page, and try out the [demo app](/media/media3/transformer/demo-application)."]]