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

GB28181: Large latency when playing WebRTC. #4061

Open
lifeibin opened this issue May 20, 2024 · 3 comments
Open

GB28181: Large latency when playing WebRTC. #4061

lifeibin opened this issue May 20, 2024 · 3 comments
Assignees
Labels
GB28181 For GB28181. TransByAI Translated by AI/GPT.

Comments

@lifeibin
Copy link

lifeibin commented May 20, 2024

The user has downloaded version 5.0-r2 of the SRS (Simple Real-time Server) source code and compiled it locally. They have successfully connected to a national standard camera, and both the connection and playback are working normally. They have observed the performance of both FLV and WebRTC streaming. However, they are experiencing an issue with WebRTC latency, which is around 4 seconds. They are unsure if this is due to TCP and are confused because the expected latency, as per the documentation, should be less than 1 second. They are seeking an explanation for this discrepancy.
123456
The user is referring to the configuration file for SRS (Simple Real-time Server) named "push.gb28181.conf" and is indicating that they will provide the main content of the configuration settings next.
stream_caster {
enabled on;
caster gb28181;
output rtmp://127.0.0.1/live/[stream];
listen 9000;
# Deprecated config, moved to sip.candidate, see gb28181.conf
# @see https://ossrs.net/lts/zh-cn/docs/v5/doc/gb28181#config-candidate
host 172.24.9.59;
sip {
enabled on;
listen 5060;
serial 34020000002000000001;
realm 3402000000;
}
}

http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}

http_api {
enabled on;
listen 1985;
}
stats {
network 0;
}
rtc_server {
enabled on;
listen 8000; # UDP port
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
candidate 172.24.9.59;
}

vhost defaultVhost {
rtc {
enabled on;
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc
rtmp_to_rtc on;
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
rtc_to_rtmp on;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
hls {
enabled off;
}
}

TRANS_BY_GPT4

@winlinvip winlinvip changed the title 5.0版本的g28181,播放webrtc时延问题 Version 5.0 of the G28181 protocol, issues with latency when playing WebRTC. May 20, 2024
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label May 20, 2024
@lifeibin
Copy link
Author

lifeibin commented May 21, 2024

@winlinvip Concerning this matter, is the latency within expected parameters? If it is not, what steps can I take to address it?

TRANS_BY_GPT4

@winlinvip winlinvip changed the title Version 5.0 of the G28181 protocol, issues with latency when playing WebRTC. GB28181: Large latency when playing WebRTC. May 24, 2024
@winlinvip winlinvip self-assigned this May 24, 2024
@winlinvip winlinvip added the GB28181 For GB28181. label May 24, 2024
@winlinvip
Copy link
Member

winlinvip commented May 24, 2024

Generally speaking, issues like delays are not immediately apparent as to what the problem is. If you are unable to resolve it on your own, it is recommended to try out several open-source software solutions.

TRANS_BY_GPT4

@lifeibin
Copy link
Author

Generally speaking, issues like delays are not immediately apparent as to what the problem is. If you are unable to resolve it on your own, it is recommended to try out several open-source software solutions.

TRANS_BY_GPT4

Thank you, I query additional information to resolve it. I use the rtc version of srs-gb28181, the delay is within 1 second, perhaps the reason is the older version use udp, the 5.0 use tcp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GB28181 For GB28181. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants