linkedin / LiTr

Lightweight hardware accelerated video/audio transcoder for Android.
BSD 2-Clause "Simplified" License
611 stars 85 forks source link

TrackTranscoderException: No decoder found.Media transformation failed while trying to decode 4k video #70

Open pouyankhedri opened 3 years ago

pouyankhedri commented 3 years ago

Hi. when I try to compress a 4k video I get this exception:

com.linkedin.android.litr.exception.TrackTranscoderException: No decoder found.Media transformation failed for job id: 5e323a2b-4bf9-4f5a-b541-55edc9be47c5 Media format: {max-bitrate=23121000, track-id=1, level=32768, mime=video/avc, profile=65536, bitrate=7025384, language=und, display-width=3840, csd-1=java.nio.HeapByteBuffer[pos=0 lim=8 cap=8], durationUs=229200000, display-height=2160, width=3840, max-input-size=539574, frame-rate=25, height=2160, csd-0=java.nio.HeapByteBuffer[pos=0 lim=33 cap=33]} Available media codec info list (Name, IsEncoder, Supported Types): MediaCodecInfo: OMX.google.aac.decoder,false,[audio/mp4a-latm] MediaCodecInfo: OMX.google.amrnb.decoder,false,[audio/3gpp] MediaCodecInfo: OMX.google.amrwb.decoder,false,[audio/amr-wb] MediaCodecInfo: OMX.google.flac.decoder,false,[audio/flac] MediaCodecInfo: OMX.google.g711.alaw.decoder,false,[audio/g711-alaw] MediaCodecInfo: OMX.google.g711.mlaw.decoder,false,[audio/g711-mlaw] MediaCodecInfo: OMX.MTK.AUDIO.DECODER.GSM,false,[audio/gsm] MediaCodecInfo: OMX.MTK.AUDIO.DECODER.MP3,false,[audio/mpeg] MediaCodecInfo: OMX.google.mp3.decoder,false,[audio/mpeg] MediaCodecInfo: OMX.google.opus.decoder,false,[audio/opus] MediaCodecInfo: OMX.google.raw.decoder,false,[audio/raw] MediaCodecInfo: OMX.google.vorbis.decoder,false,[audio/vorbis] MediaCodecInfo: OMX.google.aac.encoder,true,[audio/mp4a-latm] MediaCodecInfo: OMX.google.amrnb.encoder,true,[audio/3gpp] MediaCodecInfo: OMX.google.amrwb.encoder,true,[audio/amr-wb] MediaCodecInfo: OMX.google.flac.encoder,true,[audio/flac] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.AVC,false,[video/avc] MediaCodecInfo: OMX.google.h264.decoder,false,[video/avc] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.H263,false,[video/3gpp] MediaCodecInfo: OMX.google.h263.decoder,false,[video/3gpp] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.HEVC,false,[video/hevc] MediaCodecInfo: OMX.google.hevc.decoder,false,[video/hevc] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.MPEG2,false,[video/mpeg2] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.MPEG4,false,[video/mp4v-es] MediaCodecInfo: OMX.google.mpeg4.decoder,false,[video/mp4v-es] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.VPX,false,[video/x-vnd.on2.vp8] MediaCodecInfo: OMX.google.vp8.decoder,false,[video/x-vnd.on2.vp8] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.VP9,false,[video/x-vnd.on2.vp9] MediaCodecInfo: OMX.google.vp9.decoder,false,[video/x-vnd.on2.vp9] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.XVID,false,[video/xvid] MediaCodecInfo: OMX.MTK.VIDEO.ENCODER.AVC,true,[video/avc] MediaCodecInfo: OMX.google.h264.encoder,true,[video/avc] MediaCodecInfo: OMX.MTK.VIDEO.ENCODER.H263,true,[video/3gpp] MediaCodecInfo: OMX.google.h263.encoder,true,[video/3gpp] MediaCodecInfo: OMX.MTK.VIDEO.ENCODER.MPEG4,true,[video/mp4v-es] MediaCodecInfo: OMX.google.mpeg4.encoder,true,[video/mp4v-es] MediaCodecInfo: OMX.google.vp8.encoder,true,[video/x-vnd.on2.vp8]

can anyone help me with this?

izzytwosheds commented 3 years ago

Hi, Which device is this happening on? Does that video play on that device? Can you transcode lower resolution video? It is possible you might be hitting limit of device's encoder hardware capability - it is possible that hardware can only play 4K video and not encode a video at the same time.

pouyankhedri commented 3 years ago

Hi, Which device is this happening on? Does that video play on that device? Can you transcode lower resolution video? It is possible you might be hitting limit of device's encoder hardware capability - it is possible that hardware can only play 4K video and not encode a video at the same time.

It is a HUAWEI Y5 2019. the device plays the video and yes it transcodes other videos with no problems.

izzytwosheds commented 3 years ago

Looks like that device officially supports only 1080p recording and playback, which indicates that 4K transcoding might be beyond capabilities of its encoder hardware. We are planning to experiment with software codec support in LiTr, which should remove hardware limitation but make transcoding slower. Stay tuned.