Closed beniskopf closed 3 months ago
You need to depend on the flutterpi_gstreamer_video_player
package and call FlutterpiVideoPlayer.registerWith()
in the main, before the runApp
call: https://pub.dev/packages/flutterpi_gstreamer_video_player
I'll fix the readme instructions to mention that.
thanks for your help. I've included the flutterpi_gstreamer_video_player
package and called FlutterpiVideoPlayer.registerWith()
. now i get this error message:
> rp@raspberrypi:~ $ sudo flutter-pi --release -r 270 my_apps_flutter_assets/
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
plugins/gstreamer_video_player/plugin.c: Couldn't create gstreamer video player.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(nativeerror, Input/output error, 5, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>
#2 FlutterpiVideoPlayer.create (package:flutterpi_gstreamer_video_player/src/platform.dart:78)
<asynchronous suspension>
#3 VideoPlayerController.initialize (package:video_player/video_player.dart:434)
<asynchronous suspension>
#4 _VideoPlayerScreenState.initState.<anonymous closure> (package:miata_screen/filepicker.dart:104)
<asynchronous suspension>
i tried to play the video using gst-launch-1.0 playbin uri=file:///home/rp/media/mtv.mp4
and it works but the colors are distorted.
Are you on the latest revision of flutter-pi? This looks like a bug I fixed 3 weeks ago :)
no i wasn't :D i've updated flutter-pi and now i see the first frame of the video without color distortions. this is the error: plugins/gstreamer_video_player/player.c: Failed to set custom HTTP headers because gstreamer source element has no 'extra-headers' property.
could be related to this: https://github.com/ardera/flutter-pi/issues/356
sorry i'm retarded. _controller.play();
was missing.
Hi, i'm trying to play video files on a raspberry pi 4 (64 bit). As stated in the docs i should use
$ sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-alsa
+ https://pub.dev/packages/video_player. however it gives me this error message. any ideas how to fix this? maybe related to https://github.com/ardera/flutter-pi/issues/360