Flutter WebRTC demo with Python server to perform image processing on video frames using OpenCV

Overview

flutter + webrtc => python + aiortc + opencv

This demo project should help you to get setup sending a video feed from a flutter app to a python backend to allow you to then perform some image processing on the video frames using OpenCV.

Running the server

First install the required packages:

$ cd server

$ pip install -r requirements.txt

When you start the example, it will create an HTTP server which you can connect to from your browser:

$ cd server

$ python main.py

You can then browse to the following page with your browser:

http://localhost:8080

Once you click Start the browser will send the audio and video from its webcam to the server.

The server will play a pre-recorded audio clip and send the received video back to the browser, optionally applying a transform to it.

In parallel to media streams, the browser sends a 'ping' message over the data channel, and the server replies with 'pong'.

![Server index page](server_index.gif)

Additional options

If you want to enable verbose logging, run:

$ cd server

$ python server.py -v

Running the server in docker

If you have docker setup, run:

$ cd server

$ docker build -t aiortc_server .

$ docker run -p 8080:8080 -it --rm aiortc_server

You can then browse to the following page with your browser:

http://localhost:8080

Setting up flutter

First install the required packages.

Now you will need to update the /offer path to point to your local python server.

![Flutter Demo](flutter_demo.gif)

Credits

The server files were borrowed from the aiortc github project.

https://github.com/aiortc/aiortc

You might also like...

A mobile image uploader in which you can upload image to your personal gallery from either your camera or mobile gallery and it can detect your current geographic location and address using firebase firestore and storage.

Image Uploader In Flutter About It is an Image Uploader gallery which tracks your address from which you're uploading using Flutter and Image picker.

Dec 20, 2022

YoYo Video Player is a HLS(.m3u8) video player for flutter.

YoYo Video Player is a HLS(.m3u8) video player for flutter.

YoYo Video Player YoYo Video Player is a HLS(.m3u8) video player for flutter. The video_player is a video player that allows you to select HLS video s

Dec 23, 2022

Flutter-video-player - A basic file manager based video player app where you can watch videos from your phone's file manager

Flutter-video-player - A basic file manager based video player app where you can watch videos from your phone's file manager

Flutter video player app It's a file manager based video player app. Screenshot

Jan 25, 2022

Video player-2.2.10 - A Flutter plugin for iOS, Android and Web for playing back video on a Widget surface

Video player-2.2.10 - A Flutter plugin for iOS, Android and Web for playing back video on a Widget surface

Video Player plugin for Flutter A Flutter plugin for iOS, Android and Web for pl

Sep 29, 2022

Real short video app with firebase and pixels API.Where you can create a short video with pixels' stock videos and also merge your audio.

Real short video app with firebase and pixels API.Where you can create a short video with pixels' stock videos and also merge your audio.

Flutter Short Videos Platform Short videos platform with Flutter and Firebase. About Real short video app with firebase and pixels API.Where you can c

Dec 26, 2022

Android app to show movie ratings when browsing Netflix, Amazon Prime Video and other supported video streaming apps on the phone

Android app to show movie ratings when browsing Netflix, Amazon Prime Video and other supported video streaming apps on the phone

Flutter - Movie Ratings You can get the latest Playstore version here on Playstore - or download directly - 0.4.5 Screenshots of master Search Page Fa

Nov 23, 2022

WebRTC Phone based on MQTT, Flutter

WebRTC Phone based on MQTT, Flutter

Flutter WebRTC Phone Using a MQTT client and a Flutter, an example source of WebRTC bidirectional video communication. WebRTC WebRTC를 이용한 화상/데이터 통신은 기

Oct 31, 2022

Compact representation of a placeholder for an image. Encode a blurry image under 30 caracters for instant display like used by Medium. Maintainer: @Solido

Compact representation of a placeholder for an image. Encode a blurry image under 30 caracters for instant display like used by Medium. Maintainer: @Solido

Flutter BlurHash Compact representation of a placeholder for an image. Generation You can use https://blurha.sh/ for testing or use any official api o

Dec 30, 2022
Comments
  • ICE connection state: new -> checking -> disconnected in Docker

    ICE connection state: new -> checking -> disconnected in Docker

    Hi and thank you for open sourcing your work!

    I followed the steps in Running the server in docker, but am still getting: ICE connection state: new -> checking -> disconnected in Docker

    The server is running in a remote server and I try to reach the website from my computer (so not a local camera).

    Any idea what's wrong? I believe the problem is that the ICE ports are random and not exposed by docker. Did you came across this problem?

    Thanks!

    opened by ioangatop 1
Owner
John Crisp
John Crisp
Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.

flutter_video_compress Generate a new path by compressed video, Choose to keep the source video or delete it by a parameter. Get video thumbnail from

天海るり 179 Dec 8, 2022
Chat-App - A Chat App with flutter and Firebase and Video Calling using WebRTC

chat_app A chat app with flutter and firebase with image message support and vid

Reza Hosseinypour 10 Nov 23, 2022
This design has been created for educational purposes. Also this project has integrated push notifications with firebase and my own server in python.

Ui Clone of the Nequi application This design has been created for educational purposes. Also this project has integrated push notifications with fire

Juan Suarez 3 Nov 17, 2022
Development of a simple mobile application to perform mathematical operations, using DART and FLUTTER

Desenvolvimento de uma aplicação mobile simples para realizar operações matemáticas, usando DART e FLUTTER.

Bruno Silva 2 Jan 20, 2022
Tooling and libraries for processing dart test output into dev-friendly formats

better_test_reporter Introduction This is an application/library heavily inspired by dart-junitreport and dart-testreport. It takes what was done in t

Betterment 6 Sep 14, 2022
A flutter based app using python scripts as backend for a quotes app.

Fluthon APP A new Flutter project which is supported from a python script and lists quotes . Deployment ?? -> /Script - python main.py. -> Run main.d

Yash Joshi 4 Nov 16, 2022
gui automation based on pyautogui python as backend and flutter desktop as frontend, drag and drop tool, no coding required.

GUI_AUTOMATION gui automation based on pyautogui python as backend and flutter desktop as frontend, drag and drop tool, no coding required. Install py

Hassan Kanso 34 Oct 30, 2022
Flutter-Python rubiks cube solver.

AI based Rubik's Cube Solver using Flutter and Python Mobile app for solving 3*3 Rubik's Cube. Screenshot Python Libraries Flask (https://pypi.org/pro

Brine Softwares Solution Pvt Ltd. 796 Jan 8, 2023
a python-like bytes_io implementation for dart

bytes_io A python-like bytes_io implementation for dart A powerful helper for processing raw binary data Usage A simple usage example: import 'package

Kelly 5 Aug 31, 2022
Algorithm Toolbox is an Android app for C++, Python and DART algorithms. It shows the codes as well as its explanation with various examples.

AlgoKing Algorithm Toolbox is an Android app for C++, Python and DART algorithms. It shows the codes as well as its explanation with various examples.

Hash Studios 5 Sep 13, 2022