You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -62,7 +62,7 @@ If you encounter issues running flutter-pi on any of the supported platforms lis
62
62
63
63
<details>
64
64
<summary>More Info</summary>
65
-
65
+
66
66
flutter-pi needs flutters `icudtl.dat` and `libflutter_engine.so.{debug,profile,release}` at runtime, depending on the runtime mode used.
67
67
You actually have two options here:
68
68
@@ -71,7 +71,7 @@ If you encounter issues running flutter-pi on any of the supported platforms lis
71
71
72
72
</details>
73
73
74
-
74
+
75
75
</details>
76
76
77
77
3. Install cmake, graphics, system libraries and fonts:
@@ -85,15 +85,15 @@ If you encounter issues running flutter-pi on any of the supported platforms lis
85
85
```
86
86
<details>
87
87
<summary>More Info</summary>
88
-
88
+
89
89
- flutter-pi needs the mesa OpenGL ES and EGL implementation and libdrm & libgbm. It may work with non-mesa implementations too, but that's untested.
90
90
- The flutter engine depends on the _Arial_ font. Since that doesn't come included with Raspbian, you need to install it.
91
91
- `libsystemd` is not systemd, it's just an utility library. It provides the event loop and dbus support for flutter-pi.
92
92
- `libinput-dev`, `libudev-dev` and `libxkbcommon-dev` are needed for (touch, mouse, raw keyboard and text) input support.
93
93
- `libudev-dev` is required, but actual udev is not. Flutter-pi will just open all `event` devices inside `/dev/input` (unless overwritten using `-i`) if udev is not present.
94
94
- `gpiod` and `libgpiod-dev` where required in the past, but aren't anymore since the `flutter_gpiod` plugin will directly access the kernel interface.
95
95
</details>
96
-
96
+
97
97
4. Update the system fonts.
98
98
```bash
99
99
sudo fc-cache
@@ -122,12 +122,12 @@ If you encounter issues running flutter-pi on any of the supported platforms lis
122
122
```bash
123
123
sudo raspi-config
124
124
```
125
-
125
+
126
126
2. Switch to console mode:
127
127
`System Options -> Boot / Auto Login` and select`Console` or `Console (Autologin)`.
128
128
129
-
3. *You can skip this if you're on Raspberry Pi 4 with Raspbian Bullseye*
130
-
Enable the V3D graphics driver:
129
+
3. *You can skip this if you're on Raspberry Pi 4 with Raspbian Bullseye*
130
+
Enable the V3D graphics driver:
131
131
`Advanced Options -> GL Driver -> GL (Fake KMS)`
132
132
133
133
4. Configure the GPU memory
@@ -144,7 +144,7 @@ If you encounter issues running flutter-pi on any of the supported platforms lis
144
144
145
145
<details>
146
146
<summary>More information</summary>
147
-
147
+
148
148
- flutter-pi requires that no other process, like a X11- or wayland-server, is using the video output. So to disable the desktop environment, we boot into console instead.
149
149
- The old broadcom-proprietary GL driver was bugged and not working with flutter, so we have to use the Fake KMS driver.
150
150
- Actually, you can also configure 16MB of GPU memory if you want to. 64MB are needed when you want to use the [`omxplayer_video_player`](https://pub.dev/packages/omxplayer_video_player) plugin.
@@ -159,7 +159,7 @@ _One-time setup:_
159
159
2. Install the [flutterpi_tool](https://pub.dev/packages/flutterpi_tool):
160
160
Run `flutter pub global activate flutterpi_tool` (One time only)
161
161
3. If running `flutterpi_tool` directly doesn't work, follow https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path
162
-
to add the dart global bin directory to your path.
162
+
to add the dart global bin directory to your path.
163
163
Alternatively, you can launch the tool via:
164
164
`flutter pub global run flutterpi_tool ...`
165
165
@@ -168,7 +168,7 @@ _Building the app bundle:_
168
168
2. Run `flutterpi_tool build` to build the app.
169
169
- This will build the app for ARM 32-bit debug mode.
170
170
- `flutterpi_tool build --help` gives more usage information.
171
-
- For example, to build for 64-bit ARM, release mode, with a Raspberry Pi 4 tuned engine, use:
171
+
- For example, to build for 64-bit ARM, release mode, with a Raspberry Pi 4 tuned engine, use:
--videomode widthxheight@hz Uses an output videomode that satisfies the argument.
379
379
If no hz value is given, the highest possible refreshrate
@@ -407,12 +407,27 @@ of the flutter app you're trying to run.
407
407
`[flutter engine options...]` will be passed as commandline arguments to the flutter engine. You can find a list of commandline options for the flutter engine [Here](https://github.com/flutter/engine/blob/master/shell/common/switches.h).
408
408
409
409
### gstreamer video player
410
-
Gstreamer video player is a newer video player based on gstreamer. The older video player (omxplayer_video_player) was based on deprecated omxplayer and it was kind of a hack. So I recommend using the gstreamer one instead.
410
+
Gstreamer video player is a newer video player based on gstreamer. The older video player (omxplayer_video_player) was based on deprecated omxplayer and it was kind of a hack. So I recommend using the gstreamer one instead.
411
411
412
412
To use the gstreamer video player, just rebuild flutter-pi (delete your build folder and reconfigure) and make sure the necessary gstreamer packages are installed. (See [dependencies](#dependencies))
413
413
414
414
And then, just use the stuff in the official [video_player](https://pub.dev/packages/video_player) package. (`VideoPlayer`, `VideoPlayerController`, etc, there's nothing specific you need to do on the dart-side)
415
415
416
+
### audioplayers
417
+
418
+
As of current moment flutter-pi implements plugin for`audioplayers: ^4.0.0`.
419
+
420
+
There are several things you need to keep in mind:
421
+
422
+
- As flutter-pi is intended for use on constrained systems like raspberry pi, you should avoid creating multiple temporary instances and instead prefer to use one global instance of `AudioPlayer`. There is limit you can easily hit if you're going to spam multiple instances of `AudioPlayer`
423
+
- Plugin was tested to work with ALSA and `pulseaudio` might prevent the plugin from playing audio correctly:
424
+
- Hence please make sure you delete `pulseaudio` package from your system.
425
+
- Make sure you have `gstreamer1.0-alsa` package installed in addition to packages needed for gstreamer video player.
426
+
- Make sure you can list audio devices using command: `aplay -L`
427
+
- If there is error, please investigate why and fix it before using audio
428
+
- One of the common reasons is outdated ALSA config in which case you should delete existing config and replace it with up to date one
429
+
- Finally, if you want to verify your audio setup is good, you can use `gst-launch` command to invoke `playbin` on audio file directly.
430
+
416
431
## 📊 Performance
417
432
### Graphics Performance
418
433
Graphics performance is actually pretty good. With most of the apps inside the `flutter SDK -> examples -> catalog` directory I get smooth 50-60fps on the Pi 4 2GB and Pi 3 A+.
@@ -432,6 +447,7 @@ This is why I created my own (userspace) touchscreen driver, for improved latenc
432
447
| linux_spidev ([package](https://pub.dev/packages/linux_spidev/)) ([repo](https://github.com/ardera/flutter_packages/tree/main/packages/linux_spidev)) | 🖨 peripherals | Hannes Winkler | SPI bus support for dart/flutter, uses kernel interfaces directly for more performance. |
| flutterpi_gstreamer_video_player ([package](https://pub.dev/packages/flutterpi_gstreamer_video_player)) ([repo](https://github.com/ardera/flutter_packages/tree/main/packages/flutterpi_gstreamer_video_player)) | ⏯️ multimedia | Hannes Winkler | Official video player implementation for flutter-pi. See [GStreamer video player](#gstreamer-video-player) section above. |
450
+
| audioplayers ([package](https://pub.dev/packages/audioplayers)) ([repo](https://github.com/bluefireteam/audioplayers/tree/main/packages/audioplayers)) | ⏯️ multimedia | Blue Fire | flutter-pi implements audio plugin v4. |
435
451
436
452
## 💬 Discord
437
453
There a `#custom-embedders` channel on the [flutter discord](https://github.com/flutter/flutter/wiki/Chat) which you can use if you have any questions regarding flutter-pi or generally, anything related to embedding the engine for which you don't want to open issue about or write an email.
0 commit comments