-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
Package Version
0.2.3
Flutter Version
3.35.2
Platforms
Android
How to reproduce?
Select a file from device storage which uses the HEVC export format (used by Samsung phones) and try adding in a filter or emoji or text. Although just trimming or cropping or removing sound of the video works perfectly fine.
Logs (optional)
I/VRI[MainActivity]@a704c20(15016): call setFrameRateCategory for touch hint category=high hint, reason=touch, vri=VRI[MainActivity]@a704c20 D/ProVideoEditor-Renderer(15016): Applying trim: start=0 ms, end=12000 ms V/MediaMetadataRetriever(15016): constructor V/MediaMetadataRetriever(15016): setDataSource(373, 0, 576460752303423487) V/MediaMetadataRetriever(15016): setDataSource(fd) return(0) V/MediaMetadataRetriever(15016): extractMetadata(18) V/MediaMetadataRetriever(15016): extractMetadata(19) V/MediaMetadataRetriever(15016): extractMetadata(24) V/MediaMetadataRetriever(15016): destructor V/MediaMetadataRetriever(15016): disconnect D/ProVideoEditor-Renderer(15016): Applying Image-Layer: Size 1080 x 1920 D/ProVideoEditor-Renderer(15016): Requested Bitrate: 55359644 D/ProVideoEditor-Renderer(15016): CBR supported, applying CBR mode I/TransformerInternal(15016): Init dbbbd4f [AndroidXMedia3/1.7.1] [dm3q, SM-S918U1, samsung, 35] I/ExoPlayerImpl(15016): Init 6b7dcdc [AndroidXMedia3/1.7.1] [dm3q, SM-S918U1, samsung, 35] W/libc (15016): Access denied finding property "vendor.display.enable_optimal_refresh_rate" W/libc (15016): Access denied finding property "vendor.gpp.create_frc_extension" D/MediaCodecInfo(15016): NoSupport [codec.profileLevel, hvc1.2.4.H150.B0, video/hevc] [c2.android.hevc.decoder, video/hevc] [dm3q, SM-S918U1, samsung, 35] I/CCodec (15016): state->set(ALLOCATING) I/CCodec (15016): allocate(c2.qti.hevc.decoder) I/CCodec (15016): setting up 'default' as default (vendor) store I/CCodec (15016): Created component [c2.qti.hevc.decoder] I/CCodec (15016): [c2.qti.hevc.decoder] state->set(ALLOCATED) D/CCodecConfig(15016): read media type: video/hevc D/ReflectedParamUpdater(15016): ignored struct field vendor.output.configs.portConfigs D/ReflectedParamUpdater(15016): ignored struct field vendor.input.configs.portConfigs D/ReflectedParamUpdater(15016): ignored struct field vendor.input.configs.portConfigs D/ReflectedParamUpdater(15016): ignored struct field vendor.output.configs.portConfigs D/ReflectedParamUpdater(15016): extent() != 1 for single value type: output.buffers.pool-ids.values D/ReflectedParamUpdater(15016): extent() != 1 for single value type: vendor.qti-ext-transcode-info-stats.stats_info D/ReflectedParamUpdater(15016): extent() != 1 for single value type: output.subscribed-indices.values D/CCodecConfig(15016): ignoring local param raw.size (0xd2001800) as it is already supported D/CCodecConfig(15016): ignoring local param default.color (0x5200180b) as it is already supported D/CCodecConfig(15016): ignoring local param raw.hdr-static-info (0xd200180a) as it is already supported I/CCodecConfig(15016): query failed after returning 18 values (BAD_INDEX) D/CCodecConfig(15016): c2 config diff is Dict { D/CCodecConfig(15016): c2::i32 algo.priority.value = -1 D/CCodecConfig(15016): c2::float algo.rate.value = 30 D/CCodecConfig(15016): c2::u32 algo.secure-mode.value = 0 D/CCodecConfig(15016): c2::float coded.frame-rate.value = 30 D/CCodecConfig(15016): c2::u32 coded.pl.level = 0 D/CCodecConfig(15016): c2::u32 coded.pl.profile = 24576 D/CCodecConfig(15016): c2::u32 coded.vui.color.matrix = 255 D/CCodecConfig(15016): c2::u32 coded.vui.color.primaries = 0 D/CCodecConfig(15016): c2::u32 coded.vui.color.range = 0 D/CCodecConfig(15016): c2::u32 coded.vui.color.transfer = 255 D/CCodecConfig(15016): c2::u32 default.color.matrix = 0 D/CCodecConfig(15016): c2::u32 default.color.primaries = 0 D/CCodecConfig(15016): c2::u32 default.color.range = 0 D/CCodecConfig(15016): c2::u32 default.color.transfer = 0 D/CCodecConfig(15016): c2::u32 input.buffers.max-size.value = 8388608 D/CCodecConfig(15016): c2::u32 input.delay.value = 0 D/CCodecConfig(15016): string input.media-type.value = "video/hevc" D/CCodecConfig(15016): c2::u32 output.delay.value = 6 D/CCodecConfig(15016): Buffer output.hdr10-plus-info.value = { D/CCodecConfig(15016): } D/CCodecConfig(15016): string output.media-type.value = "video/raw" D/CCodecConfig(15016): c2::u32 raw.color.matrix = 0 D/CCodecConfig(15016): c2::u32 raw.color.primaries = 0 D/CCodecConfig(15016): c2::u32 raw.color.range = 0 D/CCodecConfig(15016): c2::u32 raw.color.transfer = 0 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.blue.x = 0 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.blue.y = 0 D/CCodecConfig(15016): W/ColorUtils(15016): expected specified color aspects (0:0:0:0) W/libc (15016): Access denied finding property "vendor.display.enable_optimal_refresh_rate" W/libc (15016): Access denied finding property "vendor.gpp.create_frc_extension" D/SurfaceUtils(15016): connecting to surface 0xb400006ea3273010, reason connectToSurface I/MediaCodec(15016): [c2.qti.hevc.decoder] setting surface generation to 15376394 D/SurfaceUtils(15016): disconnecting from surface 0xb400006ea3273010, reason connectToSurface(reconnect) D/SurfaceUtils(15016): connecting to surface 0xb400006ea3273000, reason connectToSurface(reconnect-with-listener) D/SurfaceUtils(15016): legacy buffer drop disabled: target sdk (36) D/CCodec (15016): [c2.qti.hevc.decoder] buffers are bound to CCodec for this session I/CCodec (15016): appPid(15016) width(1920) height(1080) I/CCodec (15016): encoded name : V-Y29tLmVwaWNwbGF5cy5kZXZlbG9wbWVudA==:com.epicplays.development D/CCodecConfig(15016): no c2 equivalents for exo-pixel-width-height-ratio-float D/CCodecConfig(15016): no c2 equivalents for allow-frame-drop D/CCodecConfig(15016): no c2 equivalents for importance D/CCodecConfig(15016): no c2 equivalents for color-standard D/CCodecConfig(15016): no c2 equivalents for is-autoselect D/CCodecConfig(15016): no c2 equivalents for is-default D/CCodecConfig(15016): no c2 equivalents for track-id D/CCodecConfig(15016): no c2 equivalents for is-forced-subtitle D/CCodecConfig(15016): no c2 equivalents for codecs-string D/CCodecConfig(15016): no c2 equivalents for encoder-delay D/CCodecConfig(15016): no c2 equivalents for encoder-padding D/CCodecConfig(15016): no c2 equivalents for native-window D/CCodecConfig(15016): no c2 equivalents for native-window-generation D/CCodecConfig(15016): no c2 equivalents for flags D/CCodecConfig(15016): c2 config diff is c2::float coded.frame-rate.value = 59.2824 D/CCodecConfig(15016): c2::u32 coded.pl.level = 24834 D/CCodecConfig(15016): c2::u32 coded.pl.profile = 24577 D/CCodecConfig(15016): c2::u32 default.color.matrix = 5 D/CCodecConfig(15016): c2::u32 default.color.primaries = 6 D/CCodecConfig(15016): c2::u32 default.color.range = 2 D/CCodecConfig(15016): c2::u32 default.color.transfer = 6 D/CCodecConfig(15016): c2::i32 raw.rotation.value = -90 D/CCodecConfig(15016): c2::u32 raw.size.height = 1080 D/CCodecConfig(15016): c2::u32 raw.size.width = 1920 W/Codec2Client(15016): query -- param skipped: index = 1107298332. D/CCodec (15016): client requested max input size 472211, which is smaller than what component recommended (8388608); overriding with component recommendation. W/CCodec (15016): 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 (15016): encoding statistics level = 0 D/CCodec (15016): setup formats input: AMessage(what = 0x00000000) = { D/CCodec (15016): int32_t feature-secure-playback = 0 D/CCodec (15016): int32_t frame-rate = 59 D/CCodec (15016): int32_t height = 1080 D/CCodec (15016): int32_t max-input-size = 8388608 D/CCodec (15016): string mime = "video/hevc" D/CCodec (15016): int32_t priority = 1 D/CCodec (15016): int32_t profile = 2 D/CCodec (15016): int32_t width = 1920 D/CCodec (15016): Rect crop(0, 0, 1919, 1079) D/CCodec (15016): int32_t level = 32768 D/CCodec (15016): } D/CCodec (15016): setup formats output: AMessage(what = 0x00000000) = { D/CCodec (15016): int32_t android._color-format = 0 D/CCodec (15016): int32_t android._video-scaling = 1 D/CCodec (15016): int32_t android._dataspace = 260 D/CCodec (15016): int32_t color-standard = 1 D/CCodec (15016): int32_t color-range = 2 D/CCodec (15016): int32_t color-transfer = 3 D/CCodec (15016): int32_t sar-height = 1 D/CCodec (15016): int32_t rotation-degrees = 90 D/CCodec (15016): Buffer hdr-static-info = { D/CCodec (15016): 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ D/CCodec (15016): 00000010: 00 00 00 00 00 00 00 00 00 ......... D/CCodec (15016): } D/CCodec (15016): int32_t sar-width = 1 D/CCodec (15016): Rect crop(0, 0, 1919, 1079) D/CCodec (15016): int32_t width = 1920 D/CCodec (15016): int32_t feature-secure-playback = 0 D/CCodec (15016): int32_t frame-rate = 59 D/CCodec (15016): Buffer hdr10-plus-info = { D/CCodec (15016): } D/CCodec (15016): int32_t height = 1080 D/CCodec (15016): int32_t max-height = 4320 D/CCodec (15016): int32_t max-width = 8192 D/CCodec (15016): string mime = "video/raw" D/CCodec (15016): int32_t priority = 1 D/CCodec (15016): int32_t color-format = 2130708361 D/CCodec (15016): int32_t p-extraBC = 6 D/CCodec (15016): } I/CCodecConfig(15016): query failed after returning 18 values (BAD_INDEX) I/CCodec (15016): [c2.qti.hevc.decoder] state->set(STARTING) D/BufferPoolAccessor2.0(15016): bufferpool2 0xb400006ed9124028 : 0(0 size) total buffers - 0(0 size) used buffers - 174/181 (recycle/alloc) - 13/178 (fetch/transfer) D/BufferPoolAccessor2.0(15016): Destruction - bufferpool2 0xb400006ed9124028 cached: 0/0M, 0/0% in use; allocs: 181, 96% recycled; transfers: 178, 93% unfetched D/BufferPoolAccessor2.0(15016): bufferpool2 0xb400006ed912f028 : 0(0 size) total buffers - 0(0 size) used buffers - 24/30 (recycle/alloc) - 8/27 (fetch/transfer) D/BufferPoolAccessor2.0(15016): Destruction - bufferpool2 0xb400006ed912f028 cached: 0/0M, 0/0% in use; allocs: 30, 80% recycled; transfers: 27, 70% unfetched D/BufferPoolAccessor2.0(15016): bufferpool2 0xb400006ed8f76428 : 0(0 size) total buffers - 0(0 size) used buffers - 24/29 (recycle/alloc) - 5/25 (fetch/transfer) D/BufferPoolAccessor2.0(15016): Destruction - bufferpool2 0xb400006ed8f76428 cached: 0/0M, 0/0% in use; allocs: 29, 83% recycled; transfers: 25, 80% unfetched D/BufferPoolAccessor2.0(15016): bufferpool2 0xb400006ea3269428 : 0(0 size) total buffers - 0(0 size) used buffers - 21/26 (recycle/alloc) - 6/19 (fetch/transfer) D/BufferPoolAccessor2.0(15016): Destruction - bufferpool2 0xb400006ea3269428 cached: 0/0M, 0/0% in use; allocs: 26, 81% recycled; transfers: 19, 68% unfetched W/Codec2Client(15016): query -- param skipped: index = 1342179345. W/Codec2Client(15016): query -- param skipped: index = 2415921170. W/Codec2Client(15016): query -- param skipped: index = 1610614798. D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] Query input allocators returned 0 params => BAD_INDEX (6) D/BufferPoolAccessor2.0(15016): bufferpool2 0xb400006fa85a2628 : 4(33554432 size) total buffers - 4(33554432 size) used buffers - 20/25 (recycle/alloc) - 12/26 (fetch/transfer) D/BufferPoolAccessor2.0(15016): bufferpool2 0xb400006fa861ea28 : 0(0 size) total buffers - 0(0 size) used buffers - 26/31 (recycle/alloc) - 9/31 (fetch/transfer) D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] Created input block pool with allocatorID 16 => poolID 27 - OK (0) I/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] start: max output delay 13 D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] Query output allocators returned 0 params => BAD_INDEX (6) D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] Query output surface allocator returned 0 params => BAD_INDEX (6) I/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] Created output block pool with allocatorID 18 => poolID 3851 - OK D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] Configured output block pool ids 3851 => OK D/Codec2-OutputBufferQueue(15016): remote graphic buffer migration 0/0 D/Codec2Client(15016): setOutputSurface -- failed to set consumer usage (6/BAD_INDEX) D/Codec2Client(15016): setOutputSurface -- generation=15376394 consumer usage=0x900 D/Codec2Client(15016): Surface configure completed I/CCodec (15016): [c2.qti.hevc.decoder] state->set(RUNNING) I/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] 4 initial input buffers available I/MediaCodec(15016): setCodecState state(0), called in 6, domain 1, 1 D/CCodecConfig(15016): c2 config diff is c2::u32 output.delay.value = 10 I/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] updating max output delay 17 D/Codec2-OutputBufferQueue(15016): set max dequeue count 17 from update D/CCodecConfig(15016): c2 config diff is 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 84 58 39 4e 1f ..<....@....X9N. D/CCodecConfig(15016): 00000010: 72 01 d4 a4 08 00 00 28 9a b0 50 03 fc c8 02 f9 r......(..P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 39 aa f8 48 83 18 9a b0 00 ...X.B.9..H..... D/CCodecConfig(15016): 00000030: 40 80 14 24 a9 56 22 fa 8a cb ba b2 2d b7 ad 40 @..$.V".....-..@ D/CCodecConfig(15016): c2::u32 raw.color.matrix = 5 D/CCodecConfig(15016): c2::u32 raw.color.primaries = 6 D/CCodecConfig(15016): c2::u32 raw.color.range = 2 D/CCodecConfig(15016): c2::u32 raw.color.transfer = 6 D/CCodecConfig(15016): c2::u32 raw.crop.height = 1080 D/CCodecConfig(15016): c2::u32 raw.crop.left = 0 D/CCodecConfig(15016): c2::u32 raw.crop.top = 0 D/CCodecConfig(15016): c2::u32 raw.crop.width = 1920 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.blue.x = 0.15 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.blue.y = 0.06 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.green.x = 0.265 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.green.y = 0.69 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.max-luminance = 1000 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.min-luminance = 0.005 D/CCodecConfig(15016): c2::float raw.hdr-static-info.mastering.red.x = 0.68 D/CCodecConfig(15016): c2::float raw.hdr- D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000000000us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 84 58 39 4e 1f ..<....@....X9N. D/CCodecBuffers(15016): 00000010: 72 01 d4 a4 08 00 00 28 9a b0 50 03 fc c8 02 f9 r......(..P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 39 aa f8 48 83 18 9a b0 00 ...X.B.9..H..... D/CCodecBuffers(15016): 00000030: 40 80 14 I/MediaCodec(15016): setCodecState state(1), called in 6, domain 1, 1 W/qdgralloc(15016): getInterlacedFlag: getMetaData returned 3, defaulting to interlaced_flag = 0 D/CCodecConfig(15016): c2 config diff is 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 c2 9c 5d e8 31 ..<....@.....].1 D/CCodecConfig(15016): 00000010: 38 01 d8 e4 08 00 00 28 9a b0 50 03 fc c8 02 f9 8......(..P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 39 aa f8 48 5b 18 9a b0 00 ...X.B.9..H[.... D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000168922us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 c2 9c 5d e8 31 ..<....@.....].1 D/CCodecBuffers(15016): 00000010: 38 01 d8 e4 08 00 00 28 9a b0 50 03 fc c8 02 f9 8......(..P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 39 aa f8 48 5b 18 9a b0 00 ...X.B.9..H[.... D/CCodecBuffers(15016): 00000030: 40 80 14 D/MPEG4Writer(15016): PreAllocation enabled D/CCodecConfig(15016): c2 config diff is 00000010: 38 01 db 24 08 00 00 28 9a b0 50 03 fc c8 02 f9 8..$...(..P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 39 aa f8 48 33 18 9a b0 00 ...X.B.9..H3.... D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000185577us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 c2 9c 5d e8 31 ..<....@.....].1 D/CCodecBuffers(15016): 00000010: 38 01 db 24 08 00 00 28 9a b0 50 03 fc c8 02 f9 8..$...(..P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 39 aa f8 48 33 18 9a b0 00 ...X.B.9..H3.... D/CCodecBuffers(15016): 00000030: 40 80 14 D/CCodecConfig(15016): c2 config diff is 00000010: 38 01 d7 a4 08 00 00 28 9a b0 50 03 fc c8 02 f9 8......(..P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 39 82 f8 48 0b 18 9a b0 00 ...X.B.9..H..... D/CCodecConfig(15016): 00000030: 40 80 14 24 a9 56 22 fa 8e cc ba b2 2d b7 ad 40 @..$.V".....-..@ D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000202233us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 c2 9c 5d e8 31 ..<....@.....].1 D/CCodecBuffers(15016): 00000010: 38 01 d7 a4 08 00 00 28 9a b0 50 03 fc c8 02 f9 8......(..P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 39 82 f8 48 0b 18 9a b0 00 ...X.B.9..H..... D/CCodecBuffers(15016): 00000030: 40 80 14 D/CCodecConfig(15016): c2 config diff is 00000010: 38 01 d5 a4 08 00 00 28 9a b0 50 03 fc c8 02 f9 8......(..P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 39 5a f8 47 bb 18 9a b0 00 ...X.B.9Z.G..... D/CCodecConfig(15016): 00000030: 40 80 14 24 a9 56 22 fa 92 cd ba f2 3d b7 ad 40 @..$.V".....=..@ D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000218900us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 c2 9c 5d e8 31 ..<....@.....].1 D/CCodecBuffers(15016): 00000010: 38 01 d5 a4 08 00 00 28 9a b0 50 03 fc c8 02 f9 8......(..P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 39 5a f8 47 bb 18 9a b0 00 ...X.B.9Z.G..... D/CCodecBuffers(15016): 00000030: 40 80 14 D/CCodecConfig(15016): c2 config diff is 00000010: 38 01 d6 24 08 00 00 28 9a b0 50 03 fc c8 02 f9 8..$...(..P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 39 32 f8 47 6b 18 9a b0 00 ...X.B.92.Gk.... D/CCodecConfig(15016): 00000030: 40 80 14 24 a9 56 22 fa 96 ce bb 32 3d bb ad 40 @..$.V"....2=..@ D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000235555us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 c2 9c 5d e8 31 ..<....@.....].1 D/CCodecBuffers(15016): 00000010: 38 01 d6 24 08 00 00 28 9a b0 50 03 fc c8 02 f9 8..$...(..P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 39 32 f8 47 6b 18 9a b0 00 ...X.B.92.Gk.... D/CCodecBuffers(15016): 00000030: 40 80 14 I/TransformerInternal(15016): Release dbbbd4f [AndroidXMedia3/1.7.1] [dm3q, SM-S918U1, samsung, 35] [media3.common, media3.exoplayer, media3.decoder, media3.datasource, media3.extractor, media3.transformer, media3.effect] E/BufferQueueProducer(15016): [SurfaceTexture-1-15016-0](id:3aa80000000b,api:3,p:15016,c:15016) queueBuffer: BufferQueue has been abandoned E/Codec2-OutputBufferQueue(15016): outputBuffer -- queueBuffer() failed on bufferqueue-based block. Error = -19. I/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] queueBuffer failed: -19 E/MediaCodec(15016): rendering to non-initialized(obsolete) surface E/MediaCodec(15016): Codec reported err 0x80000000/UNKNOWN_ERROR, actionCode 0, while in state 6/STARTED D/SurfaceUtils(15016): disconnecting from surface 0xb400006ea3273010, reason disconnectFromSurface E/BufferQueueProducer(15016): [SurfaceTexture-1-15016-0](id:3aa80000000b,api:3,p:15016,c:15016) dequeueBuffer: BufferQueue has been abandoned E/BufferQueueProducer(15016): [SurfaceTexture-1-15016-0](id:3aa80000000b,api:3,p:15016,c:15016) cancelBuffer: BufferQueue has been abandoned D/CCodecConfig(15016): c2 config diff is 00000010: 38 01 d3 e4 08 00 00 28 9a 88 50 03 fc c8 02 f9 8......(..P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 39 0a f8 47 43 18 9a 88 00 ...X.B.9..GC.... D/CCodecConfig(15016): 00000030: 40 80 14 64 a9 55 e2 ea 96 cd bb 32 4d bb ad 40 @..d.U.....2M..@ D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000252222us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 c2 9c 5d e8 31 ..<....@.....].1 D/CCodecBuffers(15016): 00000010: 38 01 d3 e4 08 00 00 28 9a 88 50 03 fc c8 02 f9 8......(..P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 39 0a f8 47 43 18 9a 88 00 ...X.B.9..GC.... D/CCodecBuffers(15016): 00000030: 40 80 14 D/CCodecConfig(15016): c2 config diff is 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 96 f0 46 78 23 ..<....@.....Fx# D/CCodecConfig(15016): 00000010: 55 01 d3 e4 08 00 00 28 9a 60 50 03 fc c8 02 f9 U......(.P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 38 e2 f8 47 1b 18 9a 60 00 ...X.B.8..G.... D/CCodecConfig(15016): 00000030: 40 80 14 64 a9 55 e2 ea 9a ce bb 32 4d bb ad 40 @..d.U.....2M..@ D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000268877us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 96 f0 46 78 23 ..<....@.....Fx# D/CCodecBuffers(15016): 00000010: 55 01 d3 e4 08 00 00 28 9a 60 50 03 fc c8 02 f9 U......(.P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 38 e2 f8 47 1b 18 9a 60 00 ...X.B.8..G.... D/CCodecBuffers(15016): 00000030: 40 80 14 D/CCodecConfig(15016): c2 config diff is 00000010: 55 01 d8 a4 08 00 00 28 9a 38 50 03 fc c8 02 f9 U......(.8P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 38 e2 f8 46 f3 18 9a 38 00 ...X.B.8..F...8. D/CCodecBuffers(15016): [c2.qti.hevc.decoder#778:2D-Output] popFromStashAndRegister: at 1000000285533us, output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers(15016): int32_t android._color-format = 0 D/CCodecBuffers(15016): int32_t android._video-scaling = 1 D/CCodecBuffers(15016): int32_t android._dataspace = 298188800 D/CCodecBuffers(15016): int32_t color-standard = 6 D/CCodecBuffers(15016): int32_t color-range = 2 D/CCodecBuffers(15016): int32_t color-transfer = 6 D/CCodecBuffers(15016): int32_t sar-height = 1 D/CCodecBuffers(15016): int32_t rotation-degrees = 90 D/CCodecBuffers(15016): Buffer hdr-static-info = { D/CCodecBuffers(15016): 00000000: 00 d0 84 80 3e c2 33 c4 86 4c 1d b8 0b 13 3d 42 ....>.3..L....=B D/CCodecBuffers(15016): 00000010: 40 e8 03 32 00 e8 03 c8 00 @..2..... D/CCodecBuffers(15016): } D/CCodecBuffers(15016): int32_t sar-width = 1 D/CCodecBuffers(15016): Rect crop(0, 0, 1919, 1079) D/CCodecBuffers(15016): int32_t width = 1920 D/CCodecBuffers(15016): int32_t feature-secure-playback = 0 D/CCodecBuffers(15016): int32_t frame-rate = 59 D/CCodecBuffers(15016): Buffer hdr10-plus-info = { D/CCodecBuffers(15016): 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 96 f0 46 78 23 ..<....@.....Fx# D/CCodecBuffers(15016): 00000010: 55 01 d8 a4 08 00 00 28 9a 38 50 03 fc c8 02 f9 U......(.8P..... D/CCodecBuffers(15016): 00000020: 90 1d da 58 2e 42 d0 38 e2 f8 46 f3 18 9a 38 00 ...X.B.8..F...8. D/CCodecBuffers(15016): 00000030: 40 80 14 D/DefaultCodec(15016): MediaCodec error D/DefaultCodec(15016): android.media.MediaCodec$CodecException: rendering to non-initialized(obsolete) surface D/DefaultCodec(15016): D/DefaultCodec(15016): at android.media.MediaCodec.releaseOutputBuffer(Native Method) D/DefaultCodec(15016): at android.media.MediaCodec.releaseOutputBufferInternal(MediaCodec.java:4173) D/DefaultCodec(15016): at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:4147) D/DefaultCodec(15016): at androidx.media3.transformer.DefaultCodec.releaseOutputBuffer(DefaultCodec.java:334) D/DefaultCodec(15016): at androidx.media3.transformer.DefaultCodec.releaseOutputBuffer(DefaultCodec.java:321) D/DefaultCodec(15016): at androidx.media3.transformer.ExoAssetLoaderVideoRenderer.feedConsumerFromDecoder(ExoAssetLoaderVideoRenderer.java:187) D/DefaultCodec(15016): at androidx.media3.transformer.ExoAssetLoaderBaseRenderer.render(ExoAssetLoaderBaseRenderer.java:110) D/DefaultCodec(15016): at androidx.media3.exoplayer.RendererHolder.render(RendererHolder.java:381) D/DefaultCodec(15016): at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1328) D/DefaultCodec(15016): at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:646) D/DefaultCodec(15016): at android.os.Handler.dispatchMessage(Handler.java:103) D/DefaultCodec(15016): at android.os.Looper.loopOnce(Looper.java:257) D/DefaultCodec(15016): at android.os.Looper.loop(Looper.java:342) D/DefaultCodec(15016): at android.os.HandlerThread.run(HandlerThread.java:85) I/ExoPlayerImpl(15016): Release 6b7dcdc [AndroidXMedia3/1.7.1] [dm3q, SM-S918U1, samsung, 35] [media3.common, media3.exoplayer, media3.decoder, media3.datasource, media3.extractor, media3.transformer, media3.effect] I/CCodec (15016): [c2.qti.hevc.decoder] state->set(RELEASING) D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] MediaCodec discarded an unknown buffer D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] MediaCodec discarded an unknown buffer D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] MediaCodec discarded an unknown buffer I/CCodec (15016): [release][3306] surface -> component D/CCodecConfig(15016): c2 config diff is 00000000: b5 00 3c 00 01 04 01 40 00 0c 80 ab f4 50 82 28 ..<....@.....P.( D/CCodecConfig(15016): 00000010: 05 01 d8 24 08 00 00 28 9a 38 50 03 fc c8 02 f9 ...$...(.8P..... D/CCodecConfig(15016): 00000020: 90 1d da 58 2e 42 d0 38 e2 f8 46 cb 18 9a 38 00 ...X.B.8..F...8. D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] MediaCodec discarded an unknown buffer D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] MediaCodec discarded an unknown buffer D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] MediaCodec discarded an unknown buffer D/CCodecBufferChannel(15016): [c2.qti.hevc.decoder#778] MediaCodec discarded an unknown buffer D/MPEG4Writer(15016): fpathconf _PC_FILESIZEBITS:64 D/MPEG4Writer(15016): File size limit set to 4503599627370495 bytes implicitly D/MPEG4Writer(15016): MP4WtrCtrlHlpLooper Started D/MPEG4Writer(15016): reset() D/MPEG4Writer(15016): Audio track stopping. Stop source D/MPEG4Writer(15016): Audio track source stopping D/MPEG4Writer(15016): Audio track source stopped V/MediaWriter(15016): Track event err/info msg:101, trackId:1, type:1000,val:0 I/MPEG4Writer(15016): Received total/0-length (0/0) buffers and encoded 0 frames. - Audio I/MPEG4Writer(15016): Audio track drift time: 0 us D/MPEG4Writer(15016): Audio track stopped. Status:0. Stop source I/MPEG4Writer(15016): Duration for 1:Audio track is 0 us D/MPEG4Writer(15016): 0 chunks are written in the last batch D/MPEG4Writer(15016): WriterThread stopped. Status:0 D/MPEG4Writer(15016): no camera lens information I/MPEG4Writer(15016): Adjust the moov start time from -1 us -> -1 us I/MPEG4Writer(15016): The mp4 file will not be streamable. I/MPEG4Writer(15016): MOOV atom was written to the file D/MPEG4Writer(15016): release() D/MPEG4Writer(15016): ftruncate mPreAllocateFileEndOffset:0 mOffset:595 mMdatEndOffset:40 diff:-595 D/MPEG4Writer(15016): MP4WtrCtrlHlpLooper stopped I/MPEG4Writer(15016): Top 5 write durations(microseconds): #1:12 #2:20 #3:30 #4:113 #5:172 D/MPEG4Writer(15016): reset() D/MPEG4Writer(15016): Audio track stopping. Stop source E/MPEG4Writer(15016): Stop() called but track is not started or stopped E/RenderVideo(15016): Error rendering video: Video frame processing error W/TransformerInternal(15016): Export error after export ended W/TransformerInternal(15016): androidx.media3.transformer.ExportException: Codec exception: CodecInfo{type=VideoDecoder, configurationFormat={exo-pixel-width-height-ratio-float=1.0, sar-width=1, allow-frame-drop=0, importance=2000, mime=video/hevc, bitrate=55095982, color-standard=6, color-transfer=6, sar-height=1, is-autoselect=0, is-default=0, color-range=2, frame-rate=59.282387, max-input-size=472211, rotation-degrees=90, height=1080, track-id=1, is-forced-subtitle=0, level=32768, profile=4096, codecs-string=hvc1.2.4.H150.B0, encoder-delay=0, width=1920, encoder-padding=0, csd-0=java.nio.HeapByteBuffer[pos=0 lim=86 cap=86]}, name=c2.qti.hevc.decoder} W/TransformerInternal(15016): at androidx.media3.transformer.DefaultCodec.createExportException(DefaultCodec.java:475) W/TransformerInternal(15016): at androidx.media3.transformer.DefaultCodec.createExportException(DefaultCodec.java:453) W/TransformerInternal(15016): at androidx.media3.transformer.DefaultCodec.releaseOutputBuffer(DefaultCodec.java:342) W/TransformerInternal(15016): at androidx.media3.transformer.DefaultCodec.releaseOutputBuffer(DefaultCodec.java:321) W/TransformerInternal(15016): at androidx.media3.transformer.ExoAssetLoaderVideoRenderer.feedConsumerFromDecoder(ExoAssetLoaderVideoRenderer.java:187) W/TransformerInternal(15016): at androidx.media3.transformer.ExoAssetLoaderBaseRenderer.render(ExoAssetLoaderBaseRenderer.java:110) W/TransformerInternal(15016): at androidx.media3.exoplayer.RendererHolder.render(RendererHolder.java:381) W/TransformerInternal(15016): at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1328) W/TransformerInternal(15016): at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:646) W/TransformerInternal(15016): at android.os.Handler.dispatchMessage(Handler.java:103) W/TransformerInternal(15016): at android.os.Looper.loopOnce(Looper.java:257) W/TransformerInternal(15016): at android.os.Looper.loop(Looper.java:342) W/TransformerInternal(15016): at android.os.HandlerThread.run(HandlerThread.java:85) W/TransformerInternal(15016): Caused by: android.media.MediaCodec$CodecException: rendering to non-initialized(obsolete) surface W/TransformerInternal(15016): W/TransformerInternal(15016): at android.media.MediaCodec.releaseOutputBuffer(Native Method) W/TransformerInternal(15016): at android.media.MediaCodec.releaseOutputBufferInternal(MediaCodec.java:4173) W/TransformerInternal(15016): at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:4147) W/TransformerInternal(15016): at androidx.media3.transformer.DefaultCodec.releaseOutputBuffer(DefaultCodec.java:334) W/TransformerInternal(15016): ... 10 more I/CCodec (15016): [c2.qti.hevc.decoder] state->set(RELEASED) I/MediaCodec(15016): Codec shutdown complete I/CCodecBufferChannel(15016): CCodecBufferChannel destructing c2.qti.hevc.decoder#778 I/Codec2Client(15016): Component destructing I/hw-BpHwBinder(15016): onLastStrongRef automatically unlinking death recipients I/VRI[MainActivity]@a704c20(15016): call setFrameRateCategory for touch hint category=no preference, reason=boost timeout, vri=VRI[MainActivity]@a704c20Example code (optional)
Show code
import 'dart:async';
import 'dart:io' as io;
import 'dart:math';
import 'package:epic_plays/core/alerts/app_dialogs.dart';
import 'package:epic_plays/core/extensions/build_context_extensions.dart';
import 'package:epic_plays/core/navigation/routes.dart';
import 'package:epic_plays/features/post/models/create_play_page_args.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
import 'package:go_router/go_router.dart';
import 'package:path_provider/path_provider.dart';
import 'package:pro_image_editor/designs/grounded/grounded_design.dart';
import 'package:pro_image_editor/pro_image_editor.dart';
import 'package:pro_video_editor/core/platform/io/io_helper.dart';
import 'package:pro_video_editor/pro_video_editor.dart';
import 'package:video_player/video_player.dart';
class EditPlayPage extends StatefulWidget {
final String filePath;
const EditPlayPage({super.key, required this.filePath});
@override
State<EditPlayPage> createState() => _EditPlayPageState();
}
class _EditPlayPageState extends State<EditPlayPage>
with WidgetsBindingObserver {
final _mainEditorBarKey = GlobalKey<GroundedMainBarState>();
final bool _useMaterialDesign =
platformDesignMode == ImageEditorDesignMode.material;
final VideoEditorConfigs _videoConfigs = const VideoEditorConfigs(
minTrimDuration: Duration(seconds: 5),
maxTrimDuration: Duration(seconds: 30),
playTimeSmoothingDuration: Duration(milliseconds: 600),
enablePlayButton: true,
);
bool _isSeeking = false;
TrimDurationSpan? _durationSpan;
TrimDurationSpan? _tempDurationSpan;
ProVideoController? _proVideoController;
List<ImageProvider>? _thumbnails;
late VideoMetadata _videoMetadata;
final int _thumbnailCount = 5;
late final EditorVideo _video;
String? _outputPath;
late final VideoPlayerController _videoController;
Widget? _videoView;
final _taskId = DateTime.now().microsecondsSinceEpoch.toString();
@override
void initState() {
WidgetsBinding.instance.addObserver(this);
_video = EditorVideo.file(widget.filePath);
super.initState();
_initializePlayer();
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
_videoController.removeListener(_onDurationChange);
_videoController.dispose();
super.dispose();
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.paused ||
state == AppLifecycleState.inactive) {
if (mounted && _videoController.value.isInitialized) {
_videoController.pause();
}
}
}
Future<void> _setMetadata() async {
_videoMetadata = await ProVideoEditor.instance.getMetadata(_video);
}
void _generateThumbnails() {
WidgetsBinding.instance.addPostFrameCallback((_) async {
if (!mounted) return;
final imageWidth =
MediaQuery.sizeOf(context).width /
_thumbnailCount *
MediaQuery.devicePixelRatioOf(context);
List<Uint8List> thumbnailList = [];
if (!kIsWeb && Platform.isAndroid) {
thumbnailList = await ProVideoEditor.instance.getKeyFrames(
KeyFramesConfigs(
video: _video,
outputSize: Size.square(imageWidth),
maxOutputFrames: _thumbnailCount,
),
);
} else {
final duration = _videoMetadata.duration;
final segmentDuration = duration.inMilliseconds / _thumbnailCount;
thumbnailList = await ProVideoEditor.instance.getThumbnails(
ThumbnailConfigs(
video: _video,
outputSize: Size.square(imageWidth),
timestamps: List.generate(_thumbnailCount, (i) {
final midpointMs = (i + 0.5) * segmentDuration;
return Duration(milliseconds: midpointMs.round());
}),
),
);
}
final List<ImageProvider> temporaryThumbnails = thumbnailList
.map(MemoryImage.new)
.toList();
final cacheList = temporaryThumbnails.map(
(item) => precacheImage(item, context),
);
await Future.wait(cacheList);
_thumbnails = temporaryThumbnails;
if (_proVideoController != null) {
_proVideoController!.thumbnails = _thumbnails;
}
});
}
Future<void> _initializePlayer() async {
await _setMetadata();
_generateThumbnails();
_videoController = VideoPlayerController.file(io.File(widget.filePath));
await Future.wait([
_videoController.initialize(),
_videoController.setLooping(false),
_videoController.setVolume(_videoConfigs.initialMuted ? 0 : 1),
_videoConfigs.initialPlay
? _videoController.play()
: _videoController.pause(),
]);
_videoView = Center(
child: AspectRatio(
aspectRatio: _videoController.value.size.aspectRatio,
child: IgnorePointer(child: VideoPlayer(_videoController)),
),
);
if (!mounted) return;
_proVideoController = ProVideoController(
videoPlayer: _videoView!,
bitrate: _videoMetadata.bitrate,
initialResolution: _videoMetadata.resolution,
videoDuration: _videoMetadata.duration,
fileSize: _videoMetadata.fileSize,
thumbnails: _thumbnails,
);
_videoController.addListener(_onDurationChange);
setState(() {});
}
void _onDurationChange() {
final totalVideoDuration = _videoMetadata.duration;
final duration = _videoController.value.position;
_proVideoController!.setPlayTime(duration);
if (_durationSpan != null && duration >= _durationSpan!.end) {
_seekToPosition(_durationSpan!);
} else if (duration >= totalVideoDuration) {
_seekToPosition(
TrimDurationSpan(start: Duration.zero, end: totalVideoDuration),
);
}
}
Future<void> _seekToPosition(TrimDurationSpan span) async {
_durationSpan = span;
if (_isSeeking) {
_tempDurationSpan = span;
return;
}
_isSeeking = true;
_proVideoController!.pause();
_proVideoController!.setPlayTime(_durationSpan!.start);
await _videoController.pause();
await _videoController.seekTo(span.start);
_isSeeking = false;
if (_tempDurationSpan != null) {
final TrimDurationSpan nextSeek = _tempDurationSpan!;
_tempDurationSpan = null;
await _seekToPosition(nextSeek);
}
}
Future<void> generateVideo(CompleteParameters parameters) async {
unawaited(_videoController.pause());
final exportModel = RenderVideoModel(
id: _taskId,
video: _video,
outputFormat: VideoOutputFormat.mp4,
enableAudio: _proVideoController?.isAudioEnabled ?? true,
imageBytes: parameters.layers.isNotEmpty ? parameters.image : null,
blur: parameters.blur,
colorMatrixList: parameters.colorFilters,
startTime: parameters.startTime,
endTime: parameters.endTime,
transform: parameters.isTransformed
? ExportTransform(
width: parameters.cropWidth,
height: parameters.cropHeight,
rotateTurns: parameters.rotateTurns,
x: parameters.cropX,
y: parameters.cropY,
flipX: parameters.flipX,
flipY: parameters.flipY,
)
: null,
bitrate: _videoMetadata.bitrate,
);
final directory = await getTemporaryDirectory();
_outputPath = await ProVideoEditor.instance.renderVideoToFile(
'${directory.path}/new_play.mp4',
exportModel,
);
}
Future<void> _discardMedia(bool didPop) async {
if (didPop) return;
final bool shouldPop =
await AppDialogs.singleButtonConfirm(
context: context,
title: context.localizations.discardMediaTitle,
description: context.localizations.discardMediaDescription,
confirmText: context.localizations.discard,
onConfirm: () {},
) ??
false;
if (mounted && shouldPop) {
context.goNamed(Routes.home.name);
}
}
Future<void> onCloseEditor(EditorMode editorMode) async {
if (editorMode != EditorMode.main) return Navigator.pop(context);
if (_outputPath != null) {
context.pushReplacementNamed(
Routes.createPlayPage.name,
extra: CreatePlayPageArgs(videoFilePath: _outputPath),
);
_outputPath = null;
} else {
await _discardMedia(false);
}
}
int _calculateEmojiColumns(BoxConstraints constraints) => max(
1,
(_useMaterialDesign ? 6 : 10) / 400 * constraints.maxWidth - 1,
).floor();
Widget _buildEditor() {
return LayoutBuilder(
builder: (context, constraints) {
return ProImageEditor.video(
_proVideoController!,
callbacks: ProImageEditorCallbacks(
onCompleteWithParameters: generateVideo,
onCloseEditor: onCloseEditor,
videoEditorCallbacks: VideoEditorCallbacks(
onPause: _videoController.pause,
onPlay: _videoController.play,
onMuteToggle: (isMuted) {
_videoController.setVolume(isMuted ? 0 : 100);
},
onTrimSpanUpdate: (durationSpan) {
if (_videoController.value.isPlaying) {
_proVideoController!.pause();
}
},
onTrimSpanEnd: _seekToPosition,
),
mainEditorCallbacks: MainEditorCallbacks(
onStartCloseSubEditor: (value) {
_mainEditorBarKey.currentState?.setState(() {});
},
),
),
configs: ProImageEditorConfigs(
dialogConfigs: DialogConfigs(
widgets: DialogWidgets(
loadingDialog: (message, configs) =>
_VideoProgressAlert(taskId: _taskId),
),
),
videoEditor: _videoConfigs,
designMode: platformDesignMode,
theme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.blue.shade800,
brightness: Brightness.dark,
),
),
mainEditor: MainEditorConfigs(
widgets: MainEditorWidgets(
removeLayerArea:
(
removeAreaKey,
editor,
rebuildStream,
isLayerBeingTransformed,
) => VideoEditorRemoveArea(
removeAreaKey: removeAreaKey,
editor: editor,
rebuildStream: rebuildStream,
isLayerBeingTransformed: isLayerBeingTransformed,
),
appBar: (editor, rebuildStream) => null,
bottomBar: (editor, rebuildStream, key) => ReactiveWidget(
key: key,
builder: (context) {
return GroundedMainBar(
key: _mainEditorBarKey,
editor: editor,
configs: editor.configs,
callbacks: editor.callbacks,
);
},
stream: rebuildStream,
),
),
style: const MainEditorStyle(
background: Color(0xFF000000),
bottomBarBackground: Color(0xFF161616),
),
),
paintEditor: PaintEditorConfigs(
enableModePixelate: false,
enableModeBlur: false,
style: const PaintEditorStyle(
background: Color(0xFF000000),
bottomBarBackground: Color(0xFF161616),
initialStrokeWidth: 5,
),
widgets: PaintEditorWidgets(
appBar: (paintEditor, rebuildStream) => null,
colorPicker:
(paintEditor, rebuildStream, currentColor, setColor) =>
null,
bottomBar: (editorState, rebuildStream) {
return ReactiveWidget(
builder: (context) {
return GroundedPaintBar(
configs: editorState.configs,
callbacks: editorState.callbacks,
editor: editorState,
i18nColor: 'Color',
showColorPicker: (currentColor) {
Color? newColor;
showDialog(
context: context,
builder: (context) => AlertDialog(
content: SingleChildScrollView(
child: ColorPicker(
pickerColor: currentColor,
onColorChanged: (color) {
newColor = color;
},
),
),
actions: <Widget>[
ElevatedButton(
child: const Text('Got it'),
onPressed: () {
if (newColor != null) {
setState(
() => editorState.setColor(newColor!),
);
}
Navigator.of(context).pop();
},
),
],
),
);
},
);
},
stream: rebuildStream,
);
},
),
),
textEditor: TextEditorConfigs(
style: TextEditorStyle(
textFieldMargin: const EdgeInsets.only(top: kToolbarHeight),
bottomBarBackground: const Color(0xFF161616),
bottomBarMainAxisAlignment: !_useMaterialDesign
? MainAxisAlignment.spaceEvenly
: MainAxisAlignment.start,
),
widgets: TextEditorWidgets(
appBar: (textEditor, rebuildStream) => null,
colorPicker:
(textEditor, rebuildStream, currentColor, setColor) => null,
bottomBar: (editorState, rebuildStream) {
return ReactiveWidget(
builder: (context) {
return GroundedTextBar(
configs: editorState.configs,
callbacks: editorState.callbacks,
editor: editorState,
i18nColor: 'Color',
showColorPicker: (currentColor) {
Color? newColor;
showDialog(
context: context,
builder: (context) => AlertDialog(
content: SingleChildScrollView(
child: ColorPicker(
pickerColor: currentColor,
onColorChanged: (color) {
newColor = color;
},
),
),
actions: <Widget>[
ElevatedButton(
child: const Text('Got it'),
onPressed: () {
if (newColor != null) {
setState(
() => editorState.primaryColor =
newColor!,
);
}
Navigator.of(context).pop();
},
),
],
),
);
},
);
},
stream: rebuildStream,
);
},
bodyItems: (editorState, rebuildStream) => [
ReactiveWidget(
stream: rebuildStream,
builder: (_) => Padding(
padding: const EdgeInsets.only(top: kToolbarHeight),
child: GroundedTextSizeSlider(textEditor: editorState),
),
),
],
),
),
cropRotateEditor: CropRotateEditorConfigs(
style: const CropRotateEditorStyle(
cropCornerColor: Color(0xFFFFFFFF),
cropCornerThickness: 4,
background: Color(0xFF000000),
bottomBarBackground: Color(0xFF161616),
helperLineColor: Color(0x25FFFFFF),
),
widgets: CropRotateEditorWidgets(
appBar: (cropRotateEditor, rebuildStream) => null,
bottomBar: (cropRotateEditor, rebuildStream) => ReactiveWidget(
stream: rebuildStream,
builder: (_) => GroundedCropRotateBar(
configs: cropRotateEditor.configs,
callbacks: cropRotateEditor.callbacks,
editor: cropRotateEditor,
selectedRatioColor: kImageEditorPrimaryColor,
),
),
),
),
filterEditor: FilterEditorConfigs(
style: const FilterEditorStyle(
filterListSpacing: 7,
filterListMargin: EdgeInsets.fromLTRB(8, 0, 8, 8),
background: Color(0xFF000000),
),
widgets: FilterEditorWidgets(
slider:
(
editorState,
rebuildStream,
value,
onChanged,
onChangeEnd,
) => ReactiveWidget(
stream: rebuildStream,
builder: (_) => Slider(
onChanged: onChanged,
onChangeEnd: onChangeEnd,
value: value,
activeColor: Colors.blue.shade200,
),
),
appBar: (editorState, rebuildStream) => null,
bottomBar: (editorState, rebuildStream) {
return ReactiveWidget(
builder: (context) {
return GroundedFilterBar(
configs: editorState.configs,
callbacks: editorState.callbacks,
editor: editorState,
image: _videoView,
);
},
stream: rebuildStream,
);
},
),
),
tuneEditor: TuneEditorConfigs(
style: const TuneEditorStyle(
background: Color(0xFF000000),
bottomBarBackground: Color(0xFF161616),
),
widgets: TuneEditorWidgets(
appBar: (editor, rebuildStream) => null,
bottomBar: (editorState, rebuildStream) {
return ReactiveWidget(
builder: (context) {
return GroundedTuneBar(
configs: editorState.configs,
callbacks: editorState.callbacks,
editor: editorState,
);
},
stream: rebuildStream,
);
},
),
),
blurEditor: BlurEditorConfigs(
style: const BlurEditorStyle(background: Color(0xFF000000)),
widgets: BlurEditorWidgets(
appBar: (blurEditor, rebuildStream) => null,
bottomBar: (editorState, rebuildStream) {
return ReactiveWidget(
builder: (context) {
return GroundedBlurBar(
configs: editorState.configs,
callbacks: editorState.callbacks,
editor: editorState,
);
},
stream: rebuildStream,
);
},
),
),
emojiEditor: EmojiEditorConfigs(
checkPlatformCompatibility: !kIsWeb,
style: EmojiEditorStyle(
backgroundColor: Colors.transparent,
textStyle: DefaultEmojiTextStyle.copyWith(
fontSize: _useMaterialDesign ? 48 : 30,
),
emojiViewConfig: EmojiViewConfig(
recentsLimit: 40,
backgroundColor: Colors.transparent,
buttonMode: !_useMaterialDesign
? ButtonMode.CUPERTINO
: ButtonMode.MATERIAL,
loadingIndicator: const Center(
child: CircularProgressIndicator(),
),
columns: _calculateEmojiColumns(constraints),
emojiSizeMax: !_useMaterialDesign ? 32 : 64,
),
bottomActionBarConfig: const BottomActionBarConfig(
enabled: false,
),
),
),
i18n: const I18n(
paintEditor: I18nPaintEditor(
changeOpacity: 'Opacity',
lineWidth: 'Thickness',
),
textEditor: I18nTextEditor(
backgroundMode: 'Mode',
textAlign: 'Align',
),
),
),
);
},
);
}
@override
Widget build(BuildContext context) {
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) => _discardMedia(didPop),
child: AnimatedSwitcher(
duration: const Duration(milliseconds: 300),
child: _proVideoController == null
? const CircularProgressIndicator()
: _buildEditor(),
),
);
}
}
class _VideoProgressAlert extends StatelessWidget {
const _VideoProgressAlert({this.taskId = ''});
final String taskId;
Widget _buildProgressBody() {
return StreamBuilder<ProgressModel>(
stream: ProVideoEditor.instance.progressStreamById(taskId),
builder: (context, snapshot) {
final progress = snapshot.data?.progress ?? 0;
return TweenAnimationBuilder<double>(
tween: Tween<double>(begin: 0, end: progress),
duration: const Duration(milliseconds: 300),
builder: (context, animatedValue, _) {
return Row(
spacing: 10,
children: [
CircularProgressIndicator(value: animatedValue),
Text(
'${(animatedValue * 100).toStringAsFixed(1)} / 100',
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
],
);
},
);
},
);
}
@override
Widget build(BuildContext context) {
return Stack(
children: [
ModalBarrier(
onDismiss: kDebugMode ? LoadingDialog.instance.hide : null,
color: Colors.black54,
),
Center(
child: Theme(
data: Theme.of(context),
child: AlertDialog(
contentPadding: const EdgeInsets.symmetric(
vertical: 16,
horizontal: 20,
),
content: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 500),
child: Padding(
padding: const EdgeInsets.only(top: 3.0),
child: _buildProgressBody(),
),
),
),
),
),
],
);
}
}Device Model (optional)
Samsung Galaxy S23 Ultra