ypresto / android-transcoder

MP4 video transcode using Android MediaCodec API, pure Java (not LGPL nor patent issue!). Supports API >= 18.
Apache License 2.0
832 stars 238 forks source link

Validate encoders using MediaCodecList #77

Open selsamman opened 5 years ago

selsamman commented 5 years ago

It seems that validation of encoders was hard coded rather than using MediaCodecList. In the case of passthrough transcoding this can cause failures. This was cherry-picked from my fork which has tests and all tests ran with this code. I did not test it with the upstream repo.

selsamman commented 5 years ago

This relates to https://github.com/ypresto/android-transcoder/issues/76

jonmaim commented 5 years ago

Thanks @selsamman, great commit!

ypresto commented 5 years ago

Thats validation is intended: combinations of container x video-codec x audio-codec are so many but has limitation. Also uncommon combinations are not guaranteed to be supported on all (most of) devices.

Since this library is intended to generate video with stable format, I prefer common, frequently used combination for stability.