Repository navigation
Closed
Description
i am sorry for bringing alot of issues, but i am just testing so hopefully you dont mind me bringing the issues up here
logs
W/libOpenSLES(19622): Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
I/flutter (19622): fvp.FINE: 2023-08-21 19:36:41.977873: 853723315 player-5476376613429821312 create(https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4)
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:41.999398: default0xb400007c4441f210 new FrameReader...
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.000009: Registered audio backends: OpenSL AudioTrack null
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.001756: OpenSL extensions: ANDROID_SDK_LEVEL_31
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.002579: default0xb400007c4441f850 new FrameReader...
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.004855: Registered audio backends: OpenSL AudioTrack null
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.053687: OpenSL extensions: ANDROID_SDK_LEVEL_31
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.054005: 0xb400007c34424770mdk::Player::Player()
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.054075: default FrameReader0xb400007c4441f210 state: 0=>0=>0, 0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.054177: default0xb400007c4441f210 virtual void mdk::FrameReader::stop(), current state: 0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.054329: default FrameReader0xb400007c4441f210 state: 0=>0=>0, 0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.054414: default0xb400007c4441f210 virtual void mdk::FrameReader::stop(), current state: 0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.054474: 0xb400007c64432d00 MediaControl.prepare(0, ...) https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.054885: default 0xb400007c4441f210 FrameReader.start(0, ...)
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.054988: default 0xb400007c4441f210 FrameReader::update MediaStatus 0=>0X2
I/flutter (19622): fvp.FINE: 2023-08-21 19:36:42.063826: 853723315 player-5476376613429821312 onMediaStatusChanged: MediaStatus(noMedia) => MediaStatus(+loading)
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.065634: default FrameReader0xb400007c4441f210 state: 0=>0=>1, 0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.066203: default FrameReader0xb400007c4441f210 state: 0=>1=>1, 0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.066853: start frame reader thread: 527141682352
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.068752: try to load av module: /data/app/~~i0rH089aB5bO1VgbZZE1Rg==/com.mediadevkit.fvp_example-kD9Ba2e7OiXvGr9N2AckKQ==/lib/arm64/libffmpeg.so
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.069390: ffmpeg loaded: /data/app/~~i0rH089aB5bO1VgbZZE1Rg==/com.mediadevkit.fvp_example-kD9Ba2e7OiXvGr9N2AckKQ==/lib/arm64/libffmpeg.so
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.070192: Selected avformat runtime version: 60.10.100 (build: 60.10.100), license: LGPL version 2.1 or later
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.070461: Selected avformat runtime configuration: --extra-version=avbuild --disable-doc --disable-debug --disable-static --enable-shared --enable-runtime-cpudetect --enable-mediacodec --enable-jni --disable-vulkan --disable-v4l2-m2m --disable-indevs --enable-indev=android_camera --disable-outdevs --disable-postproc --ar=llvm-ar --ranlib=llvm-ranlib --nm=llvm-nm --strip=llvm-strip --target-os=android --arch=arm64 --enable-cross-compile --cross-prefix=aarch64-linux-android- --pkg-config=pkg-config --cc=clang --extra-ldexeflags='-Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fPIE ' --enable-lto --enable-pic --extra-cflags='-Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong -ffast-math -fstrict-aliasing --target=aarch64-none-linux-android21' --extra-ldflags='-Wl,--gc-sections -Wl,-z,relro -Wl,-z,now --sysroot /usr/local/lib/android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64//sysroot -fuse-ld=lld -rtlib=compiler-rt --target=aarch64-none-linux-an
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.071684: avformat_version0x7ac177bbf4
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.071772: Trying MediaIO FFmpeg for protocol "https"
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.071872: 0xb400007bc444f850 open url: https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.437586: 0xb400007bc444f850 url opened
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.438170: default 0xb400007c4441f210 FrameReader::update MediaStatus 0X2=>0X2
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.441420: Selected avcodec runtime version: 60.23.100 (build: 60.23.100), license: LGPL version 2.1 or later
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.441760: av_packet_alloc0x7ac156354c
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.448146: Selected avutil runtime version: 58.16.101 (build: 58.16.101), license: LGPL version 2.1 or later
/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.449389: av_dict_copy0x7ac1839e08
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.450522: before avformat_open_input. io: 0xb400007bc444f850(FFmpeg/pb: 0xb400007c1443b970, url: https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.452819: FFmpeg/Libav runtime git-2023-08-13-80fdf51-avbuild
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.460731: after avformat_open_input. pb: 0xb400007c1443b970, iformat: 0x7ac19146d8 context flags: 2097280, input format flags: 67141640
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.613596: supports 205 ffmpeg sw pixel formats. unsupported: uyyvyy411 x2rgb10be x2bgr10be p212be p212le p412be p412le
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.615263: Format: mov,mp4,m4a,3gp,3g2,mj2, range: 0 +4037ms, bitrate: 2562539, size: 0
I/flutter (19622): Metadata:
I/flutter (19622): creation_time: 2015-08-10T09:55:17.000000Z
I/flutter (19622): minor_version: 0
I/flutter (19622): compatible_brands: mp42mp41isomavc1
I/flutter (19622): major_brand: mp42
I/flutter (19622): Streams: 2
I/flutter (19622): Video:
I/flutter (19622): stream#0, range: 0 +4037ms, frames: 121
I/flutter (19622): codec: h264 tag: 'avc1' profile: 100 level: 31, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 2407163, 1280x720, fps: 29.97, bframes: 2, primaries: bt709, trc: bt709, matrix: bt709, range: narrow
I/flutter (19622): extra data(47): 01 64 00 1F FF E1 00 1B 67 64 00 1F AC D9 80 50 05 BB 01 6A 02 02 02 80 00 01 F4 80 00 75 30 07 8C 18 CD 01 00 05 68 E9 7B 2C 8B FD F8 F8 00
I/flutter (19622): Metadata:
I/flutter (19622): encoder: AVC Coding
I/flutter (19622): handler_name: L-SMASH Video Handler
I/flutter (19622): vendor_id: [0][0][0][0]
I/flutter (19622): language: und
I/flutter (19622): creation_time: 2015-08-10T09:55:17.000000Z
I/flutter (19622): Audio:
I/flutter (19622): stream#1, range: 0 +4032ms, frames: 189
I/flutter (19622): codec: aac tag: 'mp4a' profile: 1 level: -99, sample size: 0/16, block align: 0, frame_size: 1024, f32p stereo(2) @
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.615802: default FrameReader0xb400007c4441f210 request to pause 1, loaded: 0.
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.616113: default FrameReader0xb400007c4441f210 state: 0=>1=>2, 0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.617562: default FrameReader0xb400007c4441f210 state requested: 2, current: 0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.619832: 0xb400007c64432d00 prepared callback is invoked
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.623002: default 0xb400007c4441f210 FrameReader::update MediaStatus 0X2=>0X4
I/flutter (19622): fvp.FINE: 2023-08-21 19:36:42.630026: 853723315 player-5476376613429821312 onMediaStatusChanged: MediaStatus(+loading) => MediaStatus(+loaded)
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.632098: ***buffering progress 0%***
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.632535: default 0xb400007c4441f210 FrameReader::update MediaStatus 0X4=>0X14
I/flutter (19622): fvp.FINE: 2023-08-21 19:36:42.632944: 853723315 player-5476376613429821312 onMediaStatusChanged: MediaStatus(+loaded) => MediaStatus(+loaded+buffering)
D/kit.fvp_exampl(19622): PlayerBase::PlayerBase()
D/kit.fvp_exampl(19622): TrackPlayerBase::TrackPlayerBase()
I/libOpenSLES(19622): Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
D/HostConnection(19622): createUnique: call
D/HostConnection(19622): HostConnection::get() New Host Connection established 0xb400007be4416d50, tid 19690
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.638324: ++++++++++++BUFFERING START++++++++++++
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.641209:
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.666012: CodecForMimeType: video/avc, profile: 8, level: -1
/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.666049: 529189346480 JMI: JNI Modern Interface. Version 0.1.0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.671819: Rendering thread @529187265712
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.672442: 0xb400007c344232a0 start RenderLoop
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.672570: 0xb400007b744960a0->PlatformSurface::Event::NativeHandle: 0x0>>>0x7fc3b2778c
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.673407: auto mdk::VideoPresenter::VideoPresenter()::(anonymous class)::operator()(UGS::PlatformSurface *) const: 0x0=>0xb400007b64450470 RenderAPI.type: 1
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.674093: createRenderContext of RenderAPI::Type 1 from surface 0xb400007b744960a0 with extra native res 0x0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.675405: ThreadLocal<bool>::Data::Data() thread: 529187265712
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.676484: T *ThreadLocal<bool>::get() const allocate and initialize ThreadLocal data
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.677275: ThreadLocal<UGL::opengl::Context::Config>::Data::Data() thread: 529187265712
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.677407: T *ThreadLocal<UGL::opengl::Context::Config>::get() const allocate and initialize ThreadLocal data
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.677507: creating internal shared offscreen context for type: EGL|OpenGL|OpenGLES
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.677603: creating EGL context from window: 0x0 with shared context: 0x0 extra: 0x0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.677709: dso.load: libEGL.sotest: true
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.677809: libEGL.so test load result 0xd98902fd55fbee7...
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.679740: initialize EGL display from eglGetDisplay()
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.680411: Try to create context for OpenGL ES 3
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.681151: creating EGL context from window: 0xb400007cd4453a60 with shared context: 0xb400007b9446fb30 extra: 0x0
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.681386: initialize EGL display from eglGetDisplay()
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.683219: Try to create context for OpenGL ES 3
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.683789: ThreadLocal<UGL::opengl::platform::GLContext *>::Data::Data() thread: 529187265712
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.684023: T *ThreadLocal<UGL::opengl::platform::GLContext *>::get() const allocate and initialize ThreadLocal data
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.685010: ++++++++++onContextCreated+++++++++++
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.686663: PlatformSurface::Event::Resize
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.742584: PlatformSurface::Event::Resize
I/flutter (19622): mdk.INFO: 2023-08-21 19:36:42.743090: setLoop(-1), now 0/0
Metadata
Metadata
Assignees
Labels
No labels
Activity
wang-bin commentedon Aug 22, 2023
seems hardware decoder not fully supported on emulator. change this https://github.com/wang-bin/fvp/blob/v0.2.1/lib/src/video_player_mdk.dart#L41C4-L41C4
to
or
works for me. Can you confirm it? Then I will add code to detect emulator and select another set of decoders
abdelaziz-mahdy commentedon Aug 22, 2023
okay, will test when i get home, and will let you know
AnonymHK commentedon Aug 22, 2023
I have tested it and found that this solution is available. The simulator does not support hardware decoding, and in practical applications, it is rarely necessary to run it on the simulator. It is not necessary to detect whether it is running on the simulator! Suggest enabling as a debugging option!
abdelaziz-mahdy commentedon Aug 22, 2023
yes setting
registerWith(options: { 'video.decoders': ['FFmpeg', 'auto']});made the black screen disappear and video is working correctly even though i think how i wrote it breaks other platfroms hardware decoders (not sure)
i would love if software decoding is used by default if hardware one is not working correclty
wang-bin commentedon Aug 22, 2023
what about 'AMediaCodec:surface=0:copy=1'
abdelaziz-mahdy commentedon Aug 23, 2023
Oh I thought that was the default sorry I will test it now and let you know
abdelaziz-mahdy commentedon Aug 23, 2023
setting
the video starts normally, but whenever i seek the video is playing but its a still image
and i cant seek back
logs
abdelaziz-mahdy commentedon Aug 23, 2023
but setting
does work after the seek correctly
wang-bin commentedon Aug 23, 2023
ok. I will use FFmpeg if emulator is detected
AnonymHK commentedon Aug 23, 2023
The use of simulators in production environments is extremely rare. It is recommended to only use debug mode to determine the simulator environment!
abdelaziz-mahdy commentedon Aug 23, 2023
but sometimes and most of the time in my case i use my own device to test the behaviour, and the limitation is not debugging
its only on simulator. so knowing when a simulator is detected and using ffpmeg and on real device using hardware logic, is safer and the best performance i think,
if i misunderstood you let me know
android: do not set hardware decoder for emulator. #14
wang-bin commentedon Aug 23, 2023
please try the latest code
abdelaziz-mahdy commentedon Aug 23, 2023
just tested the emulator it works for me very good, but from the commit
/// Set video decoder priority. Default is 'auto' decoder, which is usually 'FFmpeg'.it will not use hardware decoding on real device?
wang-bin commentedon Aug 23, 2023
if decoders is not set manually, no hardware decoder. real device will use hardware decoder
abdelaziz-mahdy commentedon Aug 24, 2023
That's lovely thank you ❤️