搜索插件、代码仓与 APP 分类

GitHub 代码仓emiliodallatorre/flutter_rtmp_broadcaster

flutter_rtmp_broadcaster

支持 RTMP 直播流的 Flutter 相机插件,适用于 Android 和 iOS。

flutter_rtmp_broadcaster 项目封面
星标
18
复刻
31
最近推送(UTC)
2026年9月4日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

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.

Emilio Dalla Torre GitHub avatar
GitHub 作者

Emilio Dalla Torre ↗

Engineer and MSc student in HPC at Politecnico di Milano & KTH. R&D at @qualcomm. Formerly doing AI and full-stack development at @Accenture and PwC.

@qualcommMilan, Italy
语言DartObjective-CKotlinSwiftDockerfileRubyShell

此仓库发布的插件

使用的依赖

依赖清单 7 项

  • flutter{"sdk":"flutter"}
  • cross_file^0.3.1
  • path_provider^2.0.13
  • video_player开发依赖^2.9.2
  • dart_apitool开发依赖^0.23.2
  • flutter_test开发依赖{"sdk":"flutter"}
  • flutter_driver开发依赖{"sdk":"flutter"}

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