-
Notifications
You must be signed in to change notification settings - Fork 575
Description
First, thanks for the awesome library.
Our application is using androidx.media3:media3-transformer:1.6.0
for processing video before upload/sharing with others (the output video should be at most HD 720p using h264 codec). Recently, we received user feedback from an iOS device that they cannot save the video after it is transcoded from Android (for example, the receiver receives the video in the chat box, can play it normally, but then the user fails to save it locally).
After checking the output video metadata (which is transcoded from the transformer library), we saw it use profile High, level 6.0 (which is probably the root cause of the failure when saving in iOS due to it video requirements 1.3).
My question is, when we try to pick the highest supported level for the AVC profile high (see DefaultEncoderFactory.java#L338
), can it guarantee the compatibility with other devices/platforms?
media/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultEncoderFactory.java
Line 338 in 51efcad
adjustMediaFormatForH264EncoderSettings(format.colorInfo, encoderInfo, mediaFormat); |
Device used for the test:
- Samsung Z Fold 5 - Android 15 (for recording video and transcoding)
- iPhone 15 Pro Max - iOS 18.5 (for receiving video and saving)
Input:
- Input video: FullHD/4K/8K - 30 FPS - HEVC
- Requested width x heigth: 480 x 848 (SD)
- Requested video bitrate 1.300.000
- Requested video mime: h264
- Requested bitrate mode: VBR