srs WebRTC: 推RTC拉RTMP,VLC首屏很久2分钟左右

twh00eeo  于 2022-10-27  发布在  其他
关注(0)|答案(1)|浏览(244)

Please description your issue here(描述你遇到了什么问题)
docker运行的, webrtc推,vlc拉,一直加载中要很久,可能要2分钟,才会出来。正常么?

  1. SRS Version(版本): 4.0.252
  2. SRS Log(日志):
xxxxxxxxxxxx
  1. SRS Config(配置):

# docker config for srs.

# @see full.conf for detail config.

listen              1935;
max_connections     1000;

# For docker, please use docker logs to manage the logs of SRS.

# See https://docs.docker.com/config/containers/logging/

srs_log_tank        console;
daemon              off;
http_api {
    enabled         on;
    listen          1985;
}
http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}
rtc_server {
    enabled on;
    listen 8000;
    # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
    candidate $CANDIDATE;
}
vhost __defaultVhost__ {
    hls {
        enabled         on;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
 http_hooks { 
        enabled          on;
        on_connect       http://***:5000/api/StreamingApi/on_connect;
        #on_close       http://***:5000/api/StreamingApi/on_close;
        on_publish       http://***:5000/api/StreamingApi/on_publish;
        #on_unpublish     http://***:5000/api/StreamingApi/on_unpublish;
        #on_play          http://***:5000/api/StreamingApi/on_play;        
       #on_stop          http://***:5000/api/StreamingApi/on_stop;                                 
           }
    rtc {
        enabled     on;
        # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc
        rtmp_to_rtc on;
        # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp
        rtc_to_rtmp on;
    }
}

Replay(重现)

Please describe how to replay the bug? (重现Bug的步骤)

  1. xxxxxx
  2. xxxxxx
  3. xxxxxx

Expect(期望行为)

Please describe your expectation(描述你期望发生的事情)

ia2d9nvy

ia2d9nvy1#

WebRTC本来就不是给直播设计的,所以用WebRTC做直播或转成直播协议,问题会很多。

不过,应该是有优化的空间。

相关问题