Note: Please read FAQ before file an issue, see #2716
Description
推流端使用srt,拉流端使用rtmp,延迟一直在1.5s左右,但是推流端和拉流端均使用rtmp时,延迟在700ms左右,通过打印日志发现:
srs接受到srt连接至转换为rtmp的过程耗时有700ms左右,不知是否有优化空间。
- SRS Version: 4.0
- SRS Log:
1510037 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srt connect construct streamid:live/9999_884002,m=publish, mode:2, subpath:live/9999_884002,m=publish, vhost:default_host
1510038 [2023-01-31 17:05:01.538][Trace][82959][2c985289] new srt connection streamid:live/9999_884002,m=publish, fd:764895394, vhost:default_host
1510039 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srto SRTO_LATENCY=300
1510040 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srto SRTO_PEERLATENCY=300
1510041 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srto SRTO_RCVLATENCY=300
1510042 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srto SRTO_SNDBUF=12058624
1510043 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srto SRTO_RCVBUF=12058624
1510044 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srto SRTO_MAXBW=1000000000
1510045 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srt mix_correct is enable.
1510046 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srt h264 sei filter is enable.
1510047 [2023-01-31 17:05:01.538][Trace][82959][2c985289] srt_handle add new pusher streamid:live/9999_884002,m=publish, subpath:live/9999_884002,m=publish
1510048 [2023-01-31 17:05:01.538][Trace][82959][2c985289] new conn added fd:764895394, event:0x00000009
1510049 [2023-01-31 17:05:02.302][Trace][82959][2c985289] new rtmp client for srt upstream, key_path:live/9999_884002,m=publish
1510050 [2023-01-31 17:05:02.302][Trace][82959][2c985289] rtmp client construct url:rtmp://127.0.0.1:9302/live/9999_884002,m=publish - SRS Config:
srt_server {
enabled on;
listen 9311;
maxbw 1000000000;
connect_timeout 4000;
peerlatency 300;
recvlatency 300;
#passphrase "12345678901";
}
1条答案
按热度按时间xn1cxnb41#
请测试下SRS 5.0版本的数据。
请将SRT转RTMP,换成SRT转RTC,减少播放器延迟的影响,对比下SRT2RTC,和RTMP2RTC的延迟。
请提供完整的配置,对比截图。否则信息不全,会删除这个Issue。