Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing gstreamer plugins nice, webrtc, dtls, ... #26

Closed
elgalu opened this issue May 3, 2023 · 11 comments
Closed

Missing gstreamer plugins nice, webrtc, dtls, ... #26

elgalu opened this issue May 3, 2023 · 11 comments

Comments

@elgalu
Copy link

elgalu commented May 3, 2023

Hi, thanks a lot for this repo, it's been extremely useful!

I've customized the container considerable and for some reason I get an error after running selkies-gstreamer --addr="127.0.0.1" --port="8080"

Traceback (most recent call last):
  File "/opt/conda/bin/selkies-gstreamer", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.10/site-packages/selkies_gstreamer/__main__.py", line 527, in main
    app = GSTWebRTCApp(stun_servers, turn_servers, enable_audio, audio_channels, curr_fps, args.encoder, curr_video_bitrate, curr_audio_bitrate)
  File "/opt/conda/lib/python3.10/site-packages/selkies_gstreamer/gstwebrtc_app.py", line 83, in __init__
    self.check_plugins()
  File "/opt/conda/lib/python3.10/site-packages/selkies_gstreamer/gstwebrtc_app.py", line 654, in check_plugins
    raise GSTWebRTCAppError('Missing gstreamer plugins:', missing)
gstwebrtc_app.GSTWebRTCAppError: ('Missing gstreamer plugins:', ['nice', 'webrtc', 'dtls', 'srtp', 'rtp', 'sctp', 'rtpmanager', 'ximagesrc', 'nvcodec'])

The plugins seem to be there, any tip on what to look at I would appreciate.

ll /opt/gstreamer/lib/x86_64-linux-gnu/libgstwebrtc-1.0.so
ll /opt/gstreamer/lib/x86_64-linux-gnu/libgstwebrtc-1.0.so.0
ll /opt/gstreamer/lib/x86_64-linux-gnu/libgstwebrtc-1.0.so.0.2005.0
etc...
@elgalu elgalu changed the title Missinggstreamer plugins nice, webrtc, dtls, ... Missing gstreamer plugins nice, webrtc, dtls, ... May 3, 2023
@ehfd
Copy link
Member

ehfd commented May 3, 2023

@danisla any clues?

@elgalu
Copy link
Author

elgalu commented May 3, 2023

Perhaps related:

WARNING:root:Namespace(json_config='/tmp/selkies_config.json', addr='127.0.0.1', port='8080', enable_basic_auth='true',
basic_auth_user='lgallucci', basic_auth_password='****', web_root='/opt/gst-web', coturn_web_uri='',
coturn_web_username='selkies-0b71d3bd1522', coturn_auth_header_name='x-auth-user', rtc_config_json='/tmp/rtc.json',
turn_shared_secret='', turn_username='', turn_password='', turn_host='', turn_port='', turn_protocol='udp',
turn_tls='false', uinput_mouse_socket='', uinput_js_socket='', enable_audio='true', audio_channels='2',
enable_clipboard='true', app_auto_init='true', app_ready_file='/var/run/appconfig/appready', framerate='30',
video_bitrate='2000', audio_bitrate='64000', encoder='nvh264enc', enable_resize='false', enable_cursors='true',
debug_cursors='false', cursor_size='24', metrics_port='8000', debug=False)

@ehfd
Copy link
Member

ehfd commented May 3, 2023

@elgalu Need all the logs. And which GStreamer did you use?

@ehfd
Copy link
Member

ehfd commented May 3, 2023

@elgalu Oh, and thank you for the sponsorship. I am quite busy so the repository is in maintenance mode, thus I regret not being able to be more active but I really appreciate it. I will add more backlogs.

@elgalu
Copy link
Author

elgalu commented May 5, 2023

Hi, thanks again:) here is the full output of GST_DEBUG=7 selkies-gstreamer --addr="0.0.0.0" --port="6080" https://gist.githubusercontent.com/elgalu/dc6e52d98e6effcc66c4df363bab9bbb/raw/91265f25082f94b2d2fd94a2ed66b0d5524406e5/selkies-gstreamer.sh

Now I switched from WEBRTC_ENCODER="nvh264enc" to "x264enc" so nvcodec is no longer in the list of missing plugins:

gstwebrtc_app.GSTWebRTCAppError: ('Missing gstreamer plugins:', 
['nice', 'webrtc', 'dtls', 'srtp', 'rtp', 'sctp', 'rtpmanager', 'ximagesrc'])

original posted error:

gstwebrtc_app.GSTWebRTCAppError: ('Missing gstreamer plugins:', 
['nice', 'webrtc', 'dtls', 'srtp', 'rtp', 'sctp', 'rtpmanager', 'ximagesrc', 'nvcodec'])

@ehfd
Copy link
Member

ehfd commented May 5, 2023

Just to confirm, did you install all the apt dependencies?

@elgalu
Copy link
Author

elgalu commented May 5, 2023

Yes, all apt dependencies are installed. GStreamer: SELKIES_VERSION="1.3.7". Perhaps the introduction of conda messed up the plugins search paths. We'll use xpra for now. I'll re-open if I can create a reproducible public container some day. Thanks!

@elgalu elgalu closed this as completed May 5, 2023
@ehfd
Copy link
Member

ehfd commented May 6, 2023

Yes, all apt dependencies are installed. GStreamer: SELKIES_VERSION="1.3.7". Perhaps the introduction of conda messed up the plugins search paths. We'll use xpra for now. I'll re-open if I can create a reproducible public container some day. Thanks!

Ah, wait. Conda. You need to install all the dependencies in Conda.

@ehfd
Copy link
Member

ehfd commented May 6, 2023

Search in conda-forge all the dependencies including Cuda and install everything.

@elgalu
Copy link
Author

elgalu commented May 6, 2023

Cool! so I installed a few gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-python gst-libav webrtcvad and now the list of missing plugins is reduced to 3: 'Missing gstreamer plugins:', ['nice', 'webrtc', 'srtp']

@ehfd
Copy link
Member

ehfd commented May 7, 2023

sudo apt-get update && sudo apt-get install --no-install-recommends -y adwaita-icon-theme-full build-essential python3-pip python3-dev python3-gi python3-setuptools python3-wheel tzdata sudo udev xclip x11-utils xdotool wmctrl jq gdebi-core x11-xserver-utils xserver-xorg-core libopus0 libgdk-pixbuf2.0-0 libsrtp2-1 libxdamage1 libxml2-dev libwebrtc-audio-processing1 libcairo-gobject2 pulseaudio libpulse0 libpangocairo-1.0-0 libgirepository1.0-dev libjpeg-dev libvpx-dev zlib1g-dev x264

This was the long list of dependencies, where I believe you might want to find or build 'nice', 'webrtc', 'srtp' manually on Conda. An alternative for apt's libwebrtc-audio-processing1, libsrtp2-1, and gir1.2-nice-0.1 or libnice10 is needed. I see that there is a separate package gstreamer1.0-nice in apt.

I think: pylibsrtp provides srtp.

https://webrtc.googlesource.com/src
https://gitlab.freedesktop.org/libnice/libnice

https://developer.ridgerun.com/wiki/index.php/GStreamer_WebRTC_Wrapper/Getting_the_Code/Building_and_Installation_Guide
https://gitlab.freedesktop.org/libnice/libnice/-/issues/112
https://webrtcmagazine.wordpress.com/tag/libnice/

This is pretty much uncharted territory, and I would really appreciate if you could test things. You could ask on #gstreamer at oftc.org IRC or #_oftc_#gstreamer:matrix.org on Matrix for help from GStreamer devs.

Discussion continues on issue selkies-project/selkies-gstreamer#63.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants