Media3 Transformer 正在积极开发中,我们期待收到您的反馈意见!欢迎在
问题跟踪器中提供反馈、提交功能请求和错误报告。关注
ExoPlayer 博客,了解最新动态。
ตัวเปลี่ยนรูปแบบ Media3
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
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-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 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)."]]