Live data from Hacker News

Janus WebRTC Server

janus.conf.meetecho.com

31–40 of 65 posts

Re: Janus WebRTC Server

#31
Just finished setting up a Janus server while building a web application in the education space which needed video chat and the ability to record the videos.

Absolute dream to work with! Thank you Lorenzo and the rest of the Janus team. Hopefully we'll get the chance to make it down to Janus Conf!

If anyone is looking for help adding it to their app hit me up!

Re: Janus WebRTC Server

#32
post #6

Does anyone have a link which explains WebRTC technology in a concise way?

I really want to write a book on this eventually, but I haven't found a good single resource myself :( I have done some talks trying to explain WebRTC. Happy to answer any questions

* Slides - https://pion.github.io/talks/2018-11-28-seattle-video-tech.h...

* Video - https://www.youtube.com/watch?v=FdgoOrJH8ok&feature=youtu.be...

* Video - https://www.youtube.com/watch?v=ezZYd5NsxE4

------

But when I teach others I try to break it down into a few unique chunks.

* ICE - Establishing P2P Communication

* DTLS/SRTP - Securing Communication

* SCTP - Sending binary data over UDP and handling loss

* RTP/RTCP - Sending media data over UDP and handling loss

Re: Janus WebRTC Server

#33

Earlier quoted context omitted.

I used Janus to map my IP camera's stream to a WebRTC page using a Raspberry Pi's hardware transcoder. It works quite well.

I'd be super interested in seeing what you've got! Is your implementation posted anywhere? I really like your Stylus project btw!

There's two parts to the implementation. First part is a docker container that will transcode a stream for Janus using the hardware on the Pi:

https://github.com/mmastrac/gst-omx-rpi-docker

I run this with the following config (just remember to map the RPi /dev/vchiq device into the container!):

  gst-launch-1.0 rtspsrc location="rtsp://admin:(password)@(host):554/cam/realmonitor?channel=1&subtype=0" latency=500 ! rtph264depay ! h264parse ! omxh264dec ! omxh264enc target-bitrate=500000 control-rate=1 ! video/x-h264, profile=baseline ! h264parse ! rtph264pay name=pay0 config-interval=1 pt=96 ! udpsink host=(janus) port=8004 sync=false
The second part is the Janus configuration magic that creates the appropriate stream:

  [gstreamer-sample]
  type = rtp
  id = 1
  audio = no
  video = yes
  videoport = 8004
  videopt = 96
  videortpmap = H264/90000
  videofmtp = profile-level-id=42E01F\;packetization-mode=1\;level-asymmetry-allowed=1
  videobufferkf = yes
> I really like your Stylus project btw!

Thanks! Been working on Stylus a bit more this weekend. Nearly have all the features I need for my own setup.

Re: Janus WebRTC Server

#34
For those that are interested in Janus and WebRTC in general, I highly recommend reading Lorenzo Miniero's (creator of Janus) Ph.D thesis [1] on the project and the state-of-the-art of WebRTC. It's brilliant and enlightening. The Janus project is a really marvel of engineering.

[1] http://www.fedoa.unina.it/10403/1/miniero_lorenzo_27.pdf (PDF)

Re: Janus WebRTC Server

#35

Having to look into this professionally for local/remote streaming solutions and came across this paper in the last couple of weeks which has been a huge help to understanding my use case: http://lup.lub.lu.se/luur/download?func=downloadFile&recordO... One of the most useful/interesting use cases to me is the ability to have a PTP encrypted stream without having to go through weird IoT PKI hoops. Ninja edit: If anyon…

I do WebRTC on Edge/IoT devices (mostly MIPS/ARM devices running Linux). Customers are mostly teleoperations (robotics) and security cameras. Most customers run an MCU/SFU on a server, but then just a WebRTC client on the device. We do simulcast on the device to an SFU, and then distribute from there. Happy to answer questions here or directly. I don't want to be disrespectful and sell other stuff on this thread thou…

I'm concerned in targeting things like Janus etc to the MIPS architecture for streaming over WebRTC because typically I only see MIPS on legacy devices in my world. How does MIPS handle this stuff?

PS: I know that Amazon has a product in the space and we're vetting AWS as our cloud provider due to it's diverse product offering. I've been looking at opensource solutions due to vendor lock-in but would love to hear if you have any experience with the Amazon offering!

Re: Janus WebRTC Server

#36
post #24

Earlier quoted context omitted.

Did you write your own plugin or are you using VideoRoom or something? The thing that turned me off of Janus is that VideoRoom seemed way too high level and made tons of schema assumptions, but all of the important SFU functionality seemed intertwined into the codebase of that plugin, so if I were to actually want to build a "custom solution" it looked like I would have to maintain an annoying-to-merge fork of that t…

Janus itself doesn't make any assumptions about a specific use-case. All the functionality outside of the core RTC stuff is implemented with plugins. The default "Video Room" implementation is just a Lua script [0]. Mozilla has written their own SFU plugin (in Rust) [1] for game networking that powers Mozilla Hubs [2]. [0] https://github.com/meetecho/janus-gateway/blob/master/plugin... [1] https://github.com/mozilla/…

No: the vast majority of the VideoRoom functionality is written in C, and it is where all of the actually-hard-to-do video SFU stuff -- like quality control feedback and SVC support, particularly in an end to end encryption context with all the codec-specific workarounds--is commingled together with the notion of "rooms" (which is a really awkward and specific high-level abstraction with a schema that you have to abuse for basic use cases).

https://github.com/meetecho/janus-gateway/blob/master/plugin...

