This is based on SeanDer/rtmp-to-webrtc example codebase, which is outdated, and I should not have built on it, but I tried to because I liked the structure better (because the RTMP server is embedded in the golang code, so we have an OnConnect callback where we can Join the ion-sfu session)
This RTMP server works, and accepts connections, and opens a PeerConnection to ion-sfu, but doesn't write the correct data to the tracks.
Sean later wrote pion/example-webrtc-applications/rtmp-to-webrtc, which has the same function, but is structured VERY differently (uses ffmpeg to connect to an existing RTMP server, and translates it to RTP, then reads from the RTP stream in golang)
This approach should be rebuilt (because, as sean says, "transcoding AAC to Opus in golang is very tricky") to use an external transcoder, like ffmpeg or gstreamer
CLOSING NOTES:
This is based on
SeanDer/rtmp-to-webrtc
example codebase, which is outdated, and I should not have built on it, but I tried to because I liked the structure better (because the RTMP server is embedded in the golang code, so we have anOnConnect
callback where we canJoin
the ion-sfu session)This RTMP server works, and accepts connections, and opens a PeerConnection to ion-sfu, but doesn't write the correct data to the tracks.
Sean later wrote
pion/example-webrtc-applications/rtmp-to-webrtc
, which has the same function, but is structured VERY differently (uses ffmpeg to connect to an existing RTMP server, and translates it to RTP, then reads from the RTP stream in golang)This approach should be rebuilt (because, as sean says, "transcoding AAC to Opus in golang is very tricky") to use an external transcoder, like ffmpeg or gstreamer