GStreamer Player Plugin

A GStreamer-powered alternative to Flutter's video_player that support Linux, iOS and Android.

Buy Me A Coffee



Follow GStreamer's Install on Linux instuction.


Follow GStreamer's Install on iOS instuction, step Prerequisites and Download and install GStreamer binaries.

Link GStreamer framework to ios directory for flutter's ios build system.

ln -s /Users/<Your_User_Name>/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework ios/GStreamer.framework


Follow GStreamer's Install on Android instuction, step Prerequisites and Download and install GStreamer binaries.

In Android, you need to init GStreamer in main activity of your flutter application. In your flutter application, edit MainActivity.kt or file, depends on your flutter config (This file is usually located at android/app/src/main/<PATH_DEPPEND_ON_YOUR_FLUTTER_APPLICATION>/MainActivity.kt). Import GStreamer module and override onCreate of MainActivity class to init GStreamer, the end result should looks like bellow.

import org.freedesktop.gstreamer.GStreamer

class MainActivity: FlutterActivity() {
  override fun onCreate(savedInstanceState: Bundle?) {


This source code has been tested with GStreamer 1.20.1 prebuild binary

Getting Started

To start using the plugin, copy this code or follow the example project in example

import 'package:flutter/material.dart';

import 'package:flutter/services.dart';
import 'package:flutter_gstreamer_player/flutter_gstreamer_player.dart';

void main() {
  runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: GstPlayer(
              '''rtspsrc location=
                  rtsp:// !
                rtph264depay !
                h264parse !
                decodebin !
                videoconvert !
                video/x-raw,format=RGBA !
                appsink name=sink''',


Copyright (c) 2022, Nguyen Hoai Phong

This library & work under this repository is licensed under MIT License.