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

Unable to stream via WHIP + OBS #111

Closed
kaitlynia opened this issue Mar 30, 2024 · 1 comment · Fixed by #113
Closed

Unable to stream via WHIP + OBS #111

kaitlynia opened this issue Mar 30, 2024 · 1 comment · Fixed by #113
Labels
bug Something isn't working

Comments

@kaitlynia
Copy link

First of all, thank you so much for implementing a media server in Rust that supports WebRTC! Unfortunately, I'm having trouble getting it working.

v0.12.5, on Ubuntu 22.04.4 LTS, built using the GitHub release tag, Rust stable. Here is my config file:

[authsecret]
key = "KEY"
password = "PASSWORD"
##########################
# WebRTC configurations  #
##########################
[webrtc]
enabled = true
port = 8083
[webrtc.auth]
pull_enabled = false
push_enabled = true
algorithm = "simple"

I am attempting to stream via WHIP in OBS with the following URL:

http://example.com:8083/whip?app=live&stream=stream&token=PASSWORD

Here is the log:

[2024-03-30T03:29:13Z INFO  xwebrtc::webrtc] WebRTC server listening on tcp://0.0.0.0:8083
[2024-03-30T03:29:13Z INFO  xiu::api] Http api server listening on http://0.0.0.0:8000
[2024-03-30T03:29:16Z INFO  xwebrtc::session] 1:whip,2:live,3:stream
[2024-03-30T03:29:16Z INFO  streamhub] event data: {"Publish":{"identifier":{"webrtc":{"app_name":"live","stream_name":"stream"}},"info":{"id":"1711769356","pub_type":"PushWebRTC","notify_info":{"request_url":"","remote_addr":""}}}}
[2024-03-30T03:29:16Z INFO  streamhub] transceiver run success, idetifier: WebRTC - app_name: live, stream_name: stream
[2024-03-30T03:29:16Z INFO  webrtc::peer_connection] signaling state changed to have-remote-offer
[2024-03-30T03:29:16Z INFO  webrtc_ice::mdns] mDNS is using 224.0.0.251:5353 as dest_addr
[2024-03-30T03:29:16Z INFO  webrtc_mdns::conn] Looping and listening Ok(224.0.0.251:5353)
[2024-03-30T03:29:16Z INFO  webrtc::peer_connection] signaling state changed to stable
[2024-03-30T03:29:16Z INFO  webrtc_ice::agent::agent_internal] [controlled]: Setting new connection state: Checking
[2024-03-30T03:29:16Z WARN  webrtc_ice::agent::agent_gather] [controlled]: could not listen udp fe80::216:3eff:fea6:cb3b: io error: Invalid argument (os error 22)
[2024-03-30T03:29:16Z WARN  webrtc_ice::agent::agent_gather] [controlled]: could not listen udp fe80::42:4fff:fee5:5164: io error: Invalid argument (os error 22)
[2024-03-30T03:29:16Z INFO  webrtc::peer_connection] ICE connection state changed: checking
[2024-03-30T03:29:16Z INFO  xwebrtc::whip] Connection State has changed checking
[2024-03-30T03:29:21Z WARN  webrtc_ice::agent::agent_gather] [controlled]: could not get server reflexive address udp6 stun:stun.l.google.com:19302: deadline has elapsed
[2024-03-30T03:29:21Z INFO  webrtc_ice::agent::agent_internal] [controlled]: Setting new connection state: Connected
[2024-03-30T03:29:21Z INFO  webrtc::peer_connection] ICE connection state changed: connected
[2024-03-30T03:29:21Z INFO  xwebrtc::whip] Connection State has changed connected
[2024-03-30T03:29:21Z INFO  xwebrtc::whip] Ctrl+C the remote client to stop the demo
[2024-03-30T03:29:22Z INFO  webrtc::peer_connection] peer connection state changed: failed
[2024-03-30T03:29:22Z INFO  xwebrtc::whip] Peer Connection State has changed: failed
Peer Connection has gone to failed exiting: Done forwarding
[2024-03-30T03:29:22Z WARN  webrtc::peer_connection::peer_connection_internal] Failed to start manager dtls: Alert is Fatal or Close Notify
[2024-03-30T03:29:22Z WARN  webrtc::rtp_transceiver::rtp_receiver] RTPReceiver Receive failed the DTLS transport has not started yet
[2024-03-30T03:29:22Z WARN  webrtc::rtp_transceiver::rtp_receiver] RTPReceiver Receive failed the DTLS transport has not started yet
[2024-03-30T03:29:22Z WARN  webrtc::peer_connection::peer_connection_internal] undeclared_media_processor failed to open SrtcpSession
[2024-03-30T03:29:22Z WARN  webrtc::peer_connection::peer_connection_internal] undeclared_media_processor failed to open SrtpSession
[2024-03-30T03:29:22Z INFO  xwebrtc::session] 1:whip,2:live,3:stream
[2024-03-30T03:29:22Z WARN  webrtc_ice::agent::agent_internal] [controlled]: Failed to close candidate udp4 host 192.168.56.1:60862: the agent is closed
[2024-03-30T03:29:22Z WARN  webrtc_ice::agent::agent_internal] [controlled]: Failed to close candidate udp4 host 192.168.1.3:60862: the agent is closed
[2024-03-30T03:29:22Z WARN  webrtc_ice::agent::agent_internal] [controlled]: Failed to close candidate udp4 prflx 73.109.191.6:60862 related :0: the agent is closed
[2024-03-30T03:29:22Z INFO  webrtc_ice::agent::agent_internal] [controlled]: Setting new connection state: Closed
[2024-03-30T03:29:22Z INFO  webrtc::peer_connection] peer connection state changed: closed
[2024-03-30T03:29:22Z INFO  xwebrtc::whip] Peer Connection State has changed: closed
[2024-03-30T03:29:22Z INFO  xwebrtc::session] close peer connection successfully.
[2024-03-30T03:29:22Z INFO  webrtc::peer_connection] ICE connection state changed: closed
[2024-03-30T03:29:22Z INFO  xwebrtc::whip] Connection State has changed closed
[2024-03-30T03:29:22Z INFO  webrtc_mdns::conn] Closing server connection
[2024-03-30T03:29:22Z INFO  streamhub] event data: {"UnPublish":{"identifier":{"webrtc":{"app_name":"live","stream_name":"stream"}},"info":{"id":"1711769362","pub_type":"PushWebRTC","notify_info":{"request_url":"","remote_addr":""}}}}
[2024-03-30T03:29:22Z INFO  streamhub] unpublish remove stream, stream identifier: WebRTC - app_name: live, stream_name: stream
[2024-03-30T03:29:22Z INFO  streamhub::statistics] avstatistics shutting down

Any help with this is appreciated! :)

@harlanc
Copy link
Owner

harlanc commented Apr 2, 2024

Hi @kaitlynia

I have already attempted to fix this issue in my environment and release a new version. You can try again, and if you encounter any problems, please let me know.

@harlanc harlanc added the bug Something isn't working label Apr 3, 2024
harlanc added a commit that referenced this issue Apr 3, 2024
@harlanc harlanc linked a pull request Apr 3, 2024 that will close this issue
harlanc added a commit that referenced this issue Apr 3, 2024
fix two bugs of xwebrtc library #111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants