android-transcoder
android-transcoder copied to clipboard
getSpsBuffer get an ArrayIndexOutOfBoundsException
@ypresto Thanks for your sharing the java api transcoder library, I encountered a error when I use a Huawei p7 mobile phone. And transcode failed indeed. But in my another nexus 5, it's ok. The log file:
https://drive.google.com/open?id=10YlNODWx-I7sG-BobckGWX01yIl8uYokpDCDjT-k89Q
Android version 4.4.2
Hope for your reply.
Thanks, Zach
It can be caused by mp4 file which is not supported by that device. Is that video is recorded by p7 phone itself?
If not, can you check profile and level of mp4 avc video track? Useful app for checking format: http://www.pozdeev.com/invisor/
Thanks for your reply. Actually the file is recorded by nexus 5. The video track info below using Invisor:
https://drive.google.com/open?id=1UOdVKFB0RmBUfM6_0Uw4W9Sbk138uKkN0FVjt3PvAmQ
I also tried recorded a mp4 file by p7 itself, but it seemed that can't transcode either. It has the same exception.
And this video info is below:
https://drive.google.com/open?id=1YjsDjZFV0OqPgDOwAXkrktaZVrNABY4dFtpKUSAlbvM
Thanks, Zach
Could you dump contents of sourceBuffer
in AvcCsdUtils.getSpsBuffer()?
It is strange to only have NAL header in csd-0...
csd-0 is defined as SPS in document. So if codec does not returns it, that codec is buggy. https://developer.android.com/reference/android/media/MediaCodec.html
It's very strange that when I tried again, I get an another error, not like this issue. so I open a new issue 27...