How to stream media using WebRTC and FFmpeg, and why it's a bad idea
blog.maxwellgale.com
How to stream media using WebRTC and FFmpeg, and why it's a bad idea
1–10 of 41 posts
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#2in case someone was wondering why it was a bad idea
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#3The post ends at RTP out from FFMPEG. Maybe I’m supposed to know how to consume that with WebRTC but in my investigation it’s not at all straightforward... the WebRTC consumer needs to become aware of the stream through a whole complicated signaling and negotiation process. How is that handled after the FFMPEG RTP stream is produced?
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#4>And finally, we encounter a large issue without a good solution. In encoded videos, a key frame is a frame in the video that contains all the visual information needed to render itself without any additional metadata. These are much larger than normal frames, and contribute greatly to the bitrate. Ideally, there would be as a few keyframes as possible. However, when a new user starts consuming a stream, they need at…
http://www.chaneru.com/Roku/HLS/X264_Settings.htm#intra-refr...
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#5What about the WebRTC part? The post ends at RTP out from FFMPEG. Maybe I’m supposed to know how to consume that with WebRTC but in my investigation it’s not at all straightforward... the WebRTC consumer needs to become aware of the stream through a whole complicated signaling and negotiation process. How is that handled after the FFMPEG RTP stream is produced?
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#6This should be `-bsf:v` and it's not required since this command encodes and the encoder has been informed via `-level`.
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#7Another big piece missing here is congestion control. It isn’t just about keeping bitrate low, but figuring out what you can use. It is a really interesting topic to measure RTT/Loss to figure out what is available. You don’t get that in ffmpeg or GStreamer yet. The best intro to this is the BBR IETF doc IMO [1]
[0] https://github.com/pion/webrtc/tree/master/examples/rtp-to-w...
[1] https://tools.ietf.org/html/draft-cardwell-iccrg-bbr-congest...
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#8Twitch uses it's own transcoding system. Here is a interesting read from their engineering blog [0]
[0] https://blog.twitch.tv/en/2017/10/10/live-video-transmuxing-...
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#9>And finally, we encounter a large issue without a good solution. In encoded videos, a key frame is a frame in the video that contains all the visual information needed to render itself without any additional metadata. These are much larger than normal frames, and contribute greatly to the bitrate. Ideally, there would be as a few keyframes as possible. However, when a new user starts consuming a stream, they need at…
(And I suppose also when seeking inside a stream)
Re: How to stream media using WebRTC and FFmpeg, and why it's a bad idea
#10> -bsv:v h264_metadata=level=3.1 This should be `-bsf:v` and it's not required since this command encodes and the encoder has been informed via `-level`.