Open Cyaim opened 2 years ago
The version is too old, try upgrading to the latest version.
TRANS_BY_GPT3
Should we directly pull the b0 or pull the 4.0 release code and recompile it in Docker? Can we merge h265?
TRANS_BY_GPT3
Tested and confirmed effective SRS/4.0.201
[2021-12-08 03:18:25.149][Trace][1][999t5o91] TCP: before dispose resource(HttpConn)(0x3ed2730), conns=26, zombies=0, ign=0, inz=0, ind=0 [2021-12-08 03:18:25.149][Trace][1][999t5o91] client finished. [2021-12-08 03:18:25.149][Trace][1][sa688i9c] TCP: clear zombies=1 resources, conns=26, removing=0, unsubs=0 [2021-12-08 03:18:25.149][Trace][1][999t5o91] TCP: disposing #0 resource(HttpConn)(0x3ed2730), conns=26, disposing=1, zombies=0 [2021-12-08 03:18:26.040][Trace][1][3b820sc4] HTTP #0 192.168.1.7:55451 POST http://127.0.0.1/rtc/v1/play/, content-length=4439 [2021-12-08 03:18:26.041][Trace][1][y766i61l] HTTP #0 192.168.1.7:55453 POST http://127.0.0.1/rtc/v1/play/, content-length=4439 [2021-12-08 03:18:26.041][Trace][1][22759gto] HTTP #0 192.168.1.7:55452 POST http://127.0.0.1/rtc/v1/play/, content-length=4439 [2021-12-08 03:18:26.042][Trace][1][92i5q1mu] HTTP #0 192.168.1.7:55454 POST http://127.0.0.1/rtc/v1/play/, content-length=4439 [2021-12-08 03:18:26.043][Warn][1][3b820sc4][0] RTC error code=4005 : RTC: http_hooks_on_play : on_play http://192.168.0.11:5000/api/v1/StreamServer/OnCallBack : http: on_play failed, client_id=3b820sc4, url=http://192.168.0.11:5000/api/v1/StreamServer/OnCallBack, request={"server_id":"vid-2010y25","action":"on_play","client_id":"3b820sc4","ip":"223.83.155.124","vhost":"defaultVhost","app":"live","stream":"ID0602181091342271250873","param":"","pageUrl":""}, response={"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":400,"traceId":"00-abbc1171bf78f7d02c615afa4fcfce06-86b008eed0272a73-00","errors":{"$.client_id":["The JSON value could not be converted to System.Nullable`1[System.Int32]. Path: $.client_id | LineNumber: 0 | BytePositionInLine: 68."]}}, status=400 : http: status 400 thread [1][3b820sc4]: do_serve_http() [src/app/srs_app_rtc_api.cpp:133][errno=0] thread [1][3b820sc4]: http_hooks_on_play() [src/app/srs_app_rtc_api.cpp:274][errno=0] thread [1][3b820sc4]: on_play() [src/app/srs_app_http_hooks.cpp:224][errno=0] thread [1][3b820sc4]: do_post() [src/app/srs_app_http_hooks.cpp:516][errno=0]
TRANS_BY_GPT3
The handling of RTC callback information seems to have occasional issues. The actual properties for Stream and App should be maintained. App:live Stream:ID0602181091342360960853
{"Action":"on_play","Client_Id":"754z4331","IP":"127.0.0.1","Vhost":"defaultVhost","App":"live/ID0602181091342360960853","Stream":"aEQJIgUB","Param":"?token=3LUOEAwOpObmRGS/oJoZ353NFB4hEGvnfFC+hXUEiYUy1rNTPZv2kzxoQGdreqUxQ2LAqH7jLi6daBoYz10ald9","Send_bytes":null,"Recv_bytes":null,"TcUrl":null,"PageUrl":"","Cwd":null,"File":null}
The actual properties should be: {"Action":"on_play","Client_Id":"ew5m380j","IP":"127.0.0.1","Vhost":"defaultVhost","App":"live","Stream":"ID0602181091342360960853","Param":"?token=IZOLadRRLwfqPw+Lgj8au8DYaeID20yhsMJdrXEr5NmAqKZPEr+7kLGNjE3xnlgiBLWIJqPcGA9rx6emCPhrQcPAOsd8sT6d","Send_bytes":null,"Recv_bytes":null,"TcUrl":null,"PageUrl":"","Cwd":null,"File":null}
TRANS_BY_GPT3
3LUOEAwOpObmRGS/oJoZ353NFB4hEGvnfFC+hXUEiYUy1rNTPZv2kzxoQGdreqUxQ2LAqH7jLi6daBoYz10ald9 Is this token for the publisher?
TRANS_BY_GPT3
webrtc://127.0.0.1/live/ID0602181091342271250873?token=IZOLadRRLwfqPw+Lgj8au8DYaeID20yhsMJdrXEr5NmAqKZPEr+7kLGNjE3xnlgiBLWIJqPcGA9rx6emCPhrQcPAOsd8sT6d
[2021-12-08 06:09:09.018][Warn][1][6831u6vd][0] RTC error code=3008 : RTC: http_hooks_on_play : on_play http://192.168.0.11:5000/api/v1/StreamServer/OnCallBack : http: on_play failed, client_id=6831u6vd, url=http://192.168.0.11:5000/api/v1/StreamServer/OnCallBack, request={"server_id":"vid-1h15295","action":"on_play","client_id":"6831u6vd","ip":"223.83.155.124","vhost":"defaultVhost","app":"live/ID0602181091342361170874","stream":"WhoXeDmxQxqDukIutEXI6FQ0psXdBSXQWDdTQ99dY","param":"?token=0emw+WhUdoKA8YyV9FPIGqa4dvOj/K0/5sIk2RqXrvTRVobZOHVcxm","pageUrl":""}, response=1, status=200 : http: response number code 1 thread [1][6831u6vd]: do_serve_http() [src/app/srs_app_rtc_api.cpp:133][errno=0] thread [1][6831u6vd]: http_hooks_on_play() [src/app/srs_app_rtc_api.cpp:274][errno=0] thread [1][6831u6vd]: on_play() [src/app/srs_app_http_hooks.cpp:224][errno=0] thread [1][6831u6vd]: do_post() [src/app/srs_app_http_hooks.cpp:536][errno=0] [2021-12-08 06:09:09.018][Trace][1][6831u6vd] TCP: before dispose resource(HttpConn)(0x26d1040), conns=27, zombies=1, ign=0, inz=0, ind=0 [2021-12-08 06:09:09.018][Trace][1][6831u6vd] client finished. [2021-12-08 06:09:09.018][Trace][1][78b5mj4p] TCP: clear zombies=2 resources, conns=27, removing=0, unsubs=0 [2021-12-08 06:09:09.018][Trace][1][6z448ah8] TCP: disposing #0 resource(HttpConn)(0x265b6b0), conns=27, disposing=2, zombies=0 [2021-12-08 06:09:09.018][Trace][1][6831u6vd] TCP: disposing #1 resource(HttpConn)(0x26d1040), conns=26, disposing=2, zombies=0 [2021-12-08 06:09:09.025][Trace][1][72290d45] HTTP #0 192.168.1.7:62069 POST http://127.0.0.1/rtc/v1/play/?token=0emw+WhUdoKA8YyV9FPIGqa4dvOj/K0/5sIk2RqXrvTRVobZOHVcxm/WhoXeDmxQxqDukIutEXI6FQ0psXdBSXQWDdTQ99dY, content-length=5958 [2021-12-08 06:09:09.027][Warn][1][72290d45][0] RTC error code=3008 : RTC: http_hooks_on_play : on_play http://192.168.0.11:5000/api/v1/StreamServer/OnCallBack : http: on_play failed, client_id=72290d45, url=http://192.168.0.11:5000/api/v1/StreamServer/OnCallBack, request={"server_id":"vid-1h15295","action":"on_play","client_id":"72290d45","ip":"223.83.155.124","vhost":"defaultVhost","app":"live/ID0602181091342361160873","stream":"WhoXeDmxQxqDukIutEXI6FQ0psXdBSXQWDdTQ99dY","param":"?token=0emw+WhUdoKA8YyV9FPIGqa4dvOj/K0/5sIk2RqXrvTRVobZOHVcxm","pageUrl":""}, response=1, status=200 : http: response number code 1 thread [1][72290d45]: do_serve_http() [src/app/srs_app_rtc_api.cpp:133][errno=0] thread [1][72290d45]: http_hooks_on_play() [src/app/srs_app_rtc_api.cpp:274][errno=0] thread [1][72290d45]: on_play() [src/app/srs_app_http_hooks.cpp:224][errno=0] thread [1][72290d45]: do_post() [src/app/srs_app_http_hooks.cpp:536][errno=0] [2021-12-08 06:09:09.027][Trace][1][72290d45] TCP: before dispose resource(HttpConn)(0x2ae1d50), conns=26, zombies=0, ign=0, inz=0, ind=0 [2021-12-08 06:09:09.027][Trace][1][72290d45] client finished. [2021-12-08 06:09:09.027][Trace][1][78b5mj4p] TCP: clear zombies=1 resources, conns=26, removing=0, unsubs=0 [2021-12-08 06:09:09.027][Trace][1][72290d45] TCP: disposing #0 resource(HttpConn)(0x2ae1d50), conns=26, disposing=1, zombies=0 [2021-12-08 06:09:09.036][Trace][1][2822684i] HTTP #0 192.168.1.7:62070 POST http://127.0.0.1/rtc/v1/play/?token=0emw+WhUdoKA8YyV9FPIGqa4dvOj/K0/5sIk2RqXrvTRVobZOHVcxm/WhoXeDmxQxqDukIutEXI6FQ0psXdBSXQWDdTQ99dY, content-length=5958 [2021-12-08 06:09:09.039][Warn][1][2822684i][0] RTC error code=3008 : RTC: http_hooks_on_play : on_play http://192.168.0.11:5000/api/v1/StreamServer/OnCallBack : http: on_play failed, client_id=2822684i, url=http://192.168.0.11:5000/api/v1/StreamServer/OnCallBack, request={"server_id":"vid-1h15295","action":"on_play","client_id":"2822684i","ip":"223.83.155.124","vhost":"defaultVhost","app":"live/ID0602181091342360960853","stream":"WhoXeDmxQxqDukIutEXI6FQ0psXdBSXQWDdTQ99dY","param":"?token=0emw+WhUdoKA8YyV9FPIGqa4dvOj/K0/5sIk2RqXrvTRVobZOHVcxm","pageUrl":""}, response=1, status=200 : http: response number code 1 thread [1][2822684i]: do_serve_http() [src/app/srs_app_rtc_api.cpp:133][errno=0] thread [1][2822684i]: http_hooks_on_play() [src/app/srs_app_rtc_api.cpp:274][errno=0] thread [1][2822684i]: on_play() [src/app/srs_app_http_hooks.cpp:224][errno=0]
The token generated by PKCS may contain slashes ("/"). The actual behavior of the streaming media service may mistakenly truncate the slashes ("/"), but the mainstream token generation method is PKCS...
TRANS_BY_GPT3
That is a compatibility issue with the format.
TRANS_BY_GPT3
Indeed
TRANS_BY_GPT3
This requires encoding the QueryString, a simple way to bypass it is to URL encode and give it to SRS.
A better approach is to encode the URL when SRS callback occurs, referring to the handling in JS or Go.
TRANS_BY_GPT3
Description
main config for srs.
@see full.conf for detail config.
listen 1936; max_connections 1000; srs_log_tank console; daemon on; http_api { enabled on; listen 1986;
crossdomain on;
} http_server { enabled on; listen 8080; dir ./objs/nginx/html; } stats { network 0; disk sda sdb xvda xvdb; }
rtc_server { enabled on;
Listen at udp://8000
} vhost defaultVhost { http_remux { enabled on; mount [vhost]/[app]/[stream].flv; hstrs on; }
}