Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error while transcoding. while compressing file from iPad mini screen recording #210

Open
Tom3652 opened this issue Nov 17, 2024 · 0 comments

Comments

@Tom3652
Copy link

Tom3652 commented Nov 17, 2024

I am using your API to compress a video file, it works fine on 95% of my tests, but on one video i have this stack trace right after the begining :

E/TranscodeEngine(10577): Unexpected error while transcoding.
E/TranscodeEngine(10577): java.lang.IllegalStateException
E/TranscodeEngine(10577): 	at android.media.MediaCodec.native_dequeueInputBuffer(Native Method)
E/TranscodeEngine(10577): 	at android.media.MediaCodec.dequeueInputBuffer(MediaCodec.java:2855)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.Codecs$Codec.getInputBuffer(Codecs.kt:51)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.codec.Decoder.buffer(Decoder.kt:59)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.data.Reader.advance(Reader.kt:67)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.pipeline.PipelineItem.handle(Pipeline.kt:37)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.pipeline.Pipeline.execute(Pipeline.kt:84)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.Segment.advance(Segment.kt:17)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.transcode.DefaultTranscodeEngine.transcode(DefaultTranscodeEngine.kt:115)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.transcode.TranscodeEngine$Companion.transcode(TranscodeEngine.kt:48)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.transcode.TranscodeEngine.transcode(Unknown Source:2)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.Transcoder$1.call(Transcoder.java:102)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.Transcoder$1.call(Transcoder.java:99)
E/TranscodeEngine(10577): 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/TranscodeEngine(10577): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/TranscodeEngine(10577): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/TranscodeEngine(10577): 	at java.lang.Thread.run(Thread.java:923)

I can share the file with you if needed of course.
It is originally a video screen-recording of an iPad mini, but the other .mov i have tried are working so it doesn't come from that in my opinion but i am definitely not an expert so...

I am using this method to compress :

// The size is calculated dynamically to max width 960 or height 960 and keep the video ratio
 val resizer: (Size) -> ExactSize = { size ->
      ExactSize(width, height)
  }

  var videoTrackStrategy: TrackStrategy = DefaultVideoStrategy.Builder()
      .bitRate(2500000)
      .frameRate(30)
      .keyFrameInterval(3f)
      .addResizer(resizer)
      .build()

  val audioTrackStrategy = if (includeAudio) {
      val sampleRate = DefaultAudioStrategy.SAMPLE_RATE_AS_INPUT
      val channels = DefaultAudioStrategy.CHANNELS_AS_INPUT

      DefaultAudioStrategy.builder()
          .channels(channels)
          .sampleRate(sampleRate)
          .bitRate(128000)
          .build()
  } else {
      RemoveTrackStrategy()
  }

  val dataSource = if (startTime != null || duration != null) {
      val source = UriDataSource(context, Uri.parse(path))
      TrimDataSource(
          source,
          (1000 * 1000 * (startTime ?: 0)).toLong(),
          (1000 * 1000 * (duration ?: 0)).toLong()
      )
  } else {
      UriDataSource(context, Uri.parse(path))
  }

  transcodeFuture = Transcoder.into(destPath)
      .addDataSource(dataSource)
      .setAudioTrackStrategy(audioTrackStrategy)
      .setVideoTrackStrategy(videoTrackStrategy)
      .setListener(object : TranscoderListener {
          override fun onTranscodeProgress(progress: Double) {
          }
          override fun onTranscodeCompleted(successCode: Int) {
          }
          override fun onTranscodeCanceled() {
          }
          override fun onTranscodeFailed(exception: Throwable) {
          }
      }).transcode() 

Thanks in advance !

Here is the full stack trace in case it helps :

