Coder Social home page Coder Social logo

rsatom / janus-gateway-snap Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 9.0 122 KB

Helper repo for build Janus WebRTC Server on build.snapcraft.io and launchpad.net

Home Page: https://github.com/meetecho/janus-gateway

License: GNU General Public License v3.0

Shell 100.00%

janus-gateway-snap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

janus-gateway-snap's Issues

Target recording path is in protected folder...

When enabling recording in videoroom, Janus is not able to save the recording file. Janus log shows error:

janus-gateway.janus-gateway[2712]: [ERR] [record.c:janus_recorder_create_full:222] Target recording path '/var/snap/janus-gateway/common/share/recordings/<filename>.mjr' is in protected folder...
janus-gateway.janus-gateway[2712]: [ERR] [plugins/janus_videoroom.c:janus_videoroom_recorder_create:8811] Couldn't open a audio recording file for this publisher!

I tried giving 775 permission to the folder, but issue persists.

cd /var/snap/janus-gateway/common/share/
sudo chmod 775 recordings

On the web client, recording is enabled like this:

const message = {
    request: 'configure',
    record: true,
    filename: '/var/snap/janus-gateway/common/share/recordings/<filename>`,
};

videoRoomHandle.send({ message: message });

Am I doing this right?

p.s. Thanks for the snap. It makes building janus-gateway so much simpler.

Janus-gateway does not start on raspberrypi 4 Buster

Raspberrypi 4 Buster
Linux raspberrypi 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l GNU/Linux

ERROR
2021-12-15T15:56:30Z janus-gateway.janus-gateway[3045]: [ERR] [plugins/janus_streaming.c:janus_streaming_init:1602] Unable to acquire list of network devices/interfaces; some configurations may not work as expected... 1 (Operation not permitted)
2021-12-15T15:56:30Z janus-gateway.janus-gateway[3045]: [FATAL] [transports/janus_http.c:janus_http_init:795] Couldn't start webserver on port 8088...
2021-12-15T15:56:30Z janus-gateway.janus-gateway[3045]: [FATAL] [transports/janus_http.c:janus_http_init:843] Couldn't start secure webserver on port 8089...
2021-12-15T15:56:30Z janus-gateway.janus-gateway[3045]: [WARN] No HTTP/HTTPS server started, giving up...
2021-12-15T15:56:30Z janus-gateway.janus-gateway[3045]: [WARN] The 'janus.transport.http' plugin could not be initialized

What should I do with the network interface?

RTSP Stream: No video shows up but there is data flow on local LAN

Hi,
I am trying to run Janus gateway server on Jetson Nano with the camera attached to it and streaming it with "test-launch.c" from gst-rtsp-server. I am trying to view it on a webpage and using the streaming plugin of Janus and running the streaming demo. It shows there is a data flow from the camera to the demo page (on the host browser and a client browser in the same LAN network) but the video does not show up at all.

Also, I am running the instance on a private LAN so as per my understanding no internet connection or STUN/TURN server should be required at all. I have not made any changes to any file except for the streaming plugin jcfg file.

I am also attaching the Janus-gateway logs (which does show a warning saying "Failed to add remote candidate (added 0, expected 1)").

I have also attached the streaming demo page with console log and also streaming plugin jcfg file. Let me know if you need anymore information. Thanks a lot!
janus-gateway_logs

streaming_demo

streaming_jcfg

GStreamer

How to setup the following different parameters of JANUS-WebRTC-GATEWAY ?

Hi.

I would like to know how to configure the different parameters of JANUS-WebRTC-GATEWAY that installed using SNAP (sudo snap install janus-gateway) on Ubuntu ???

JANUS_SERVER_ENDPOINT=
JANUS_SERVER_ADMIN_ENDPOINT=
JANUS_ADMIN_SECRET=
JANUS_API_SECRET=
JANUS_VIDEO_ROOM_SECRET=

