Monibuca / plugin-rtmp

RTMP协议插件,提供RTMP协议的server功能:接收rtmp推流和rtmp的播放功能
MIT License
94 stars 51 forks source link

Implementing go-rtmfp in monibuca #7

Open al-sabr opened 3 years ago

al-sabr commented 3 years ago

Hi I was wondering if you could also create this plugin for monibuca: https://github.com/optman/go-rtmfp

Right now I have a project which is using rtmfp and I don't like the architecture of MonaServer and the code is really not easy to understand. I need that rtmfp protol to upgrade from MonaServer into something more powerful and fast such as monibuca.

Let me know

thanx

langhuihui commented 3 years ago

Besides flash, is there any client that can use rtmfp?

al-sabr commented 3 years ago

Yes you can use librtmfp with C++ and golang and any other languages like Java and Python.

https://github.com/MonaSolutions/librtmfp

https://github.com/NodeMedia/NodeMediaClient-Android

There is 2 implementation with Golang...

https://github.com/zhwzhang/rtmfpew
https://github.com/Yuhang/xserver

The later seems to be really good.

It seems also that someone wrote this in JS:

https://github.com/HoLyVieR/LiveTool/tree/master/flash

Also in RUST

https://github.com/CUB3D/rust-rtmfp

I found this other client written in JS

https://github.com/MonaSolutions/MonaJS

langhuihui commented 3 years ago

let me see. only first link is real rtmfp client. As Web Apps can't use UDP protocol,only Desktop Apps can play rtmfp streams. Can you tell me more about your project?

langhuihui commented 3 years ago

Sounds very powerful and interesting. Is the whole system developed with go? Isn't rtmfp used to transmit video?

al-sabr commented 3 years ago

s very powerful and interesting. Is the whole system developed with go? Isn't rtmfp used to transmit video?

No the whole system is developed with Adobe AIR and C++ Native Extensions. What I am planning to do is to export the rtmfp part of monibuca as a C++ headers and *.obj files and then use this inside of a Native C++ extension which will be hooked to the Flash VM by Adobe AIR and I can call all the initialisation code from AS3 directly into C++.

Well RTMFP is more than Video we can send audio,data,video but what is amazing is that Adobe AIR has builtin SDK to create p2p collaborative apps and do video conferences between the peers in the network with NetGroups.

I could not figure out how to develop Native Extension directly from Golang because of 1 header file I need to adapt for Golang. But I don't have the knowledge to achieve that on my own. I am pretty certain that it is possible to code Native Extensions for Adobe AIR with Golang but I just didn't investigated deeply.

al-sabr commented 3 years ago

It seems that RTMFP could land on an open source Java library : pedroSG94/rtmp-rtsp-stream-client-java#223

There is also a commercial alternative but I won't pay for something which is now open to everybody : http://www.smaxe.com/product.jsf?id=juv-rtmfp-client

langhuihui commented 3 years ago

Flash is dead but AIR is still alive !?And you make your AIR project become a flash browser !It‘s a great idea. SWFs live in blockchain. Long live flash ! Back to story, If a library is ready , it's easy to implement that plugin

al-sabr commented 3 years ago

The truth is it is impossible to kill Flash and yes AIR is an .exe running natively on Windows, Mac, Android, iOS, etc...

Flash is getting metamorphosed into those solutions:

https://github.com/ruffle-rs/ruffle

https://medium.com/leaningtech/running-flash-in-webassembly-using-cheerpx-an-update-d500b6fbc44e

https://github.com/open-flash/avmore

langhuihui commented 3 years ago

Thank you for sharing so much good information. go-rtmfp or xserver can run dependently without Monibuca. What's the need to put them together?

al-sabr commented 3 years ago

I would love to see rtmfp inside of monibuca because the source code is so clear and clean that I would also like to learn at the same time. Also since there's rtmp support having the rtmfp would make this project more complete in features. I am really curious how you will architect the code and make it fit inside of your code. Actually the code is already there but adapting it is what interests me the most.

langhuihui commented 3 years ago

RTMFP protocol is different from other protocols since it just helps clients transmit audio and video between them. Monibuca is a SFU(Selective Forwarding Unit) mode server so plugins just put the audio and video data into buffers. What can I do if I get a rtmfp connection?

al-sabr commented 3 years ago

You can add p2p functions out of the box. There's an API which allows you to build powerful p2p server less applications + on top of rtmfp there's an integrated API to create your own protocol very easily.

al-sabr commented 3 years ago

All the routing is Integrated you don't need to worry about it. You just need to listen to network events and react to them.

al-sabr commented 3 years ago

Look at all the Video Links I sent concerning RTMFP you will see the power.

al-sabr commented 3 years ago

You can create Private NetGroups protected with passwords. There's so many features.

langhuihui commented 3 years ago

So many features can be implemented by standard alone server. What's the difference between putting it together with Monibuca?

al-sabr commented 3 years ago

Actually all the things described previously are handled all by the protocol you can just use those features to extend monibuca so that it can be accessed by the client app to create real-time applications or game servers.

langhuihui commented 3 years ago

You're talking about the next stage of Monibuca. This is a bright future. However, every project needs some growth opportunities. In this way, there will be a series of clear requirements and financial support~