D/MPEG4Writer(10577): PreAllocation enabled
I/TranscodeEngine(10577): transcode(): called...
I/DataSources(10577): initializing videoSources...
I/DataSources(10577): initializing com.otaliastudios.transcoder.source.UriDataSource@c4300a1... (isInit=false)
I/DefaultDataSource(1)(10577): initialize(): initializing...
I/DataSources(10577): initializing audioSources...
I/DataSources(10577): initializing com.otaliastudios.transcoder.source.UriDataSource@c4300a1... (isInit=true)
I/DefaultDataSource(1)(10577): getTrackFormat(VIDEO)
I/DefaultDataSource(1)(10577): getTrackFormat(AUDIO)
I/DataSources(10577): computing audioSources, valid=1
I/Tracks  (10577): resolveTrack(AUDIO), sources=1, strategy=DefaultAudioStrategy
I/DefaultDataSource(1)(10577): getTrackFormat(AUDIO)
I/Tracks  (10577): resolveTrack(VIDEO), sources=1, strategy=DefaultVideoStrategy
I/DefaultDataSource(1)(10577): getTrackFormat(VIDEO)
I/DefaultVideoStrategy(10577): Input width&height: 1920x1260
I/DefaultVideoStrategy(10577): Output width&height: 960x630
I/Tracks  (10577): init: videoStatus=COMPRESSING, resolvedVideoStatus=COMPRESSING, videoFormat={color-format=2130708361, i-frame-interval=1.0, mime=video/avc, width=960, bitrate=1000000, rotation-degrees=0, frame-rate=30, height=630}
I/Tracks  (10577): init: audioStatus=COMPRESSING, resolvedAudioStatus=COMPRESSING, audioFormat={sample-rate=44100, mime=audio/mp4a-latm, channel-count=2, bitrate=128000, aac-profile=2}
I/TranscodeEngine(10577): Created Tracks, Segments, Timer...
I/DefaultDataSource(1)(10577): getLocation()
I/TranscodeEngine(10577): Set up the DataSink...
I/TranscodeEngine(10577): transcode(): about to start, durationUs=10077000, audioUs=10077000, videoUs=10077000
I/Segments(10577): tryCreateSegment(AUDIO, 0): created!
I/DefaultDataSource(1)(10577): selectTrack(AUDIO)
I/DefaultDataSource(1)(10577): selectTrack(VIDEO)
W/TranscodeEngine(10577): createPipeline(AUDIO, 0, COMPRESSING), format={sample-rate=44100, mime=audio/mp4a-latm, channel-count=2, bitrate=128000, aac-profile=2}
I/DefaultDataSource(1)(10577): getTrackFormat(AUDIO)
I/AudioDecoder(10577): init: instantiating codec...
I/MediaCodec(10577): (0xb4000076c58258c0) init name(c2.android.aac.decoder)
D/CCodec  (10577): allocate(c2.android.aac.decoder)
D/BufferPoolAccessor2.0(10577): bufferpool2 0xb4000076556de728 : 0(0 size) total buffers - 0(0 size) used buffers - 1/7 (recycle/alloc) - 16/7366 (fetch/transfer)
D/BufferPoolAccessor2.0(10577): Destruction - bufferpool2 0xb4000076556de728 cached: 0/0M, 0/0% in use; allocs: 7, 14% recycled; transfers: 7366, 100% unfetched
D/BufferPoolAccessor2.0(10577): Destruction - bufferpool2 0xb4000076557318d8 cached: 0/0M, 0/0% in use; allocs: 7, 14% recycled; transfers: 1216, 100% unfetched
I/CCodec  (10577): Created component [c2.android.aac.decoder]
D/CCodecConfig(10577): read media type: audio/mp4a-latm
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: algo.buffers.max-count.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: algo.buffers.allocator-ids.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: algo.buffers.pool-ids.values
I/CCodecConfig(10577): query failed after returning 19 values (BAD_INDEX)
D/CCodecConfig(10577): c2 config diff is Dict {
D/CCodecConfig(10577):   c2::u32 coded.aac-packaging.value = 0
D/CCodecConfig(10577):   c2::u32 coded.bitrate.value = 64000
D/CCodecConfig(10577):   c2::u32 coded.pl.level = 0
D/CCodecConfig(10577):   c2::u32 coded.pl.profile = 8192
D/CCodecConfig(10577):   c2::i32 coding.drc.album-mode.value = 0
D/CCodecConfig(10577):   c2::float coding.drc.attenuation-factor.value = 1
D/CCodecConfig(10577):   c2::float coding.drc.boost-factor.value = 1
D/CCodecConfig(10577):   c2::i32 coding.drc.compression-mode.value = 3
D/CCodecConfig(10577):   c2::i32 coding.drc.effect-type.value = 3
D/CCodecConfig(10577):   c2::float coding.drc.encoded-level.value = 0.25
D/CCodecConfig(10577):   c2::float coding.drc.reference-level.value = -16
D/CCodecConfig(10577):   c2::u32 input.buffers.max-size.value = 8192
D/CCodecConfig(10577):   c2::u32 input.delay.value = 0
D/CCodecConfig(10577):   string input.media-type.value = "audio/mp4a-latm"
D/CCodecConfig(10577):   c2::u32 output.delay.value = 2
D/CCodecConfig(10577):   c2::float output.drc.output-loudness.value = 0.25
D/CCodecConfig(10577):   string output.media-type.value = "audio/raw"
D/CCodecConfig(10577):   c2::u32 raw.channel-count.value = 1
D/CCodecConfig(10577):   c2::u32 raw.max-channel-count.value = 8
D/CCodecConfig(10577):   c2::u32 raw.sample-rate.value = 44100
D/CCodecConfig(10577): }
I/MediaCodec(10577): (0xb4000076c58258c0) Component Allocated (c2.android.aac.decoder)
I/MediaCodec(10577): (0xb4000076c581d840) init name(c2.android.aac.encoder)
D/CCodec  (10577): allocate(c2.android.aac.encoder)
I/CCodec  (10577): Created component [c2.android.aac.encoder]
D/CCodecConfig(10577): read media type: audio/mp4a-latm
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: algo.buffers.max-count.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: algo.buffers.allocator-ids.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater(10577): extent() != 1 for single value type: algo.buffers.pool-ids.values
I/CCodecConfig(10577): query failed after returning 9 values (BAD_INDEX)
D/CCodecConfig(10577): c2 config diff is Dict {
D/CCodecConfig(10577):   c2::u32 coded.bitrate.value = 64000
D/CCodecConfig(10577):   c2::u32 coded.pl.level = 0
D/CCodecConfig(10577):   c2::u32 coded.pl.profile = 8192
D/CCodecConfig(10577):   c2::u32 coding.aac-sbr-mode.value = 3
D/CCodecConfig(10577):   c2::u32 input.buffers.max-size.value = 2048
D/CCodecConfig(10577):   c2::u32 input.delay.value = 0
D/CCodecConfig(10577):   string input.media-type.value = "audio/raw"
D/CCodecConfig(10577):   string output.media-type.value = "audio/mp4a-latm"
D/CCodecConfig(10577):   c2::u32 raw.channel-count.value = 1
D/CCodecConfig(10577):   c2::u32 raw.sample-rate.value = 44100
D/CCodecConfig(10577): }
I/MediaCodec(10577): (0xb4000076c581d840) Component Allocated (c2.android.aac.encoder)
I/MediaCodec(10577): (0xb4000076c581d840) configure surface(0x0) crypto(0x0) flags(1)
D/MediaCodec(10577): (0xb4000076c581d840) configure format: AMessage(what = 0x00000000) = {
D/MediaCodec(10577):       int32_t sample-rate = 44100
D/MediaCodec(10577):       string mime = "audio/mp4a-latm"
D/MediaCodec(10577):       int32_t channel-count = 2
D/MediaCodec(10577):       int32_t bitrate = 128000
D/MediaCodec(10577):       int32_t aac-profile = 2
D/MediaCodec(10577):     }
D/CCodec  (10577): [c2.android.aac.encoder] buffers are bound to CCodec for this session
D/CCodecConfig(10577): no c2 equivalents for aac-profile
D/CCodecConfig(10577): no c2 equivalents for flags
D/CCodecConfig(10577): no c2 equivalents for encoder
D/CCodecConfig(10577): c2 config diff is   c2::u32 coded.bitrate.value = 128000
D/CCodecConfig(10577):   c2::u32 raw.channel-count.value = 2
W/Codec2Client(10577): query -- param skipped: index = 1107298332.
D/CCodec  (10577): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec  (10577):   int32_t aac-sbr-mode = 3
D/CCodec  (10577):   int32_t channel-count = 2
D/CCodec  (10577):   int32_t max-input-size = 16384
D/CCodec  (10577):   string mime = "audio/raw"
D/CCodec  (10577):   int32_t sample-rate = 44100
D/CCodec  (10577): } and output: AMessage(what = 0x00000000) = {
D/CCodec  (10577):   int32_t aac-sbr-mode = 3
D/CCodec  (10577):   int32_t bitrate = 128000
D/CCodec  (10577):   int32_t channel-count = 2
D/CCodec  (10577):   int32_t level = 0
D/CCodec  (10577):   int32_t max-bitrate = 128000
D/CCodec  (10577):   string mime = "audio/mp4a-latm"
D/CCodec  (10577):   int32_t profile = 2
D/CCodec  (10577):   int32_t sample-rate = 44100
D/CCodec  (10577): }
I/AudioEncoder(10577): ownsStart=true ownsStop=true dequeuedInputs=0 dequeuedOutputs=0 heldInputs=0
I/MediaCodec(10577): (0xb4000076c581d840) start
W/Codec2Client(10577): query -- param skipped: index = 1342179345.
W/Codec2Client(10577): query -- param skipped: index = 2415921170.
E/FMQ     (10577): grantorIdx must be less than 3
E/FMQ     (10577): grantorIdx must be less than 3
D/CCodecBufferChannel(10577): [c2.android.aac.encoder#97] Created input block pool with allocatorID 16 => poolID 24 - OK (0)
I/CCodecBufferChannel(10577): [c2.android.aac.encoder#97] Created output block pool with allocatorID 16 => poolID 803 - OK
D/CCodecBufferChannel(10577): [c2.android.aac.encoder#97] Configured output block pool ids 803 => OK
I/MediaCodec(10577): (0xb4000076c581d840) kWhatStartCompleted
I/AudioDecoder(10577): initialize()
I/MediaCodec(10577): (0xb4000076c58258c0) configure surface(0x0) crypto(0x0) flags(0)
D/MediaCodec(10577): (0xb4000076c58258c0) configure format: AMessage(what = 0x00000000) = {
D/MediaCodec(10577):       int32_t max-bitrate = 128000
D/MediaCodec(10577):       int32_t sample-rate = 44100
D/MediaCodec(10577):       int32_t track-id = 2
D/MediaCodec(10577):       string mime = "audio/mp4a-latm"
D/MediaCodec(10577):       int32_t profile = 2
D/MediaCodec(10577):       string language = "und"
D/MediaCodec(10577):       int32_t bitrate = 128000
D/MediaCodec(10577):       int32_t encoder-delay = 1610
D/MediaCodec(10577):       int64_t durationUs = 9891700
D/MediaCodec(10577):       int32_t channel-count = 2
D/MediaCodec(10577):       int32_t encoder-padding = 743
D/MediaCodec(10577):       int32_t max-input-size = 740
D/MediaCodec(10577):       Buffer csd-0 = {
D/MediaCodec(10577):         00000000:  12 10                                             ..
D/MediaCodec(10577):       }
D/MediaCodec(10577):     }
D/CCodec  (10577): [c2.android.aac.decoder] buffers are bound to CCodec for this session
D/CCodecConfig(10577): no c2 equivalents for track-id
D/CCodecConfig(10577): no c2 equivalents for language
D/CCodecConfig(10577): no c2 equivalents for encoder-delay
D/CCodecConfig(10577): no c2 equivalents for durationUs
D/CCodecConfig(10577): no c2 equivalents for encoder-padding
D/CCodecConfig(10577): no c2 equivalents for flags
D/CCodecConfig(10577): config failed => CORRUPTED
D/CCodecConfig(10577): c2 config diff is   c2::u32 raw.channel-count.value = 2
W/Codec2Client(10577): query -- param skipped: index = 1107298332.
D/CCodec  (10577): client requested max input size 740, which is smaller than what component recommended (16384); overriding with component recommendation.
W/CCodec  (10577): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
D/CCodec  (10577): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec  (10577):   int32_t aac-drc-album-mode = 0
D/CCodec  (10577):   int32_t aac-drc-boost-level = 127
D/CCodec  (10577):   int32_t aac-drc-cut-level = 127
D/CCodec  (10577):   int32_t aac-drc-effect-type = 3
D/CCodec  (10577):   int32_t aac-drc-heavy-compression = 3
D/CCodec  (10577):   int32_t aac-encoded-target-level = -1
D/CCodec  (10577):   int32_t aac-max-output-channel_count = 8
D/CCodec  (10577):   int32_t aac-target-ref-level = 64
D/CCodec  (10577):   int32_t channel-count = 2
D/CCodec  (10577):   int32_t level = 0
D/CCodec  (10577):   int32_t max-input-size = 16384
D/CCodec  (10577):   string mime = "audio/mp4a-latm"
D/CCodec  (10577):   int32_t profile = 2
D/CCodec  (10577):   int32_t sample-rate = 44100
D/CCodec  (10577): } and output: AMessage(what = 0x00000000) = {
D/CCodec  (10577):   int32_t aac-drc-album-mode = 0
D/CCodec  (10577):   int32_t aac-drc-boost-level = 127
D/CCodec  (10577):   int32_t aac-drc-cut-level = 127
D/CCodec  (10577):   int32_t aac-drc-effect-type = 3
D/CCodec  (10577):   int32_t aac-drc-heavy-compression = 3
D/CCodec  (10577):   int32_t aac-drc-output-loudness = -1
D/CCodec  (10577):   int32_t aac-encoded-target-level = -1
D/CCodec  (10577):   int32_t aac-max-output-channel_count = 8
D/CCodec  (10577):   int32_t aac-target-ref-level = 64
D/CCodec  (10577):   int32_t channel-count = 2
D/CCodec  (10577):   string mime = "audio/raw"
D/CCodec  (10577):   int32_t sample-rate = 44100
D/CCodec  (10577):   int32_t encoder-delay = 1610
D/CCodec  (10577):   int32_t
I/MediaCodec(10577): (0xb4000076c58258c0) start
W/Codec2Client(10577): query -- param skipped: index = 1342179345.
W/Codec2Client(10577): query -- param skipped: index = 2415921170.
W/Codec2Client(10577): query -- param skipped: index = 1610614798.
E/FMQ     (10577): grantorIdx must be less than 3
E/FMQ     (10577): grantorIdx must be less than 3
D/CCodecBufferChannel(10577): [c2.android.aac.decoder#510] Created input block pool with allocatorID 16 => poolID 25 - OK (0)
I/CCodecBufferChannel(10577): [c2.android.aac.decoder#510] Created output block pool with allocatorID 16 => poolID 804 - OK
D/CCodecBufferChannel(10577): [c2.android.aac.decoder#510] Configured output block pool ids 804 => OK
I/MediaCodec(10577): (0xb4000076c58258c0) kWhatStartCompleted
E/FMQ     (10577): grantorIdx must be less than 3
I/Segments(10577): tryCreateSegment(VIDEO, 0): created!
I/DefaultDataSource(1)(10577): selectTrack(VIDEO)
I/DefaultDataSource(1)(10577): selectTrack(AUDIO)
W/TranscodeEngine(10577): createPipeline(VIDEO, 0, COMPRESSING), format={color-format=2130708361, i-frame-interval=1.0, mime=video/avc, width=960, bitrate=1000000, rotation-degrees=0, frame-rate=30, height=630}
I/DefaultDataSource(1)(10577): getTrackFormat(VIDEO)
I/VideoDecoder(10577): init: instantiating codec...
I/MediaCodec(10577): (0xb4000076c583aa10) init name(OMX.qcom.video.decoder.avc)
I/OMXClient(10577): IOmx service obtained
I/MediaCodec(10577): (0xb4000076c583aa10) Component Allocated (OMX.qcom.video.decoder.avc)
I/DefaultDataSource(1)(10577): getOrientation()
I/VideoRenderer(10577): encoded output format: {color-format=2130708361, i-frame-interval=1.0, mime=video/avc, width=960, bitrate=1000000, rotation-degrees=0, frame-rate=30, height=630}
I/VideoRenderer(10577): output size=960x630, flipped=false
I/Codecs  (10577): Destination video surface size: 960x630 @ 0
I/Codecs  (10577): Destination video format: {color-format=2130708361, i-frame-interval=1.0, mime=video/avc, width=960, bitrate=1000000, rotation-degrees=0, frame-rate=30, height=630}
I/Codecs  (10577): Available encoders: OMX.qcom.video.encoder.avc (video/avc), OMX.qcom.video.encoder.h263sw (video/3gpp), OMX.qcom.video.encoder.hevc (video/hevc), OMX.qcom.video.encoder.mpeg4sw (video/mp4v-es), OMX.qcom.video.encoder.vp8 (video/x-vnd.on2.vp8), c2.android.avc.encoder (video/avc), OMX.google.h264.encoder (video/avc), c2.android.h263.encoder (video/3gpp), OMX.google.h263.encoder (video/3gpp), c2.android.hevc.encoder (video/hevc), c2.android.mpeg4.encoder (video/mp4v-es), OMX.google.mpeg4.encoder (video/mp4v-es), c2.android.vp8.encoder (video/x-vnd.on2.vp8), OMX.google.vp8.encoder (video/x-vnd.on2.vp8), c2.android.vp9.encoder (video/x-vnd.on2.vp9), OMX.google.vp9.encoder (video/x-vnd.on2.vp9)
I/MediaCodec(10577): (0xb4000076c58339a0) init name(OMX.qcom.video.encoder.avc)
I/OMXClient(10577): IOmx service obtained
I/MediaCodec(10577): (0xb4000076c58339a0) Component Allocated (OMX.qcom.video.encoder.avc)
I/MediaCodec(10577): (0xb4000076c58339a0) configure surface(0x0) crypto(0x0) flags(1)
D/MediaCodec(10577): (0xb4000076c58339a0) configure format: AMessage(what = 0x00000000) = {
D/MediaCodec(10577):       int32_t color-format = 2130708361
D/MediaCodec(10577):       float i-frame-interval = 1.000000
D/MediaCodec(10577):       string mime = "video/avc"
D/MediaCodec(10577):       int32_t width = 960
D/MediaCodec(10577):       int32_t bitrate = 1000000
D/MediaCodec(10577):       int32_t rotation-degrees = 0
D/MediaCodec(10577):       int32_t frame-rate = 30
D/MediaCodec(10577):       int32_t height = 630
D/MediaCodec(10577):     }
I/ExtendedACodec(10577): setupVideoEncoder()
I/ACodec  (10577): [OMX.qcom.video.encoder.avc] setupVideoEncoder mime(video/avc) colorFormat(7f000789)
W/OMXUtils(10577): do not know color format 0x7fa30c06 = 2141391878
W/OMXUtils(10577): do not know color format 0x7fa30c04 = 2141391876
W/OMXUtils(10577): do not know color format 0x7fa30c00 = 2141391872
W/OMXUtils(10577): do not know color format 0x7fa30c09 = 2141391881
W/OMXUtils(10577): do not know color format 0x7fa30c0a = 2141391882
W/OMXUtils(10577): do not know color format 0x7fa30c08 = 2141391880
W/OMXUtils(10577): do not know color format 0x7fa30c07 = 2141391879
W/OMXUtils(10577): do not know color format 0x7f000789 = 2130708361
I/ACodec  (10577): width height(960x630) stride(960) sliceHeight(630)
I/ACodec  (10577): bitrate(1000000) framerate(30.000000) compressionFormat(7)
I/ACodec  (10577): setupAVCEncoderParameters with [profile: High] [level: Level1]
I/ACodec  (10577): [OMX.qcom.video.encoder.avc] cannot encode HDR static metadata. Ignoring.
I/ACodec  (10577): setupVideoEncoder succeeded
I/ExtendedACodec(10577): [OMX.qcom.video.encoder.avc] configure, AMessage : AMessage(what = 'conf', target = 54) = {
I/ExtendedACodec(10577):   int32_t color-format = 2130708361
I/ExtendedACodec(10577):   float i-frame-interval = 1.000000
I/ExtendedACodec(10577):   string mime = "video/avc"
I/ExtendedACodec(10577):   int32_t width = 960
I/ExtendedACodec(10577):   int32_t bitrate = 1000000
I/ExtendedACodec(10577):   int32_t rotation-degrees = 0
I/ExtendedACodec(10577):   int32_t frame-rate = 30
I/ExtendedACodec(10577):   int32_t height = 630
I/ExtendedACodec(10577):   int32_t flags = 1
I/ExtendedACodec(10577):   int32_t encoder = 1
I/ExtendedACodec(10577): }
W/OMXUtils(10577): do not know color format 0x7f000789 = 2130708361
I/Codecs  (10577): Selected encoder OMX.qcom.video.encoder.avc
I/Codecs  (10577): Creating OpenGL context on Thread[TranscoderThread #2,5,main] (true)
I/VideoEncoder(10577): ownsStart=true ownsStop=true dequeuedInputs=0 dequeuedOutputs=0 heldInputs=0
I/MediaCodec(10577): (0xb4000076c58339a0) start
I/MediaCodec(10577): (0xb4000076c58339a0) kWhatStartCompleted
I/VideoDecoder(10577): initialize()
I/VideoRenderer(10577): encoded input format: {track-id=1, level=16384, mime=video/avc, frame-count=603, profile=8, language=und, color-standard=1, display-width=1920, csd-1=java.nio.HeapByteBuffer[pos=0 lim=8 cap=8], color-transfer=2, durationUs=10076666, display-height=1260, width=1920, color-range=2, max-input-size=166231, frame-rate=60, height=1260, csd-0=java.nio.HeapByteBuffer[pos=0 lim=20 cap=20]}
I/MediaCodec(10577): (0xb4000076c583aa10) configure surface(0xb4000076f57601f0) crypto(0x0) flags(0)
D/MediaCodec(10577): (0xb4000076c583aa10) configure format: AMessage(what = 0x00000000) = {
D/MediaCodec(10577):       int32_t track-id = 1
D/MediaCodec(10577):       int32_t level = 16384
D/MediaCodec(10577):       string mime = "video/avc"
D/MediaCodec(10577):       int32_t frame-count = 603
D/MediaCodec(10577):       int32_t profile = 8
D/MediaCodec(10577):       string language = "und"
D/MediaCodec(10577):       int32_t color-standard = 1
D/MediaCodec(10577):       int32_t display-width = 1920
D/MediaCodec(10577):       Buffer csd-1 = {
D/MediaCodec(10577):         00000000:  00 00 00 01 28 ee 3c b0                           ....(.<.
D/MediaCodec(10577):       }
D/MediaCodec(10577):       int32_t color-transfer = 2
D/MediaCodec(10577):       int64_t durationUs = 10076666
D/MediaCodec(10577):       int32_t display-height = 1260
D/MediaCodec(10577):       int32_t width = 1920
D/MediaCodec(10577):       int32_t color-range = 2
D/MediaCodec(10577):       int32_t max-input-size = 166231
D/MediaCodec(10577):       int32_t frame-rate = 60
D/MediaCodec(10577):       int32_t rotation-degrees = 0
D/MediaCodec(10577):       int32_t height = 1260
D/MediaCodec(10577):       Buffer csd-0 = {
D/MediaCodec(10577):         00000000:  00 00 00 01 27 64 00 32  ac 56 c0 78 02 7f ee 6e  ....'d.2.V.x...n
D/MediaCodec(10577):         00000010:  02 1a 02 04                                       ....
D/MediaCodec(10577):       }
D/MediaCodec(10577):     }
D/SurfaceUtils(10577): connecting to surface 0xb4000076f5760200, reason connectToSurface
I/MediaCodec(10577): [OMX.qcom.video.decoder.avc] setting surface generation to 10830855
D/SurfaceUtils(10577): disconnecting from surface 0xb4000076f5760200, reason connectToSurface(reconnect)
D/SurfaceUtils(10577): connecting to surface 0xb4000076f5760200, reason connectToSurface(reconnect)
I/ACodec  (10577): DRC Mode: Dynamic Buffer Mode
I/ExtendedACodec(10577): setupVideoDecoder()
I/ACodec  (10577): [OMX.qcom.video.decoder.avc] setupVideoDecoder Width Height (1920x1260)
I/ACodec  (10577): mime (video/avc) compressionFormat (7)
I/ExtendedACodec(10577): Decoder will be in frame by frame mode
I/MediaCodec(10577): (0xb4000076c583aa10) start
D/SurfaceUtils(10577): set up nativeWindow 0xb4000076f5760200 for 1920x1260, color 0x7fa30c06, rotation 0, usage 0x20002900
I/MediaCodec(10577): (0xb4000076c583aa10) kWhatStartCompleted
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): INFO_OUTPUT_FORMAT_CHANGED! format={max-bitrate=128000, aac-sbr-mode=3, sample-rate=44100, level=0, mime=audio/mp4a-latm, profile=2, channel-count=2, bitrate=128000, csd-0=java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]}
I/Writer  (10577): handleFormat({max-bitrate=128000, aac-sbr-mode=3, sample-rate=44100, level=0, mime=audio/mp4a-latm, profile=2, channel-count=2, bitrate=128000, csd-0=java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]})
I/DefaultDataSink(10577): setTrackFormat(AUDIO) format={max-bitrate=128000, aac-sbr-mode=3, sample-rate=44100, level=0, mime=audio/mp4a-latm, profile=2, channel-count=2, bitrate=128000, csd-0=java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]}
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
D/SurfaceUtils(10577): set up nativeWindow 0xb4000076f5760200 for 1920x1264, color 0x7fa30c06, rotation 0, usage 0x20002900
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
D/MediaCodec(10577): (0xb4000076c583aa10) kWhatOutputBuffersChanged
I/VideoDecoder(10577): buffer() failed with -1. dequeuedInputs=0 dequeuedOutputs=0 heldInputs=0
I/VideoDecoder(10577): drain(): got INFO_OUTPUT_BUFFERS_CHANGED, retrying.
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): buffer() failed with -1. dequeuedInputs=0 dequeuedOutputs=0 heldInputs=0
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): buffer() failed with -1. dequeuedInputs=0 dequeuedOutputs=0 heldInputs=0
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
I/AudioDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
I/AudioEngine(10577): drain(): not ready, waiting... (0 in queue)
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
E/FMQ     (10577): grantorIdx must be less than 3
D/CCodecConfig(10577): c2 config diff is   c2::i32 coding.drc.compression-mode.value = 1
D/CCodecConfig(10577):   c2::u32 raw.channel-mask.value = 12
D/CCodecBuffers(10577): [c2.android.aac.decoder#510:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
D/CCodecBuffers(10577):   int32_t aac-drc-album-mode = 0
D/CCodecBuffers(10577):   int32_t aac-drc-boost-level = 127
D/CCodecBuffers(10577):   int32_t aac-drc-cut-level = 127
D/CCodecBuffers(10577):   int32_t aac-drc-effect-type = 3
D/CCodecBuffers(10577):   int32_t aac-drc-heavy-compression = 1
D/CCodecBuffers(10577):   int32_t aac-drc-output-loudness = -1
D/CCodecBuffers(10577):   int32_t aac-encoded-target-level = -1
D/CCodecBuffers(10577):   int32_t aac-max-output-channel_count = 8
D/CCodecBuffers(10577):   int32_t aac-target-ref-level = 64
D/CCodecBuffers(10577):   int32_t channel-count = 2
D/CCodecBuffers(10577):   string mime = "audio/raw"
D/CCodecBuffers(10577):   int32_t sample-rate = 44100
D/CCodecBuffers(10577):   int32_t encoder-delay = 1610
D/CCodecBuffers(10577):   int32_t encoder-padding = 743
D/CCodecBuffers(10577): }
I/VideoDecoder(10577): drain(): got INFO_TRY_AGAIN_LATER, waiting.
E/ACodec  (10577): signalError(omxError 0x80001001, internalError -2147483648)
E/MediaCodec(10577): Codec reported err 0x80001001, actionCode 0, while in state 6
D/SurfaceUtils(10577): disconnecting from surface 0xb4000076f5760200, reason disconnectFromSurface
I/VideoEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
E/ACodec  (10577): [OMX.qcom.video.decoder.avc] ERROR(0x80001009)
E/ACodec  (10577): signalError(omxError 0x80001009, internalError -2147483648)
I/Reader  (10577): Returning State.Wait because source can't read AUDIO right now.
E/MediaCodec(10577): Codec reported err 0x80001009, actionCode 0, while in state 0
I/AudioDecoder(10577): drain(): got INFO_OUTPUT_FORMAT_CHANGED, handling format and retrying. format={aac-drc-heavy-compression=1, sample-rate=44100, aac-drc-boost-level=127, mime=audio/raw, aac-drc-cut-level=127, aac-max-output-channel_count=8, aac-target-ref-level=64, aac-drc-album-mode=0, encoder-delay=1610, aac-drc-output-loudness=-1, channel-count=2, aac-drc-effect-type=3, aac-encoded-target-level=-1, encoder-padding=743}
I/AudioEngine(10577): handleRawFormat({aac-drc-heavy-compression=1, sample-rate=44100, aac-drc-boost-level=127, mime=audio/raw, aac-drc-cut-level=127, aac-max-output-channel_count=8, aac-target-ref-level=64, aac-drc-album-mode=0, encoder-delay=1610, aac-drc-output-loudness=-1, channel-count=2, aac-drc-effect-type=3, aac-encoded-target-level=-1, encoder-padding=743})
I/AudioInterpolator0/1(10577): Found output base timestamp: 0
W/AudioEngine(10577): enqueued invalid buffer (0, 0)
I/AudioEngine(10577): drain(): no chunks, waiting...
I/AudioEncoder(10577): Can't dequeue output buffer: INFO_TRY_AGAIN_LATER
E/TranscodeEngine(10577): Unexpected error while transcoding.
E/TranscodeEngine(10577): java.lang.IllegalStateException
E/TranscodeEngine(10577): 	at android.media.MediaCodec.native_dequeueInputBuffer(Native Method)
E/TranscodeEngine(10577): 	at android.media.MediaCodec.dequeueInputBuffer(MediaCodec.java:2855)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.Codecs$Codec.getInputBuffer(Codecs.kt:51)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.codec.Decoder.buffer(Decoder.kt:59)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.data.Reader.advance(Reader.kt:67)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.pipeline.PipelineItem.handle(Pipeline.kt:37)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.pipeline.Pipeline.execute(Pipeline.kt:84)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.Segment.advance(Segment.kt:17)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.transcode.DefaultTranscodeEngine.transcode(DefaultTranscodeEngine.kt:115)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.transcode.TranscodeEngine$Companion.transcode(TranscodeEngine.kt:48)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.internal.transcode.TranscodeEngine.transcode(Unknown Source:2)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.Transcoder$1.call(Transcoder.java:102)
E/TranscodeEngine(10577): 	at com.otaliastudios.transcoder.Transcoder$1.call(Transcoder.java:99)
E/TranscodeEngine(10577): 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/TranscodeEngine(10577): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/TranscodeEngine(10577): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/TranscodeEngine(10577): 	at java.lang.Thread.run(Thread.java:923)
I/VideoDecoder(10577): release: releasing codec. dequeuedInputs=0 dequeuedOutputs=0 heldInputs=0
I/MediaCodec(10577): (0xb4000076c583aa10) stop
D/MPEG4Writer(10577): reset()
D/MPEG4Writer(10577): release()
D/MPEG4Writer(10577): ftruncate mPreAllocateFileEndOffset:0 mOffset:0 mMdatEndOffset:0 diff:0
@Tom3652 Tom3652 changed the title Some files have an internal Unexpected error while transcoding. while compressing file from iPad mini screen recording Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant