Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
646 views
in Technique[技术] by (71.8m points)

javascript - GPU-accelerated streaming using WebRTC not connecting [ConnectionRefusedError: [Errno 111] Connection refused]

I am trying to use NVENC to encode and take that output, stream it to another server using WebRTC and then decode it there.

I tried to follow this GPU-accelerated streaming using WebRTC project to get started.

I would like to run this locally without using Kubernetes Engine on Google Cloud as given here, but Docker is giving me a lot of trouble.

This is the error thrown when running the command python3 main.py in selkies-vdi-cgc-docsselkies-vdi-cgc-docsimagesgst-webrtc-app :

python3 main.py main.py:187: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead logging.warn(args) WARNING:root:Namespace(app_auto_init='true', app_ready_file='/var/run/appconfig/appready', coturn_auth_header_name='x-auth-user', coturn_web_uri='http://localhost:8081', coturn_web_username='DESKTOP-OAR3JEG', debug=False, enable_audio='true', enable_clipboard='true', framerate='30', json_config='/var/run/appconfig/streaming_args.json', metrics_port='8000', server='ws://127.0.0.1:8080', uinput_js_socket='', uinput_mouse_socket='') Traceback (most recent call last): File "main.py", line 223, in stun_server, turn_server = fetch_coturn( File "main.py", line 56, in fetch_coturn conn.request("GET", parsed_uri.path, headers=auth_headers) File "/usr/lib/python3.8/http/client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output self.send(msg) File "/usr/lib/python3.8/http/client.py", line 950, in send self.connect() File "/usr/lib/python3.8/http/client.py", line 921, in connect self.sock = self._create_connection( File "/usr/lib/python3.8/socket.py", line 808, in create_connection raise err File "/usr/lib/python3.8/socket.py", line 796, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

This is for a screen capture project so it all have to be real-time with very low latency as possible. So any help to get me started on this would be just great!

I am not even sure I running the correct python script.

Excuse me if I am missing something.

Thanks!

question from:https://stackoverflow.com/questions/65869964/gpu-accelerated-streaming-using-webrtc-not-connecting-connectionrefusederror

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Your log is not so clear but for screen sharing you can use this project https://github.com/muaz-khan/RTCMultiConnection


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...