パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.1

mjpeg_stream

HTTP を通じて MJPEG(モーションJPEG)動画をストリーミングするためのFlutterパッケージ

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
112
いいね数
3
Pub ポイント
125

パッケージをインストール

flutter pub add mjpeg_stream

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

mjpeg_stream パッケージは、Flutter アプリケーションが HTTP を通じて MJPEG(モーション JPEG)動画をストリーミングできるようにし、IP カメラやウェブサーバーからのリアルタイム動画再生に軽量なソリューションを提供します。Android、iOS、macOS、Windows、Linux など複数のプラットフォームをサポートしており、クロスプラットフォームのビデオ監視アプリに最適です。このパッケージは最小限の遅延で HTTP ストリーミングを効率的に処理し、開発者が UI にライブ動画フィードを直接統合できるようにします。監視、ロボティクス、IoT アプリケーションにおいて継続的な動画ストリームが必要な場面で特に役立ちます。

用途

  • ライブカメラモニタリング
  • IoTデバイスの動画フィード統合
  • ロボティクスビジョンシステム
  • 監視ダッシュボード
  • リモート診断

主な機能

  • HTTPを介したMJPEGをサポート
  • クロスプラットフォーム互換性
  • 低遅延ストリーミング
  • Flutterウィジェットとの簡単な統合
  • リアルタイム動画再生

適している対象

  • 監視アプリを開発する開発者
  • IoTプロジェクト作成者
  • ロボティクスエンジニア
  • ライブ動画フィードを必要とするアプリ
  • クロスプラットフォーム動画ソリューション

注意事項

  • 安定したネットワーク接続が必要です
  • MJPEG形式に制限
  • 低帯域幅の場合、追加のバッファリングが必要になる可能性があります
  • 高解像度の動画ストリーミングには適していません
  • サーバーサイドのMJPEGストリーミングサポートに依存します

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

📸 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…

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。