deepmedia / Transcoder

🎞 Hardware-accelerated video transcoding using Android MediaCodec APIs. Supports cropping, concatenation, clipping, audio processing, video speed and much more.
https://opensource.deepmedia.io/transcoder
Apache License 2.0
783 stars 166 forks source link

Library completely broken since 0.10.0 on some devices #138

Closed alaegin closed 2 months ago

alaegin commented 3 years ago

Hello! We have just started to use this library and realized that it's completely broken on some devices since 0.10.0.

Prerequisites:

The main problem is that the library crashes unexpectedly in some cases or transcode video with artifacts.

We have several cases:

  1. Library crashes with exception java.lang.IllegalStateException: Failed to stop the muxer. Link
  2. Library crashes with exception TranscodeEngine: Unexpected error while transcoding. java.nio.BufferOverflowException. Link
  3. Library transcode video with artifacts. Link to video

The code we use to call Transcoder:

Transcoder.into(filesProvider.getTempResultFile().absolutePath)
    .apply {
        files.forEach { addDataSource(it.absolutePath) }
    }
    .setListener(...)
    .transcode().get()

It seems that rewriting #118 of the transcoder pipeline broke something important.

natario1 commented 3 years ago

Can you provide the media files to reproduce these issues in the demo app?

alaegin commented 3 years ago

Videos that were converted with artifacts on OnePlus phones but without them on the android emulator: Part #1 Part #2

Videos from OnePlus 5 Part #1 Part #2

jumperson commented 2 years ago

Library transcode video with artifacts. Link to video

I have same issue in below devices.

natario1 commented 2 months ago

IMO these issues should be fixed by latest PRs - #159, #200, #201 . Another issue that remains related to buffer overflow is tracked at #163 .