This is for setting up a project in the PHP Laravel Framework but I don’t see resources anywhere on the internet that can help me set up these various JANUS settings and connect them to my PHP web application which requires these Janus settings before working.

Where are these different parameters located on my Linux Server ???

Please let me know.

AES-GCM support

Is there any way via snap or your implementation to support AES-GCM?

Snipaste_2020-08-23_13-59-13

The plugin doesn't work textroom

web error: No such plugin 'janus.plugin.textroom'
logs:
Loading plugin 'libjanus_textroom.so'...
[WARN] Data channels support not compiled, disabling TextRoom plugin
[WARN] The 'janus.plugin.textroom' plugin could not be initialized

Cant edit config file?

I'm trying to disable cors to allow for any device to connect to my janus server. I've been editing the config file in /var/snap/janus-gateway/common/etc/janus.transport.http.jcfg but I'm not seeing my changes being reflected.

For example, as a basic test I'm trying to just change the port its listening on. In the general section of the transport.http config I'm changing:

general: {
    port = 8083
}

I then restart the snap but the port doesnt change:

  • snap restart janus-gateway
  • systemctl restart snap.janus-gateway.janus-gateway.service
  • Reboot entire server

I get the message saying "Restarted." Checking the logs however it still shows the default port 8088:

WebSockets server started (port 8188)...

I'm on a fresh install of Debian 10. Only thing I've configured on it was following the snapd instructions to install the janus-gateway snap. Am I doing something wrong?

There are references in the instructions to $SNAP and $SNAP_COMMON but both of those for me are blank, not sure if that has anything to do with it.

Installing new Janus plugin (SFU)

I'm setting up Janus on Redhat 8 and using snap seems to be the simplest way, but I wanted to add an SFU plugin into it (link)

Long story short I need to add libjanus_plugin_sfu.so and janus.plugin.sfu.cfg to the plugins and config folder respectively, but snap does not allow modifying the folders whatsoever.

Will you consider adding it to the snap package or provide me with the workaround for this?

janus-gateway 1.0.1 snap build

It seems that janus-gateway 1.0.1 was been released a while back already, is it possible to provide an updated build?

Is there any way that I can help? If I understand this correctly, it would require creating a branch with a specific name which AFAIK can not be done using a pull-request.

Way to enable only desired plugins?

This seems to enable all Janus plugins. How can I add configuration parameters to control what plugins to enable?

For example, when we compile manually, we do the following to enable only videoroom and streaming. Is there a way to do these via snap?

./configure --prefix=/opt/janus \
--enable-post-processing \
--disable-all-plugins \
--enable-plugin-videoroom \
--enable-plugin-streaming \
--disable-all-transports \
--enable-rest \
--enable-websockets \
--disable-all-handlers
make && make install && make configs

Thanks!

record not working

I made an attempt to write, but the directory is empty.

Ctreate room
{ "request": "create", "room": myroom, "admin_key": 'supersecret', "permanent": false, "max_publishers": 6, "bitrate": 256000, "fir_freq": 10, "videocodec": "vp8", "description": "test", "secret": "test", "record ": true, "rec_dir ": '/var/snap/janus-gateway/common/share/recordings', "is_private": true }

притормаживает видео

а с чем может быть связано, притормаживание видео? Тоесть фактиски как боевой инструмент использовать вообще не возможно даже если комната из 2 человек.

Adding LimitNOFILE=65536 for systemd

Is there any way via snap or your implementation to add the parameter LimitNOFILE=65536 to /etc/systemd/system/snap.janus-gateway.janus-gateway.service or is this built by snap automatically and can't be altered?

Couldn't start secure webserver on port 8089...

I have installed janus-getway via snap and enabled HTTPS in Janus config.
And after starting I found in logs next error message from Janus:
[FATAL] [transports/janus_http.c:janus_http_init:741] Couldn't start secure webserver on port 8089...
I've made sure the certificates path is right and no one doesn't use 8089 port.
I found the same problem here https://groups.google.com/forum/?nomobile=true#!topic/meetecho-janus/r1y_xZjxjF8
But I can't check libmicrohttpd was configured with SSL support or not. Perhaps, libmicrohttpd-dev should be installed as a dependency?

Multistream version

Hello,
is there any plan to support new janus multistream (1.x) version?

thank you!

"proper" way to add plugins?

From the logs I see that /opt/janus/lib/janus/plugins is the plugin folder, but that folder is 'read only'. Should I manually modify permissions on it so that I can copy a plugin into it? doesn't exist, I at a glance thought it was saying what I expected, which was /snap/janus-gateway/current/opt/janus/etc/janus/. So, is snap is creating a virtual directory...??? I feel like I'm missing something.

Or is there some other preferred method, like adding some second folder and pointing to it from config?

Or, I also see all the plugins listed in /var/snap/janus-gateway/common/etc/, which confuses me... Adding stuff there doesn't work, so it seems that while there's a copy there, that file isn't checked by Janus... Anyways, maybe I should just add it there and modify config to point there now?

[ERR] [record.c:janus_recorder_create_full:231] fopen error: 24

This didn't happen when I installed Janus "the default way". But after using this snap, I encountered an error fopen error: 24 and Janus restarted during a stress test when there were about 120~130 publishers. Recording was enabled.

Is this the infamous "Too many open files" error mentioned in readme?

...
[ERR] [record.c:janus_recorder_create_full:231] fopen error: 24
[ERR] [plugins/janus_videoroom.c:janus_videoroom_recorder_create:8392] Couldn't open a video recording file for this publisher!
[ERR] [record.c:janus_recorder_create_full:231] fopen error: 24
[ERR] [plugins/janus_videoroom.c:janus_videoroom_recorder_create:8392] Couldn't open a data recording file for this publisher!
Logger plugins folder: /opt/janus/lib/janus/loggers
[WARN] Couldn't access logger plugins folder...
--------------------------------------------------- Starting Meetecho Janus (WebRTC Server) v1.2.0
---------------------------------------------------
Checking command line arguments...
Debug/log level is 4
...

The system already has the max limit configured in /etc/security/limits.conf:

*      soft     nofile     1048576
*      hard     nofile     1048576

Do I also need to set the limit for snap.janus-gateway.janus-gateway.service?

p.s. I could've run another test to confirm this, but since stress tests cost $$, I'd like to get a confirmation before another run. Thanks!

how to start?

After
sudo snap install janus-gateway
and then adding to my $PATH /snap/bin

KAJO:~$ $PATH
bash: /home/ft/.yarn/bin:/home/ft/.config/yarn/global/node_modules/.bin:/home/ft/.nvm/versions/node/v8.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/ft/.yarn/bin: No such file or directory

I open a new terminal, and the only auto-complete available for
janu
is
janus-gateway.janus-pp-rec

which janus-gateway.janus-pp-rec 
/snap/bin/janus-gateway.janus-pp-rec

Not sure what janus-pp-rec is (looks like recording utilities for Janus something?), but not sure what's going on.

Does this package install it as a daemon instead perhaps? What's the proper way to test the demos after installing this way?

Data channel support missing from stable?

Hi,
Thanks for this snap. I've been using it on edge, but wanted to switch to latest/stable for more reliability - however, I'm running into this issue when trying to use textroom on stable:

[WARN] Data channels support not compiled, disabling TextRoom plugin

Is this an intentional build difference between edge and stable?

Need "Data Channels Support"

Hello friend,
I'd very much appreciate if you could quickly add "Data Channels Support" compiled in. I came a long way through some server configuration and while nearing the end, top level server software complained about this issue leaving me in a dead-end.
Thank you.

SIP Plugin TLS

Hi, wondered if anyone has managed to get TLS working via the SIP Plugin.
UDP works great.

My JSEP is

authuser: "xxxxxxxxxxxx"
display_name: "xxxxxxxxxxxx"
incoming_header_prefixes: ['Alert-Info']
request: "register"
secret: "xxxxxxxxxxxxxx"
sips: true
token_auth_secret: "xxxxxxxxxxxxxx"
username: "sip:xxxxxxxxxx@xxxxxxxxxxxxxxxxxxxxxxxxxx:5061;transport=tls"

I just get nothing from Sofia and a 503 in the Janus logs

[nua_r_register]: 503 Service Unavailable

Certificate error with letsencrypt

When using letsencrypt pem files I got the following error:

2021-06-09T17:18:54Z janus-gateway.janus-gateway[17825]: TURN REST API backend: (disabled)
2021-06-09T17:18:54Z janus-gateway.janus-gateway[17825]: Crypto: OpenSSL >= 1.1.0
2021-06-09T17:18:54Z janus-gateway.janus-gateway[17825]: [WARN] The libsrtp installation does not support AES-GCM profiles
2021-06-09T17:18:54Z janus-gateway.janus-gateway[17825]: [FATAL] [dtls.c:janus_dtls_load_keys:331] Error opening certificate file
2021-06-09T17:18:54Z systemd[1]: snap.janus-gateway.janus-gateway.service: Main process exited, code=exited, status=1/FAILURE
2021-06-09T17:18:54Z systemd[1]: snap.janus-gateway.janus-gateway.service: Failed with result 'exit-code'.
2021-06-09T17:18:54Z systemd[1]: snap.janus-gateway.janus-gateway.service: Service hold-off time over, scheduling restart.
2021-06-09T17:18:54Z systemd[1]: snap.janus-gateway.janus-gateway.service: Scheduled restart job, restart counter is at 5.
2021-06-09T17:18:54Z systemd[1]: Stopped Service for snap application janus-gateway.janus-gateway.
2021-06-09T17:18:54Z systemd[1]: snap.janus-gateway.janus-gateway.service: Start request repeated too quickly.
2021-06-09T17:18:54Z systemd[1]: snap.janus-gateway.janus-gateway.service: Failed with result 'exit-code'.
2021-06-09T17:18:54Z systemd[1]: Failed to start Service for snap application janus-gateway.janus-gateway.

The janus.cfg file is as follows:
certificates: {
cert_pem = "/etc/letsencrypt/live/{mywebsite}/fullchain.pem"
cert_key = "/etc/letsencrypt/live/{mywebsite}/privkey.pem"
#cert_pwd = "secretpassphrase"
#dtls_accept_selfsigned = false
#dtls_ciphers = "your-desired-openssl-ciphers"
#rsa_private_key = false
}

I double checked, the .pem files are there and there is no problem with permissions

Files in "demos" folder unwritable

I used this snap to build the janus-gateway, and am trying to activate the built-in demo pages according to this and this guide which states I'd need to modify some js files in the demos folder, e.g. "admin.js" if I want to activate the admin monitoring page.

However, it doesn't look like any file in /snap/janus-gateway/current/opt/janus/share/janus/demos is writable (even with sudo).

image

The index page works (https://<mydomain>/index.html), but I wasn't able to get the "admin" demo working (https://<mydomain>/admin.html). Not sure if that's the reason.

Any advice?

Snap installation configs -limits

So I have been using, this in production and it has been working like a charm and making installation very easy to handle and manage.

I have noted that one can't enable the installation to use or enable events emissions, I did do the recommended configs but the server does not emit events, as compared to installing using native installations.

Also pointing the Janus to log to a custom log file, Janus failed or ignores or may cause errors to the app /server itself.

Is there a fix for this?

What's the path to the janus-gateway log file?

Using sudo snap logs janus-gateway -f can see the logs of janus-gateway. I want to send those logs to somewhere else, so a path to the log file is needed.

I could only find janus-gateway related logs in /var/log/syslog which has other unrelated logs as well. Is there a dedicated file that stores only the janus-gateway logs?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.