Pakete, Repositories und App-Kategorien suchen

Paketdetailsv1.0.1

mjpeg_stream

Ein Flutter-Paket zum Streamen von MJPEG-(Motion-JPEG)-Video über HTTP

AndroidiOSmacOSWindowsLinux
30-Tage-Downloads
112
Likes
3
Pub-Punkte
125

Paket installieren

flutter pub add mjpeg_stream

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Das mjpeg_stream-Paket ermöglicht Flutter-Anwendungen das Streaming von MJPEG-(Motion-JPEG)-Video über HTTP und bietet eine leichte Lösung für die Echtzeit-Wiedergabe von Videos von IP-Kameras oder Webservern. Es unterstützt mehrere Plattformen wie Android, iOS, macOS, Windows und Linux und ist daher ideal für plattformübergreifende Videoüberwachungsanwendungen. Das Paket verarbeitet HTTP-Streaming effizient mit minimaler Latenz, sodass Entwickler Live-Videostreams direkt in ihre Benutzeroberflächen integrieren können. Es ist besonders nützlich in Überwachungs-, Robotik- und IoT-Anwendungen, in denen kontinuierliche Videostreams erforderlich sind.

Anwendungsfälle

  • Live-Kamerüberwachung
  • Integration von Video-Feed von IoT-Geräten
  • Robotik-Sichtsysteme
  • Überwachungs-Dashboards
  • Remote-Diagnose

Hauptmerkmale

  • Unterstützt MJPEG über HTTP
  • Plattformübergreifende Kompatibilität
  • Low-Latency-Streaming
  • Einfache Integration mit Flutter-Widgets
  • Echtzeit-Video-Wiedergabe

Geeignet für

  • Entwickler, die Überwachungsanwendungen erstellen
  • Ersteller von IoT-Projekten
  • Robotik-Ingenieure
  • Apps, die Live-Video-Streams erfordern
  • Plattformübergreifende Video-Lösungen

Hinweise

  • Stabile Netzwerkverbindung erforderlich
  • Beschränkt auf MJPEG-Format
  • Möglicherweise benötigen Sie zusätzlichen Puffer für geringe Bandbreite
  • Nicht geeignet für Video-Streams mit hoher Auflösung
  • Abhängig von der Server-seitigen MJPEG-Streaming-Unterstützung

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

📸 MJPEG Stream Flutter Package

mjpegLogo1

Welcome to MJPEG Stream Flutter Package! 🚀 This package allows you to stream MJPEG video in your Flutter application easily. Perfect for real-time camera feeds and IP camera streaming. 📷🎥

https://github.com/user-attachments/assets/c908688e-3cd0-45bc-a21b-359df1eac6a5

screen4

screen3

🌟 Features

  • 📡 Live MJPEG streaming
  • 🎨 Customizable width, height, and fit
  • ⚡ Optimized for performance
  • 🚀 Easy to integrate
  • 🛠 Error handling and reconnection support
  • 📜 Built-in logging for debugging

📦 Installation

Run this command:

With Flutter:

flutter pub add mjpeg_stream

Add this package to your pubspec.yaml:

dependencies:
  mjpeg_stream: latest_version

OR

mjpeg_stream:
    git:  
      url: https://github.com/MohammedShamseerPV/MJPEG-Stream.git
      ref: main  # Optional: specify the branch (default is 'main')

Then, run:

flutter pub get

🛠 Usage

Import the package:

import 'package:mjpeg_stream/mjpeg_stream.dart';
Example Usage 🎬
import 'package:flutter/material.dart';
import 'package:mjpeg_stream/mjpeg_stream.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'MJPEG Stream Example',
      home: Scaffold(
        appBar: AppBar(title: Text("MJPEG Stream")),
        body: Center(
          child: MJPEGStreamScreen(
            streamUrl: "http://your-ip-camera-url/video.mjpg",
            width: 300.0,
            height: 200.0,
            fit: BoxFit.cover,
          ),
        ),
      ),
    );
  }
}

📚 Use this Package as a Library

📥 Depend on it

Run this command:

With Flutter:

flutter pub add mjpeg_stream

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependedfdfdfncies:
  mjpeg_stream: ^latest_version
dependencies:
  mjpeg_stream: ^latest_version

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

📌 Import it

Now in your Dart code, you can use:

import 'package:mjpeg_stream/mjpeg_stream.dart';

⚙️ API Reference

Property Type Description
streamUrl String The URL of the MJPEG stream.
fit BoxFit Defines how the image should be inscribed into the widget. Default: BoxFit.cover.
width double Width of the stream display. Default: double.infinity.
height double Height of the stream display. Default: 300.0.
timeout Duration Timeout for the network request. Default: 5 seconds.
enableLogging bool Enables logging for debugging. Default: false.

🚀 How It Works

  1. The package establishes an HTTP connection to the MJPEG stream.
  2. It processes the received image frames in real-time.
  3. It updates the UI efficiently without performance issues.
  4. It handles errors and reconnection automatically. ⚡
  5. It provides logging for debugging purposes. 📜

🛠 Troubleshooting

  • ❗ Stream Not Loading? Check if your URL is correct and accessible.
  • 🔴 Slow Performance? Optimize the network or use a lower resolution stream.
  • 💥 Crashes? Ensure the stream URL is reachable and error handling is implemented.
  • 📝 Need Debugging? Enable logging by setting enableLogging: true.

🎯 Future Enhancements

  • ✅ Add support for pause/play functionality
  • ✅ Improve error handling
  • ✅ Optimize performance for low-latency streaming
  • ✅ Enhance logging and debugging features

📝 License

This package is open-source under the MIT License. Feel free to contribute! 😊

👨‍💻 Happy Coding! 🚀


🔗 Connect with Me


💰 Support My Work

If you found this package useful, consider supporting my work:

qr-code-phonePay

Uploading qr-code-phonePay.png…

Kategorien

Abhängigkeiten

Abhängigkeiten 1 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.