Ingest Live Stream
Is your feature request related to a problem? Please describe. I would like to ingest a live stream and output to another endpoint
Describe the solution you'd like For example:
ffmpeg -listen 1 -i rtmp://source-server/stream01 rtmp://destnation-server/streamkey
Describe alternatives you've considered searching for solutions..... all kinds.... too many and too nebulous (right now) to list here....
Hi @DAConsulting. We are in the same boat. Here are some points I got from my readings:
- Browsers don't support RTMP.
- You can't use browser socket with wasm.
- Even if you try to use HTTP while live streaming (eg. hls), browser will not allow it.
- You need to use your own implementation to ingest stream to server using allowed method by browser such as WebRTC or HTTP.
Hi, @ADIBzTER 👍
I understand that browsers do not directly support RTMP. But using FFMPEG, I can ingest a stream (or a file) and output to an RTMP url.
So... If ffmpeg wasm is a port of FFMPEG, my hope was that one could do the same.
I beleive you can indeed stream a file to an RTMP end point using ffmpeg wasm. (Need to double check this)... so the only difference would be the ability to ingest a stream to be sent. (i.e., as in UNIX: everything is a "file"... , etc).
The limitation with ffmpeg wasm seems to be that one must load a finished file into FSMEM first. And a source stream is, by definition, infinate.
However... if FSMEM had the ability to accept abd buffer input from a stream... then it should be able to output to a stream url (RTMP or otherwise).
How does one submit an enhancment request? ;-)
This would be a huge asset. It seems that many developers are looking for such a solution.
It is possible to do all of this now using OBS... but it would be a big advantage to do it all from javascript... in the browser... without the need for extrrnal software (such as OBS and FFMPEG)
https://stackoverflow.com/questions/8051516/how-to-establish-a-tcp-socket-connection-from-a-web-browser-client-side
Allowing regular socket connections directly from the browser is never going to happen because it opens up a huge risk. WebSockets is about as close to raw sockets from the browser as you are going to get.
@DAConsulting @ADIBzTER Hi, are your problem solved yet? Is there still a demand? I'm working on something which may helps. I'm trying to get more about the use case. Contact me if you need, [email protected]