4 ms·
What is the target use-case of pion? Until AV1 support is added to libwebrtc, how can this be used that wouldn't be better served by using RTP directly?
by simulate-me 4y ago
What is the target use-case of pion? Until AV1 support is added to libwebrtc, how can this be used that wouldn't be better served by using RTP directly?
- Sean-Der 4y agoAV1 support is already available in libwebrtc! So when I started building Pion the target use case was to make it easier to build scalable servers. Instead of interacting with a WebRTC servers REST API to query information/load balance I wanted to have it all in one code base. It also is really useful to have Media+Transport decoupled. Lots of use cases I didn't realize grew out of that. * Teleoperation/robotics (https://github.com/Ragnar-H/TelloGo https://github.com/Ragnar-H/TelloGo) * Control remote software (https://github.com/m1k1o/neko https://github.com/m1k1o/neko) * Cross platform file sharing (https://github.com/saljam/webwormhole https://github.com/saljam/webwormhole) * Sending pre-recorded media (RTMP/HLS/RTSP -> WebRTC) * Custom DataChannel servers/bridges (https://snowflake.torproject.org/ https://snowflake.torproject.org/) Lots of other cool ones in https://github.com/pion/awesome-pion https://github.com/pion/awesome-pion I need to update it. It has been a bit since I have looked through https://pkg.go.dev/github.com/pion/webrtc/v3?tab=importedby https://pkg.go.dev/github.com/pion/webrtc/v3?tab=importedby
- simulate-me 4y agoThanks that's helpful. Does pion support RTCP? I've tried sending pre-recorded media over WebRTC before. The issue I ran into is that I needed to send keyframes too often leading to a bitrate that was too high for users with slower internet connections. For whatever reason, not all browsers seemed to support keyframe intra refresh, so there were large bitrate spikes whenever a keyframe was sent. RTCP would have solved this problem by allowing clients to request additional keyframes when needed rather than using a high keyframe interval.
- Sean-Der 4y agoYes it does support RTCP. https://github.com/pion/rtcp https://github.com/pion/rtcp We also provide https://github.com/pion/interceptor https://github.com/pion/interceptor. Interceptor is implementations of common RTCP workflows. Things like Congestion Feedback, NACK generation and Congestion Controllers. The idea is that you can use the ones we provide, or use your own!
- simulate-me 4y agoThat’s cool. Do you have any examples of doing real-time media streaming? I guess pion is just the transport layer; so you need a separate media library?
- Sean-Der 4y agoWhat in particular are you looking for? If you want the ‘conference use case’ LiveKit, Galene and ion-SFU are all popular
- simulate-me 4y agoI'm looking to take a pre-recorded video file and stream it to a WebRTC client. I use an SFU, but I don't think that's the important part. The main issue is transcoding the video in a format that the browser supports and in a way that can respond to RTCP feedback signals. For instance, you can generate an RTP SDP file to use as the output for an FFmpeg CLI command, but the FFmpeg CLI has no support for RTCP. You had mentioned that pion was used to stream pre-recorded media over WebRTC, so I was hoping you had an example of doing so that properly handled RTCP.
- Sean-Der 4y agoFor getting media out of ffmpeg you have https://github.com/pion/webrtc/tree/master/examples/rtp-forwarder https://github.com/pion/webrtc/tree/master/examples/rtp-forw... For playing media from disk you have https://github.com/pion/webrtc/tree/master/examples/play-from-disk https://github.com/pion/webrtc/tree/master/examples/play-fro... To see how to accept and process RTCP see https://github.com/pion/webrtc/tree/master/examples/rtcp-processing https://github.com/pion/webrtc/tree/master/examples/rtcp-pro... The example-webrtc-applications repo also shows how you could get media from GStreamer.