패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.1

mjpeg_stream

HTTP를 통해 MJPEG(Motion 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 응용 프로그램과 같이 지속적인 비디오 스트림이 필요한 분야에서 특히 유용합니다.

사용 사례

  • 실시간 카메라 모니터링
  • 사물인터넷 장치 비디오 피드 통합
  • 로봇 시각 시스템
  • 감시 대시보드
  • 원격 진단

주요 기능

  • 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.