android-transcoder icon indicating copy to clipboard operation
android-transcoder copied to clipboard

Non-baseline AVC video profile is not supported by Android OS (Android 9.0)

Open ricamgar opened this issue 6 years ago • 9 comments

Hi,

I am getting this error when trying to compress a video file with Android 9.0.

Fatal error while transcoding, this might be invalid format or bug in engine or Android.
net.ypresto.androidtranscoder.engine.InvalidOutputFormatException: Non-baseline AVC video profile is not supported by Android OS, actual profile_idc: 100

With other versions it works as expected. Any idea why is this happening? Thanks

ricamgar avatar Dec 18 '18 16:12 ricamgar

Same issue here :( Edit: I compiled the project myself, allowing the profile_idc 100 manually (instead of 66 only) and it seems to work. Would there be any sideeffects to this @ypresto or is this safe to use?

tipa avatar Feb 17 '19 11:02 tipa

@tipa can you share the .jar file or show me how to do that by myself? I'm not native to Java environments.

ffMathy avatar Mar 12 '19 21:03 ffMathy

Sure, you simply need to change this line: https://github.com/ypresto/android-transcoder/blob/e9c411c22897fad41a21c3f05f65b0dfe2fc327e/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java#L39 to if (profileIdc != PROFILE_IDC_BASELINE && profileIdc != 100) {

This is the resulting .jar lib-release.zip

tipa avatar Mar 12 '19 22:03 tipa

https://github.com/ypresto/android-transcoder/pull/73#issuecomment-475871771

(Main profile looks supported for now by Android itself, so we can remove restriction by checking Android version.)

ypresto avatar Mar 23 '19 14:03 ypresto

Thank you so much @ypresto for your time - sounds like you are quite busy.

Does that mean we can remove the if statement entirely?

ffMathy avatar Apr 03 '19 08:04 ffMathy

Hi there, any updates on this?

Thanks

martinbertinat avatar Apr 21 '19 19:04 martinbertinat

any update on this?

ricardoclipit avatar May 09 '19 11:05 ricardoclipit

any update?

pengkobe avatar Jun 26 '19 13:06 pengkobe

The issue seems to be fixed in the latest version of the master. While it's not perfect, you can get the latest build via JitPack as mentioned in #86.

AlexTrotsenko avatar Mar 09 '20 13:03 AlexTrotsenko