Live data from Hacker News

A simple C implementation to stream H.264 to browser using WebRTC

github.com

21–30 of 128 posts

Re: A simple C implementation to stream H.264 to browser using WebRTC

#21
post #17

I've seen a few WebRTC server implementations pop up recently but the only clients I have seen are web browsers. Does anyone know of any WebRTC client implementations apart from the browser? Or am I misunderstanding the WebRTC architecture completely?

The official one, pion (go) and webrtc-rs (rust) can all be used on both sides.

Re: A simple C implementation to stream H.264 to browser using WebRTC

#22
post #19
post #6

Earlier quoted context omitted.

It's certainly not better than FFmpeg. But I had a look through the source code and the author seems to have a fairly good grasp of WebRTC. The library looks really useful for anyone that wants to quickly understand WebRTC and how to use librtp and libsrtp. It's mostly a bare-bone wrapper around those libs.

Maybe it would be a good starting point for someone integrating it into ffmpeg

Yep, it looks easy to replace the function h264_get_next_frame(). I think you could get really decent performance if you used ffmpeg to pre-extract all of the frames into sequential files and serve them statically.

Re: A simple C implementation to stream H.264 to browser using WebRTC

#23
post #17

I've seen a few WebRTC server implementations pop up recently but the only clients I have seen are web browsers. Does anyone know of any WebRTC client implementations apart from the browser? Or am I misunderstanding the WebRTC architecture completely?

Because webrtc came from the chromium source code so you got it installed already on your browser. Then Google took it out there and made it stand alone library so you can use it on apps. I see webrtc projects occasionally here on Show HN threads

Re: A simple C implementation to stream H.264 to browser using WebRTC

#24
post #17

I've seen a few WebRTC server implementations pop up recently but the only clients I have seen are web browsers. Does anyone know of any WebRTC client implementations apart from the browser? Or am I misunderstanding the WebRTC architecture completely?

The Python library aiortc, https://github.com/aiortc/aiortc, enables client and server side communication via WebRTC.

Re: A simple C implementation to stream H.264 to browser using WebRTC

#25

Earlier quoted context omitted.

> STUN is just for punching holes in your NAT router, and also discovering what is your public IP address. I know, but what I mean is that "true P2P" on our current internet architecture is not possible, you always need the help of a third party

If we are still in the 90's that definition of "true p2p" would be: two computers with both having public IPs and transferring packets via TCP. But nowadays we are always behind NATs so we became less strict with the definition of what is true p2p

Then bittorrent is transcendent p2p?

Re: A simple C implementation to stream H.264 to browser using WebRTC

#27
post #17

I've seen a few WebRTC server implementations pop up recently but the only clients I have seen are web browsers. Does anyone know of any WebRTC client implementations apart from the browser? Or am I misunderstanding the WebRTC architecture completely?

Gstreamer. Example at https://github.com/centricular/gstwebrtc-demos/tree/master/s...

Re: A simple C implementation to stream H.264 to browser using WebRTC

#28
post #20
post #17

I've seen a few WebRTC server implementations pop up recently but the only clients I have seen are web browsers. Does anyone know of any WebRTC client implementations apart from the browser? Or am I misunderstanding the WebRTC architecture completely?

At a low level, webrtc interoperates with VoIP. But because webrtc doesn't mandate a signalling protocol and VoIP uses SIP, generally you need a browser to run whatever proprietary signalling the site decided to implement in JS.

Matrix can also function as a signaling layer for WebRTC.

Re: A simple C implementation to stream H.264 to browser using WebRTC

#29
post #20

Earlier quoted context omitted.

At a low level, webrtc interoperates with VoIP. But because webrtc doesn't mandate a signalling protocol and VoIP uses SIP, generally you need a browser to run whatever proprietary signalling the site decided to implement in JS.

Matrix can also function as a signaling layer for WebRTC.

Anything can function as the signaling layer since all you need is to exchange pieces of text. I think the point was that most sites choose to implement it using JS and browser API's like ajax, websocket or SSE.

Re: A simple C implementation to stream H.264 to browser using WebRTC

#30
post #17

I've seen a few WebRTC server implementations pop up recently but the only clients I have seen are web browsers. Does anyone know of any WebRTC client implementations apart from the browser? Or am I misunderstanding the WebRTC architecture completely?

A lot of video call applications use WebRTC, I'm pretty sure slack uses it (although not in P2P mode, they use a SFU).
Post reply on HN