iizukanao / node-rtsp-rtmp-server

RTSP/RTMP/HTTP hybrid server
MIT License
1.09k stars 280 forks source link

Remote RTMP server #34

Open domosapien opened 8 years ago

domosapien commented 8 years ago

This is more of a feature request - would it be possible to use this server only for RTMPT and use a remote RTMP server? I have tried modifying the server to allow for this, but I am having trouble with getting past the stream registration part, since it is on a remote server and not running through the accompanying rtmp server stack. Would you be at all interested in supporting this, either with a fork or a patch?

iizukanao commented 8 years ago

Hi, I've added config options to be able to use the server only for RTMPT at the commit e18d4b5d811a0c03c690b75fd57a9e353933b282. Edit config.coffee and set enable* to false except enableRTMPT.

Though the server cannot download remote RTMP stream, you can use ffmpeg to pass the stream like this:

$ ffmpeg -i rtmp://REMOTE_SERVER/PATH -c:v copy -c:a copy -f flv rtmp://localhost/live/test
domosapien commented 8 years ago

Thank you very much for enabling this! I will test it out soon. Is it at all possible to get rtmpt to download the remote stream? If possible, I would like to avoid the extra server load from processing the rtmp twice and from having to manage additional ffmpegs to reflect the data into the other server.

iizukanao commented 8 years ago

Currently it's not supported, but I'm planning to implement that in future versions.

fuyacho-takatsuji commented 8 years ago

Hi, I am also interested in the feature, would you put priority on it?

iizukanao commented 8 years ago

@fuyacho-takatsuji Maybe. I'm refactoring the code to be able to do this.

fuyacho-takatsuji commented 8 years ago

Well, I created rtsp server application on android to source live streaming. I was able to grab it and publish on rtmp with ffmpeg(command below) and this server.coffee script. ffmpeg -i rtsp://192.168.2.12:8988 -c:v copy -c:a copy -f flv "rtmp://localhost:1935/live/androidtest" *192.168.2.12 : android phone ip address in local wifi I needed to prepare index.html with jwplayer.

Thanks Iizukanao for the project. It is so much fun.