flutter-pi: VideoPlayer is not working (Gstreamer).

First of all, thanks for creating flutter-pi, this is such a great project!

I am having some issues after trying to run an application with the video_player package, exactly the one recommended in the example part of Readme (https://pub.dev/packages/video_player#example). Please fin the details below:

-flutter_assets bundle generated in Ubuntu 18.04 machine (all process) -video_player: 2.5.1 (and with some older versions too like 2.4.5) -Device: STM32MP157F-EV1 (32 bits MPU) -Flutter: 3.3.10 -flutter-pi: Latest version available in Master -engine-binaries: Latest version available in your repo.

Command: ./flutter-pi -r 270 --release /usr/local/flutter331/flutter_assets/

Output:

[locales] Warning: The system has no configured locale. The default "C" locale may or may not be supported by the app.
[keyboard] Could not load keyboard configuration from "/etc/default/keyboard". Default keyboard config will be used. load_file: No such file or directory
[flutter-pi] WARNING: display has non-square pixels. Non-square-pixels are not supported by flutter.
==============Locale==============
Flutter locale:
  default: C
  locales: C
===================================
===================================
display mode:
  resolution: 720 x 1280
  refresh rate: 50Hz
  physical size: 68mm x 122mm
  flutter device pixel ratio: 2.786378
===================================
EGL information:
  version: 1.5
  vendor: "Vivante Corporation"
  client extensions: "EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_KHR_platform_gbm"
  display extensions: "EGL_KHR_fence_sync EGL_KHR_reusable_sync EGL_KHR_wait_sync EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_lock_surface EGL_KHR_create_context EGL_KHR_no_config_context EGL_KHR_surfaceless_context EGL_KHR_get_all_proc_addresses EGL_EXT_buffer_age EGL_ANDROID_native_fence_sync EGL_WL_bind_wayland_display EGL_WL_create_wayland_buffer_from_image EGL_KHR_partial_update EGL_EXT_swap_buffers_with_damage EGL_KHR_swap_buffers_with_damage"
===================================
OpenGL ES information:
  version: "OpenGL ES 2.0 V6.4.3.279124"
  shading language version: "OpenGL ES GLSL ES 1.0.0"
  vendor: "Vivante Corporation"
  renderer: "Vivante GCNano"
  extensions: "GL_OES_vertex_half_float GL_OES_element_index_uint GL_OES_mapbuffer GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_depth24 GL_OES_depth32 GL_OES_packed_depth_stencil GL_OES_fbo_render_mipmap GL_OES_get_program_binary GL_OES_fragment_precision_high GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_EXT_texture_compression_s3tc GL_EXT_read_format_bgra GL_EXT_multi_draw_arrays GL_EXT_frag_depth GL_EXT_discard_framebuffer GL_EXT_blend_minmax GL_EXT_robustness GL_EXT_texture_sRGB_decode GL_EXT_texture_rg GL_VIV_direct_texture "
===================================
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: UnimplementedError: init() has not been implemented.
#0      VideoPlayerPlatform.init (package:video_player_platform_interface/video_player_platform_interface.dart:43)
#1      _videoPlayerPlatform (package:video_player/video_player.dart:28)
#2      VideoPlayerController.initialize (package:video_player/video_player.dart:362)
#3      _VideoAppState.initState (package:video_test_331/main.dart:22)
#4      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5015)
#5      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4853)
#6      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3863)
#7      Element.updateChild (package:flutter/src/widgets/framework.dart:3592)
#8      RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1195)
#9      RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1164)
#10     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1111)
#11     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2605)
#12     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1110)
#13     WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:945)
#14     WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:925)
#15     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18)
#16     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398)
#17     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429)
#18     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192)

[compositor] GPU does not support reflecting the screen in Y-direction.
  This is required for rendering into hardware overlay planes though.
  Any UI that is drawn in overlay planes will look upside down.
[compositor] GPU does not supported the desired HW plane order.
  Some UI layers may be invisible.

I have also tried VideoPlayerController.asset instead of .network, but issue persists.

In addition, during flutter-pi building, after doing make command, different errors were displayed: [ 4%] Building C object CMakeFiles/flutter-pi.dir/src/flutter-pi.c.o In file included from /usr/local/flutter331/flutter-pi/src/flutter-pi.c:47: /usr/local/flutter331/flutter-pi/include/flutter-pi.h:57:2: error: expected specifier-qualifier-list before 'FlutterEngineResult' 57 | FlutterEngineResult (*FlutterEngineCreateAOTData)(const FlutterEngineAOTDataSource* source, FlutterEngineAOTData* data_out); | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/local/flutter331/flutter-pi/src/flutter-pi.c:47: /usr/local/flutter331/flutter-pi/include/flutter-pi.h:160:8: error: unknown type name 'FlutterTransformation' 160 | const FlutterTransformation t, | ^~~~~~~~~~~~~~~~~~~~~ /usr/local/flutter331/flutter-pi/include/flutter-pi.h: In function 'apply_flutter_transformation': /usr/local/flutter331/flutter-pi/include/flutter-pi.h:168:10: error: request for member 'scaleX' in something not a structure or union 168 | *px = t.scaleX*x + t.skewX*y + t.transX;

I could solve them by setting FLUTTER_EMBEDDER_HEADER (in the CMake file) to the flutter_embedder.h provided in your engine-binaries repo.

Thanks in advance!

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 28 (11 by maintainers)

Most upvoted comments

The default video player platform implementation was removed a while ago, I’m working on a fix.

For now you’ll have to explicitly add a dependency on android_video_player: 2.3.0 to pubspec.yaml and call AndroidVideoPlayer.registerWith in main.