搜尋套件、儲存庫與 APP 分類

套件詳情v3.1.1

rtmp_broadcaster

Flutter 相機外掛程式擴充功能,可在 Android 與 iOS 裝置上實現即時影片串流傳輸(RTMP)。

AndroidiOS
近 30 天下載
497
喜歡數
40
Pub 分數
140

安裝套件

flutter pub add rtmp_broadcaster

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

rtmp_broadcaster 套件擴展了 Flutter 的相機外掛,讓 Android 與 iOS 裝置能透過 RTMP 實現即時影片串流。它讓開發者可以直接從行動裝置將直播影片傳送到 RTMP 伺服器,非常適合用於現場活動、視訊會議或社群媒體串流。此套件與現有的相機功能無縫整合,並支援常見的 RTMP 設定。該套件以效能與簡易性為設計核心,提供直覺的 API 來啟動與停止串流。

適用情境

  • 即時事件直播
  • 社群媒體直播
  • 遠端視頻會議
  • 物聯網裝置影片串流
  • 即時監控

主要特色

  • RTMP 流媒體支援
  • Android 和 iOS 相容性
  • 相機整合
  • 簡單的啟動/停止 API
  • 低延遲串流

適合對象

  • 開發即時影片應用的開發者
  • 需要RTMP輸出的移動應用開發者
  • 即時通訊平台
  • 使用移動串流的內容創作者

使用建議

  • 需要設置RTMP伺服器
  • 網路穩定性影響串流品質
  • 僅限 Android 和 iOS
  • 可能需要額外權限
  • 依賴於底層相機插件

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Flutter RTMP broadcaster

codecov Dart CI Publish Stale

[!IMPORTANT] Development of version 3.0 is being restarted. Expect breaking changes to the API and Android/iOS build configuration while this work is in progress.

This plugin extends the Flutter camera plugin with RTMP streaming support for Android and iOS. Web is not supported.

It follows the same API structure as the camera plugin and adds a startStreaming(url) method to initiate real-time streaming to an RTMP endpoint.

Underlying implementation:

Features

  • Live camera preview embedded in a widget
  • Snapshot capture to file
  • Video recording
  • Direct access to image streams from Dart

Usage

The controller extends the camera plugin's API with the following methods:

Function Description
startVideoStreaming(String url, {int bitrate = 1200 * 1024, bool? androidUseOpenGL}) Starts streaming to an RTMP endpoint
startVideoRecordingAndStreaming(String filePath, String url, {int bitrate = 1200 * 1024, bool? androidUseOpenGL}) Starts streaming to an RTMP endpoint while simultaneously recording to a local file
pauseVideoStreaming() Pauses the active stream
resumeVideoStreaming() Resumes a paused stream
stopEverything() Stops any active streaming and recording

Getting started

iOS

Add the following keys to ios/Runner/Info.plist:

<key>NSCameraUsageDescription</key>
<string>App requires access to the camera for live streaming feature.</string>
<key>NSMicrophoneUsageDescription</key>
<string>App requires access to the microphone for live streaming feature.</string>
Android

Set minSdkVersion to 21 or higher in android/app/build.gradle.

Example

The example app demonstrates camera preview, snapshot capture, video recording, and RTMP streaming. Clone the repository and run the app on an Android or iOS device to try it.

A local RTMP test server is available under server/, set up via Docker Compose, for testing without a public endpoint.

Troubleshooting & issues

Report bugs or unexpected behavior via GitHub issues. Availability for support is limited; for prioritized or paid support, contact [info@emiliodallatorre.it](mailto:info@emiliodallatorre.it).

Contributing

  1. Fork the repository and create a branch for your change
  2. Make the change
  3. Ensure the code is formatted and tested
  4. Submit a pull request describing the change

Support development

If this plugin is useful to you, consider supporting its development via Buy Me a Coffee.

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。