Live data from Hacker News

Show HN: Pxy – A Go server that proxies websocket livestreams to RTMP servers

github.com

21–30 of 34 posts

Re: Show HN: Pxy – A Go server that proxies websocket livestreams to RTMP servers

#21

In the same genre of Go video streaming adapter servers. Here are a couple neat projects which stream from RTSP (as used by eg security cameras) to either fragmented .mp4 files over WebSocket or WebRTC: https://github.com/deepch/RTSPtoWSMP4f https://github.com/deepch/RTSPtoWebRTC I'm jealous of Go's WebRTC library that makes the latter possible. I'd love to have a similar Rust crate.

Doesn't Gstreamer provide a rust-based plugin to achieve this yet? It is surely just a matter of time if not.

Re: Show HN: Pxy – A Go server that proxies websocket livestreams to RTMP servers

#22

In the same genre of Go video streaming adapter servers. Here are a couple neat projects which stream from RTSP (as used by eg security cameras) to either fragmented .mp4 files over WebSocket or WebRTC: https://github.com/deepch/RTSPtoWSMP4f https://github.com/deepch/RTSPtoWebRTC I'm jealous of Go's WebRTC library that makes the latter possible. I'd love to have a similar Rust crate.

Doesn't Gstreamer provide a rust-based plugin to achieve this yet? It is surely just a matter of time if not.

Yes: https://github.com/centricular/gstwebrtc-demos/tree/master/s...

Re: Show HN: Pxy – A Go server that proxies websocket livestreams to RTMP servers

#23
I see you are invoking Ffmpeg via the shell. I also tried steaming to Youtube from Go and had to resort to the same solution. It's a shame there isn't a usable library for implementing a RTMP client in Go. Using Ffmpeg from the shell is very limiting because there is no way to monitor the status of the stream or to provide audio and video separately using stdin.

Re: Show HN: Pxy – A Go server that proxies websocket livestreams to RTMP servers

#24
post #23

I see you are invoking Ffmpeg via the shell. I also tried steaming to Youtube from Go and had to resort to the same solution. It's a shame there isn't a usable library for implementing a RTMP client in Go. Using Ffmpeg from the shell is very limiting because there is no way to monitor the status of the stream or to provide audio and video separately using stdin.

Couldn't you use named pipes for passing separate streams of input?

Re: Show HN: Pxy – A Go server that proxies websocket livestreams to RTMP servers

#25

Which side of this proxy is producing/consuming only FLV/Flash streams?

Hello, I'm the author here. The frontend would stream the video/audio to Pxy via WebSockets. In turn, Pxy utilises FFmpeg to convert the incoming stream to FLV and send the FLV stream to your desired external RTMP service (in this case, I'm using mux.com).

Re: Show HN: Pxy – A Go server that proxies websocket livestreams to RTMP servers

#26
post #8

Cool project! I've done similar things with Kurento acting as a WebRTC peer to proxy WebRTC --> RTMP before but this is a lot more lightweight. One thing I'd love to see at some point is a project that compiles FFMpeg's transmuxing code to WASM such that the WebM --> FLV conversion could be done client-side. That way the server-side portion would be as simple as proxying the WebSocket to a TCP socket for the outgoing…

Hello, I'm the author here, thanks for liking the project! I'm not aware of Kurento prior to your post, it seems pretty nifty, good to explore for future projects!

Getting the client to do the heavy lifting while the server acts solely as a relay is a really good idea. In my use case, however, I have a flutter client that's not capable of doing that at the moment, perhaps that's something that could be explored further in the future.

Re: Show HN: Pxy – A Go server that proxies websocket livestreams to RTMP servers

#27

Awesome to see this on the front page! I’ve been chatting with the OP for a few days and this is based on a Node.js PoC I wrote for a blog post on the state of broadcasting live from a browser[1]. This is, IMO, the simplest way to be able to go from a modern browser to an RTMP endpoint. You could try and do server-side WebRTC using a project like Pions[2], or use headless Chrome and be a peer, but both of those come…

Hey Matthew, thanks for the insights you've been providing to me thus far, I've added [1] to the references in the project's README!

Meanwhile, there's another well-explained tutorial that complements [1] along with a code walkthrough to implement something similar in Node.js.

https://github.com/fbsamples/Canvas-Streaming-Example/blob/m...

Post reply on HN