When I try to compress 191 fps screenrecording to be 30/60 fps, the app does crash. However it doesn't happen when I set to input FPS.
I would to compress my 191 FPS into 30 FPS without outputting an error. It would be amazing if I will be able to save it to my gallery.
Device Manufacturer* (e.g. Samsung): Xiaomi
Device: Xiaomi 24069PC21G
Android Version: 16 (SDK 36)
App Version: 1.5.7
Original: 2448x1220 @ 191.0fps
Target: 1220p @ 60fps
Codec: video/hevc
Error: Codec exception: CodecInfo{type=VideoEncoder, configurationFormat={exo-pixel-width-height-ratio-float=1.0, sar-width=1, color-format=2130708361, i-frame-interval=1.0, is-forced-subtitle=0, importance=2000, mime=video/hevc, bitrate=13248048, codecs-string=avc1.640034, priority=1, operating-rate=2147483647, encoder-delay=0, sar-height=1, width=2448, bitrate-mode=2, is-autoselect=0, is-default=0, encoder-padding=0, frame-rate=191, rotation-degrees=0, height=1220}, name=c2.qti.hevc.encoder}
Stack Trace:
androidx.media3.transformer.ExportException: Codec exception: CodecInfo{type=VideoEncoder, configurationFormat={exo-pixel-width-height-ratio-float=1.0, sar-width=1, color-format=2130708361, i-frame-interval=1.0, is-forced-subtitle=0, importance=2000, mime=video/hevc, bitrate=13248048, codecs-string=avc1.640034, priority=1, operating-rate=2147483647, encoder-delay=0, sar-height=1, width=2448, bitrate-mode=2, is-autoselect=0, is-default=0, encoder-padding=0, frame-rate=191, rotation-degrees=0, height=1220}, name=c2.qti.hevc.encoder}
at androidx.media3.transformer.DefaultCodec.createExportException(DefaultCodec.java:465)
at androidx.media3.transformer.DefaultCodec.createExportException(DefaultCodec.java:443)
at androidx.media3.transformer.DefaultCodec.maybeDequeueOutputBuffer(DefaultCodec.java:390)
at androidx.media3.transformer.DefaultCodec.getOutputFormat(DefaultCodec.java:279)
at androidx.media3.transformer.VideoSampleExporter$EncoderWrapper.getOutputFormat(VideoSampleExporter.java:428)
at androidx.media3.transformer.VideoSampleExporter.getMuxerInputFormat(VideoSampleExporter.java:179)
at androidx.media3.transformer.SampleExporter.feedMuxer(SampleExporter.java:105)
at androidx.media3.transformer.SampleExporter.processData(SampleExporter.java:79)
at androidx.media3.transformer.TransformerInternal.drainExportersInternal(TransformerInternal.java:390)
at androidx.media3.transformer.TransformerInternal.handleMessage(TransformerInternal.java:358)
at androidx.media3.transformer.TransformerInternal.$r8$lambda$bzZKK-tnQO9QOb4NEtMsm46hw_4(Unknown Source:0)
at androidx.media3.transformer.TransformerInternal$$ExternalSyntheticLambda0.handleMessage(D8$$SyntheticClass:0)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:248)
at android.os.Looper.loop(Looper.java:338)
at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: java.lang.IllegalStateException: Invalid to call at Released state; only valid in executing state
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:4287)
at androidx.media3.transformer.DefaultCodec.maybeDequeueOutputBuffer(DefaultCodec.java:387)
... 13 more
Prerequisites
Issue Description (required)
When I try to compress 191 fps screenrecording to be 30/60 fps, the app does crash. However it doesn't happen when I set to input FPS.
Expected Behaviour (required)
I would to compress my 191 FPS into 30 FPS without outputting an error. It would be amazing if I will be able to save it to my gallery.
Device Info (required)
Device Manufacturer* (e.g. Samsung): Xiaomi
App Version: 1.5.7
Device: Xiaomi 24069PC21G (Android 16)
Supported Encoders: video/avc, video/hevc
Screenshots (required)
Logcat (Error log)