ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.74k stars 5.28k forks source link

WebRTC for Live Streaming error report "now only support BUNDLE, group policy=" #3940

Open linju123455 opened 5 months ago

linju123455 commented 5 months ago

Describe the bug I attempted to implement RTMP to WebRTC conversion following the instructions provided on the OSSRS (Open Source Streaming Realtime Server) website. However, I encountered an error when verifying the remote session description protocol (SDP). The error message indicated a server error with code 5018, which corresponds to an SDP negotiation failure. The specific issue mentioned that the remote SDP check failed because it currently only supports the BUNDLE group policy. I am using the Chrome browser to play the WebRTC stream, and the player and the SRS server are not hosted on the same machine but are located within the same local network.

Version SRS 5.0Release

To Reproduce Steps to reproduce the behavior: 1../objs/srs -c conf/rtmp2rtc.conf

  1. ffmpeg -re -i ./doc/source.flv -c copy -f flv rtmp://localhost/live/livestream
  2. Chrome open "http://x.x.x.x:1985/rtc/v1/whep/?app=live&stream=livestream" (x.x.x.x is my SRS server ip)
  3. [2024-01-31 15:58:32.245][INFO][30155][5uo5683s] HTTP #0 10.1.40.89:14549 GET http://10.1.40.164:1985/rtc/v1/whep/?app=live&stream=livestream, content-length=-1 [2024-01-31 15:58:32.247][INFO][30155][5uo5683s] RTC whip play /live/livestream, clientip=10.1.40.89, app=live, stream=livestream, offer=0B, eip=, codec=, srtp=, dtls=, ufrag=, pwd=, param=app=live&stream=livestream [2024-01-31 15:58:32.249][INFO][30155][5uo5683s] TCP: before dispose resource(HttpConn)(0x6070000477c0), conns=2, zombies=0, ign=0, inz=0, ind=0 [2024-01-31 15:58:32.249][ERROR][30155][5uo5683s][11] serve error code=5018(RtcSdpNegotiate)(RTC do SDP negotiate failed) : process request=0 : cors serve : serve http : serve : serve : remote sdp check failed : now only support BUNDLE, group policy= thread [30155][5uo5683s]: process_requests() [./src/app/srs_app_http_conn.cpp:209][errno=11] thread [30155][5uo5683s]: process_request() [./src/app/srs_app_http_conn.cpp:236][errno=11] thread [30155][5uo5683s]: serve_http() [./src/protocol/srs_protocol_http_stack.cpp:768][errno=11] thread [30155][5uo5683s]: serve_http() [./src/app/srs_app_rtc_api.cpp:648][errno=11] thread [30155][5uo5683s]: do_serve_http() [./src/app/srs_app_rtc_api.cpp:752][errno=11] thread [30155][5uo5683s]: serve_http() [./src/app/srs_app_rtc_api.cpp:198][errno=11] thread [30155][5uo5683s]: check_remote_sdp() [./src/app/srs_app_rtc_api.cpp:273][errno=11](Resource temporarily unavailable)

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

TRANS_BY_GPT4

linju123455 commented 5 months ago

Despite the document being well-composed, I regret to inform you that I am still uncertain about the location of the issue (expressing distress).

TRANS_BY_GPT4

winlinvip commented 3 months ago

First of all, you should provide the entire log for the session, not just one or a few lines, or a partial part of the logs. This way, you can filter the log for the session by grepping the session ID 5uo5683s.

Second, this issue is normally caused by an empty HTTP body, meaning the HTTP request is empty, so SRS cannot parse the boundary ID from it. Furthermore, the version you are using does not display the issue correctly in the logs. Therefore, you can upgrade to the latest version, and the logs should then clearly address this issue.