video_trimmer
video_trimmer copied to clipboard
TrimEditor widget doesn't work correctly
Hi. I'm using the latest version 0.5.2. And the TrimEditor widget doesn't show the slider, it only shows the white circle. Built on Samsung S8+ - Android 9, Android Studio emu - Android 8, produced the same result.
Also having this issue, have you managed to solve it?
This maybe a video specific problem, can you please share the link or the video file here, so that I can test it out with that?
Some information regarding this error is here.
Also having this issue, have you managed to solve it?
This maybe a video specific problem, can you please share the link or the video file here, so that I can test it out with that?
Some information regarding this error is here.
Hey, I managed to fix the issue. before I upgrade to 0.5.2, I used the forked version from https://github.com/huangred/video_trimmer and I had initialized the var _startValue = 0 and _endValue = 10 But then after updating and encountering this error, I initialized it to _startValue = 0 and _endValue = 0 And it fixed the problem for me.
With 4.0.0 version it works, testing the same video with 0.5.2 version it doesn't work
Hi @dannycortesv, can you share some more details regarding your issue
Having the same issue, no errors in the log
I/SurfaceView(31374): updateWindow -- onWindowVisibilityChanged, visibility = 4, this = io.flutter.embedding.android.FlutterSurfaceView{1843d29 V.E...... ........ 0,0-720,1344}
E/ANR_LOG (31374): >>> msg's executing time is too long
E/ANR_LOG (31374): Blocked msg = { when=-2s234ms what=108 target=android.app.ActivityThread$H obj=ResultData{token=android.os.BinderProxy@2fb5718 results[ResultInfo{who=null, request=2352, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/video:73427 flg=0x1 }}]} } , cost = 2234 ms
E/ANR_LOG (31374): >>>Current msg List is:
E/ANR_LOG (31374): Current msg <1> = { when=-2s234ms what=107 target=android.app.ActivityThread$H obj=com.android.internal.os.SomeArgs@43dacfc }
E/ANR_LOG (31374): Current msg <2> = { when=0 what=131 target=android.app.ActivityThread$H obj=android.app.ActivityThread$ProviderRefCount@b344af9 }
E/ANR_LOG (31374): Current msg <3> = { when=0 what=0 target=android.os.Handler callback=io.flutter.plugins.imagepicker.ImagePickerPlugin$MethodResultWrapper$1 }
E/ANR_LOG (31374): Current msg <4> = { when=+73ms what=0 target=cz callback=ei }
E/ANR_LOG (31374): Current msg <5> = { when=+13s634ms what=0 target=android.os.Handler callback=io.intercom.android.sdk.middleware.NexusClientMiddleware$1 }
E/ANR_LOG (31374): >>>CURRENT MSG DUMP OVER<<<
V/PhoneWindow(31374): DecorView setVisiblity: visibility = 0, Parent = ViewRoot{8382bd1 com.the_elxr.staging/com.the_elxr.app.MainActivity,ident = 0}, this = DecorView@69f299d[MainActivity]
I/SurfaceView(31374): updateWindow -- onWindowVisibilityChanged, visibility = 0, this = io.flutter.embedding.android.FlutterSurfaceView{1843d29 V.E...... ........ 0,0-720,1344}
W/libEGL (31374): [ANDROID_RECORDABLE] format: 1
D/mali_winsys(31374): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
D/OpenGLRenderer(31374): CanvasContext() 0x78b5b7dcc0 initialize window=0x7888db1a00, title=com.the_elxr.staging/com.the_elxr.app.MainActivity
W/libEGL (31374): [ANDROID_RECORDABLE] format: 1
D/mali_winsys(31374): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
V/InputMethodManager(31374): onWindowFocus: io.flutter.embedding.android.FlutterView{5d5d64f VFE...... .F...... 0,0-720,1344} softInputMode=16 first=true flags=#81810100
I/Choreographer(31374): Skipped 19 frames! The application may be doing too much work on its main thread.
I/SurfaceView(31374): Punch a hole(dispatchDraw), this = io.flutter.embedding.android.FlutterSurfaceView{1843d29 V.E...... ........ 0,0-720,1344}
W/RenderThread(31374): type=1400 audit(0.0:161790): avc: denied { read } for name="boot_mode" dev="sysfs" ino=5287 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
I/BufferQueue(31374): [unnamed-31374-3](this:0x7889455800,id:3,api:0,p:-1,c:-1) BufferQueue core=(31374:com.the_elxr.staging)
I/BufferQueueConsumer(31374): [unnamed-31374-3](this:0x7889455800,id:3,api:0,p:-1,c:31374) connect(C): consumer=(31374:com.the_elxr.staging) controlledByApp=true
I/GLConsumer(31374): [SurfaceTexture-0-31374-3] detachFromContext
I/ExoPlayerImpl(31374): Init 5e59db5 [ExoPlayerLib/2.14.1] [CPH1729, CPH1729, OPPO, 25]
D/MediaCodecInfo(31374): NoSupport [codec.profileLevel, avc1.640029, video/avc] [OMX.google.h264.decoder, video/avc] [CPH1729, CPH1729, OPPO, 25]
D/MediaCodecInfo(31374): NoSupport [codec.profileLevel, avc1.640029, video/avc] [OMX.google.h264.decoder, video/avc] [CPH1729, CPH1729, OPPO, 25]
D/MediaCodecInfo(31374): NoSupport [codec.profileLevel, avc1.640029, video/avc] [OMX.google.h264.decoder, video/avc] [CPH1729, CPH1729, OPPO, 25]
W/ExoPlayer:Playb(31374): type=1400 audit(0.0:161791): avc: denied { read } for name="u:object_r:mtk_em_video_log_sf_postbuffer_prop:s0" dev="tmpfs" ino=9059 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mtk_em_video_log_sf_postbuffer_prop:s0 tclass=file permissive=0
E/libc (31374): Access denied finding property "sf.postbuffer.prof"
E/libc (31374): Access denied finding property "acodec.video.buflogging"
W/ExoPlayer:Playb(31374): type=1400 audit(0.0:161792): avc: denied { read } for name="u:object_r:mtk_em_video_log_acodec_prop:s0" dev="tmpfs" ino=9060 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mtk_em_video_log_acodec_prop:s0 tclass=file permissive=0
D/ACodec (31374): onAllocateComponent()
I/OMXClient(31374): MuxOMX ctor
I/ACodec (31374): Successfully allocate component [OMX.MTK.VIDEO.DECODER.AVC]
I/BufferQueueProducer(31374): [SurfaceTexture-0-31374-3](this:0x7889455800,id:3,api:3,p:31374,c:31374) connect(P): api=3 producer=(31374:com.the_elxr.staging) producerControlledByApp=true
I/MediaCodec(31374): [OMX.MTK.VIDEO.DECODER.AVC] setting surface generation to 32126980
I/BufferQueueProducer(31374): [SurfaceTexture-0-31374-3](this:0x7889455800,id:3,api:3,p:31374,c:31374) disconnect(P): api 3
I/BufferQueueProducer(31374): [SurfaceTexture-0-31374-3](this:0x7889455800,id:3,api:3,p:31374,c:31374) connect(P): api=3 producer=(31374:com.the_elxr.staging) producerControlledByApp=true
I/ACodec (31374): codec does not support config priority (err -1010)
I/ACodec (31374): mSupportsPartialFrames 0 err 0
D/ACodec (31374): :: w 1920, h 1088, s 1920, sh 1088, cf 32315679
D/ACodec (31374): Update output eColorFormat 32315679, width 1920, height 1088, stride 1920, slice-height 1088
D/ACodec (31374): Found component handle 3900190720
D/ACodec (31374): setNativeWindowSizeFormatAndUsage W(1920), H(1088), Stride(1920), SliceH(1088), eHalColorFormat(32315679)
D/SurfaceUtils(31374): set up nativeWindow 0x7889239610 for 1920x1088, color 0x32315679, rotation 90, usage 0x2933
D/ACodec (31374): From NW, minUndequeuedBuffers(2)
W/ACodec (31374): [OMX.MTK.VIDEO.DECODER.AVC] setting nBufferCountActual to 8 failed: -2147483648
W/ACodec (31374): [OMX.MTK.VIDEO.DECODER.AVC] setting nBufferCountActual to 7 failed: -2147483648
D/Surface (31374): Surface::setBufferCount(this=0x7889239600,bufferCount=6)
D/ACodec (31374): nBufferCountActual 6, minUndequeuedBuffers 3
W/ExoPlayer:Playb(31374): type=1400 audit(0.0:161793): avc: denied { read } for name="u:object_r:mtk_em_video_log_sf_postbuffer_prop:s0" dev="tmpfs" ino=9059 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mtk_em_video_log_sf_postbuffer_prop:s0 tclass=file permissive=0
E/libc (31374): Access denied finding property "sf.postbuffer.prof"
E/libc (31374): Access denied finding property "acodec.video.buflogging"
W/ExoPlayer:Playb(31374): type=1400 audit(0.0:161794): avc: denied { read } for name="u:object_r:mtk_em_video_log_acodec_prop:s0" dev="tmpfs" ino=9060 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mtk_em_video_log_acodec_prop:s0 tclass=file permissive=0
D/ACodec (31374): onAllocateComponent()
I/OMXClient(31374): MuxOMX ctor
I/ACodec (31374): Successfully allocate component [OMX.google.aac.decoder]
E/ACodec (31374): cannot find aac bit rate
I/ACodec (31374): codec does not support config priority (err -2147483648)
I/ACodec (31374): codec does not support config operating rate (err -2147483648)
D/ACodec (31374): :: w 1920, h 1088, s 1920, sh 1088, cf 32315679
D/ACodec (31374): Update output eColorFormat 32315679, width 1920, height 1088, stride 1920, slice-height 1088
W/AHierarchicalStateMachine(31374): Warning message AMessage(what = 'omxI') = {
W/AHierarchicalStateMachine(31374): int32_t type = 0
W/AHierarchicalStateMachine(31374): int32_t event = 3
W/AHierarchicalStateMachine(31374): int32_t data1 = 1
W/AHierarchicalStateMachine(31374): int32_t data2 = 2130706460
W/AHierarchicalStateMachine(31374): } unhandled in root state.
D/AudioTrack(31374): getMinFrameCount=6144: afFrameCount=1024, afSampleRate=48000, afLatency=128
D/ACodec (31374): setNativeWindowSizeFormatAndUsage W(1920), H(1088), Stride(1920), SliceH(1088), eHalColorFormat(32315679)
D/SurfaceUtils(31374): set up nativeWindow 0x7889239610 for 1920x1088, color 0x32315679, rotation 90, usage 0x2933
D/ACodec (31374): From NW, minUndequeuedBuffers(2)
W/ACodec (31374): [OMX.MTK.VIDEO.DECODER.AVC] setting nBufferCountActual to 12 failed: -2147483648
W/ACodec (31374): [OMX.MTK.VIDEO.DECODER.AVC] setting nBufferCountActual to 11 failed: -2147483648
D/Surface (31374): Surface::setBufferCount(this=0x7889239600,bufferCount=10)
D/ACodec (31374): nBufferCountActual 10, minUndequeuedBuffers 3
D/mmscene (31374): getHint applicationScene=com.the_elxr.staging,idx=5 none
D/OppoSmartVolume(31374): mEnginerringFeatureSwtich:1, mSmartVolumeAPKSwtich:-22, mSmartVolumePcmDumpSwitch:0
D/OppoSmartVolume(31374): mWechatDbLevel:19, mWechatUseDynamicMode:1
D/AudioTrack(31374): set(): 0x78a6428700, streamType -1, sampleRate 48000, format 0x1, channelMask 0x3, frameCount 24576, flags #0, notificationFrames 0, sessionId 14137, transferType 3, uid -1, pid -1
D/AudioTrack(31374): audiotrack 0x78a6428700 set Type -1, rate 48000, fmt 1, chn 3, fcnt 24576, flags 0000
I/SceneKnowledgeProvider(31374): SKP: notifyChange(1, 3, -1)
D/AudioTrack(31374): createTrack_l: 0x78a6428700, mCblk = 0x7886400000, mLatency = 640, mAfLatency = 128, frameCount = 24576, mSampleRate = 48000, mFlags = 0, mReqFrameCount = 24576
D/ACodec (31374): native_window_set_crop l(0), t(0), r(1920), b(1088)
I/BufferQueue(31374): [SurfaceTexture-0-31374-2](this:0x786ba90800,id:2,api:3,p:-1,c:-1) ~BufferQueueCore
I/GLConsumer(31374): [SurfaceTexture-0-31374-3] attachToContext
D/MALI (31374): eglCreateImageKHR:501: [Crop] 0 0 1920 1088 img[0 0]
I/GPUAUX (31374): GPUAUXContext:56: create: 0x7889569380
D/MALI (31374): eglCreateImageKHR:501: [Crop] 0 0 1920 1088 img[1920 1088]
D/MDP (31374): [COLOR] DpEngine_COLOR: MDP COLOR disabled
it happens to all videos in my gallery, seems not an issue with a particular video
[✓] Flutter (Channel unknown, 2.0.6, on macOS 11.5.2 20G95 darwin-arm, locale en)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
any update on this? facing the same issue while using v1.*
I solved it by adding values of onChangeEnd and onChangeStart and lowering the thumbnail quality.
TrimEditor(
circlePaintColor: Theme.of(context).colorScheme.tertiary,
borderPaintColor: Theme.of(context).colorScheme.tertiary,
durationTextStyle: Theme.of(context).textTheme.bodyText2!,
trimmer: trimmer,
maxVideoLength: const Duration(minutes: 2),
viewerWidth: MediaQuery.of(context).size.width - 80,
thumbnailQuality: 15,
onChangeEnd: (value) {},
onChangeStart: (value) {},
),
Make sure the TrimEditor is built before the Trimmer is initialized. The TrimEditor waits for the Trimmer's initialization event, but it never receives the event if it wasn't built before the Trimmer initialized. For example, I was showing a loading indicator instead of TrimEditor until after the Trimmer initialized. This was causing your same issue for me.
Closing this issue. Please open a new issue if you want to discuss this further.