mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
7.29k stars 1.07k forks source link

✨ Built-in RTMP Support in React Native Vision Camera #3162

Closed YashM20 closed 1 week ago

YashM20 commented 2 weeks ago

What feature or enhancement are you suggesting?

I'm suggesting the addition of RTMP (Real-Time Messaging Protocol) streaming support in the React Native Vision Camera library. This feature would allow developers to stream live video and audio directly from the camera to an RTMP server, facilitating the creation of live streaming applications within the React Native ecosystem.

What Platforms whould this feature/enhancement affect?

iOS, Android

Alternatives/Workarounds

Current Situation

Existing Libraries

  1. React-Native-NodeMediaClient
  2. NodeMedia-Client-with-Zoom
  3. React-Native-RTMP-Publisher

Issues with existing libraries:

Request

Could we consider adding built-in RTMP support to React Native Vision Camera? Take RTMP link as output URL.

Benefits:

Questions

  1. Is this feature on the roadmap?
  2. What challenges do you foresee in implementing this?
  3. How can the community contribute to making this happen?

Thank you for considering this request and for your ongoing work on React Native Vision Camera! You guys are doing great in React Native Community✨.

Additional information

maintenance-hans[bot] commented 2 weeks ago

Guten Tag, Hans here! Thank you for your detailed feature request regarding RTMP support in React Native Vision Camera! 🍻 This feature indeed sounds valuable for developers looking to implement live streaming.

While I cannot promise immediate implementation, I recommend discussing this further in our community, as contributions are always welcome! If you want to see this feature realized sooner, consider supporting the project through sponsorship at mrousavy's GitHub Sponsors.

Please stay tuned for feedback from mrousavy or other contributors! Thank you for your enthusiasm!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

mrousavy commented 1 week ago

Hey!

Thanks for the feature request, but this is not something I will implement for VisionCamera.

This is exactly the reason why I built Frame Processors, a modular system allowing you to do ANYTHING with video frames, in a powerful and flexible way. There can be a WebRTC plugin that users can simply use via JS (that's the easy-to-use part), and then you integrate this.

We have already built a few such tailored solutions for a few clients before.

mrousavy commented 1 week ago

How can the community contribute to making this happen?

By building a VisionCamera WebRTC frame processor plugin 😄

YashM20 commented 1 week ago

I appreciate the direction towards using Frame Processors for this purpose. Since RTMP streaming is a bit complex, I’m eager to contribute by building the Vision Camera WebRTC frame processor plugin myself with help from others in the community.

However, I’m not entirely sure where to start since I don't have much experience with TurboModules and C++. If you could spare some time, could you guide me on the key steps involved in creating such a plugin?

Specifically, I’m looking for advice on:

  1. Integrating WebRTC: How would you recommend starting the integration with WebRTC for handling video frames from Vision Camera?
  2. Frame Processing Basics: Any tips on the essentials of creating a robust frame processor plugin for live streaming?
  3. Key Challenges: What are the potential pitfalls or challenges I should be aware of while developing this?

If you have any resources or pointers to relevant parts of the Vision Camera codebase that could help, I’d be grateful.

Thanks again for your time and guidance!

mrousavy commented 1 week ago

You don't need C++, nor TurboModules.

Check out the docs here on FP Plugins