Null Pointer Exception
See original GitHub issueI am getting java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
error while compressing a 4K video with details:
Video track:
- Codec: H264-MPEG-4 AVC(part 10)
- Resolution: 3840*2160
- Frame rate: 30.010
Audio track
- Sample rate: 44100 Hz
- Codec: MPEG AAC Audio
- 1 channel
I have used simple transformation api as:
mediaTransformer.transform( requestId, inputUri, outputFilePath, targetVideoFormat, null, transformationListener, MediaTransformer.GRANULARITY_DEFAULT, null)
targetVideoFormat
is generated as:
`MediaFormat targetVideoFormat = new MediaFormat()
targetVideoFormat.setString(MediaFormat.KEY_MIME, “video/avc”); targetVideoFormat.setInteger(MediaFormat.KEY_WIDTH, 1920); targetVideoFormat.setInteger(MediaFormat.KEY_HEIGHT, 1080); targetVideoFormat.setInteger(MediaFormat.KEY_BIT_RATE, targetBitrate); targetVideoFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 5); targetVideoFormat.setInteger(MediaFormat.KEY_FRAME_RATE, 30); targetVideoFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface);`
Is there anything I am missing?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Thanks for the quick update. New version of LiTr (1.4.0) fixed the crash issue.
I also just released the new version of LiTr (1.4.0) which has this fix.