Yes: if you don't want any of the complex video functionality, you can easily write your own Janus plugin, and that maybe sounds reasonable for some trivial game "SFU" where you are just going to move around some data channel packets... but at that point you can (and I argue should) just use libwebrtc (I do this, and I helped one of my friends do this for his product in a weekend: people act like it is hard to compile but it really isn't).

(Even more so: the Lua script you linked to looks more like a demo/example of a way to use the Lua plugin to get some functionality vaguely similar to the VideoRoom plugin, and it is notably ridiculously long and contains a lot of codec-specific knowledge, while not having anywhere near the actual functionality of the actual real C VideoRoom plugin. It is as if Janus is just a super low-level WebRTC library in the form of a framework, with an explicitly monolithic plugin doing everything.)

Re: Janus WebRTC Server

#37
Janus is amazing, very easy to use. I used to develop MCU/voice control Systems but unfortunately for large companies you really need a dedicated team to manage this Infrastructure. (scheduling, video/voice quality issues, among other things) good if you have the resources to do it

Re: Janus WebRTC Server

#38
post #36

Earlier quoted context omitted.

Janus itself doesn't make any assumptions about a specific use-case. All the functionality outside of the core RTC stuff is implemented with plugins. The default "Video Room" implementation is just a Lua script [0]. Mozilla has written their own SFU plugin (in Rust) [1] for game networking that powers Mozilla Hubs [2]. [0] https://github.com/meetecho/janus-gateway/blob/master/plugin... [1] https://github.com/mozilla/…

No: the vast majority of the VideoRoom functionality is written in C, and it is where all of the actually-hard-to-do video SFU stuff -- like quality control feedback and SVC support, particularly in an end to end encryption context with all the codec-specific workarounds--is commingled together with the notion of "rooms" (which is a really awkward and specific high-level abstraction with a schema that you have to abu…

It sounds like you have a use-case that you should just write your own plugin for. The out-of-the-box video room plugins aren't suitable.

> the vast majority of the VideoRoom functionality is written in C

It's still just a plugin that hooks the same callbacks and implements the same interfaces as any of the rest of them. Feel free to implement your own.

Re: Janus WebRTC Server

#39

Earlier quoted context omitted.

I do WebRTC on Edge/IoT devices (mostly MIPS/ARM devices running Linux). Customers are mostly teleoperations (robotics) and security cameras. Most customers run an MCU/SFU on a server, but then just a WebRTC client on the device. We do simulcast on the device to an SFU, and then distribute from there. Happy to answer questions here or directly. I don't want to be disrespectful and sell other stuff on this thread thou…

I'm concerned in targeting things like Janus etc to the MIPS architecture for streaming over WebRTC because typically I only see MIPS on legacy devices in my world. How does MIPS handle this stuff? PS: I know that Amazon has a product in the space and we're vetting AWS as our cloud provider due to it's diverse product offering. I've been looking at opensource solutions due to vendor lock-in but would love to hear if…

I wrote the Amazon offering! By design I implemented the same PeerConnection API, I really didn't want their to be vendor lock-in. I included a 'signaling client' in-tree, but you can do your own easily. The end goal is to get that AWS implementation running on 'true' embedded devices. We are going to switch to mbedtls soon, and we are working on getting it on FreeRTOS.

I also wrote Pion WebRTC, the Amazon offering is just a re-implementation of that in C. Just trying to decouple media pipelines and transport. I think WebRTC is a really great protocol, hopefully we can get software to match it :)

Re: Janus WebRTC Server

#40
post #36

Earlier quoted context omitted.

No: the vast majority of the VideoRoom functionality is written in C, and it is where all of the actually-hard-to-do video SFU stuff -- like quality control feedback and SVC support, particularly in an end to end encryption context with all the codec-specific workarounds--is commingled together with the notion of "rooms" (which is a really awkward and specific high-level abstraction with a schema that you have to abu…

It sounds like you have a use-case that you should just write your own plugin for. The out-of-the-box video room plugins aren't suitable. > the vast majority of the VideoRoom functionality is written in C It's still just a plugin that hooks the same callbacks and implements the same interfaces as any of the rest of them. Feel free to implement your own.

At that point why wouldn't I just use libwebrtc? The reason to get an off-the-shelf SFU is because all the hard work is in handling all the codec-specific workarounds, being able to handle keyframe request sharing, responding to RTCP bandwidth feedback to do SVC layer switching, and now doing all of this while most of the state is encrypted due to insertable streams... this is all hard stuff that people keep learning more about and for which the state of the art is a moving target due to browser changes.

I would expect 100% of applications doing anything at all with video to want all of that functionality, but only some small number to have a "room" concept that maps to the idea of the specific schema imposed by the VideoRoom plugin. It is thereby strange that all of that general video functionality is commingled together in a 8k line C file with all of the high-level room abstraction... the answer with Janus is always "write your own plugin", but either you are doing something so trivial that Janus doesn't seem to be doing anything but the lowest level WebRTC layer, or, as far as I can tell, you have to fork the VideoRoom plugin and then hope you can merge changes from upstream back into your plugin.

Am I wrong here? Like, I would love to find out I am wrong here ;P. (Which is why I was asking the OP about if their "custom solution" was a fork of VideoRoom: to see if they told me something I don't know.) But when I skim through that C file (or even the Lua file! though that demo very notably seems "incomplete" vs. the "real" C copy) I see tons of code referencing all of the codec-specific negotiation and stuff that I would explicitly be using Janus to get, so I can't not use or fork the VideoRoom plugin without losing the purpose of the platform as I would be reimplementing all of the hard parts myself (again, unless you are doing something so trivial--broadly speaking, something that doesn't involve video--that you frankly should be using libwebrtc or one of its various alternatives, such as Pion).

Post reply on HN