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: Segmentation fault (core dumped) #1855

Closed
21877575 opened this issue Jul 16, 2020 · 7 comments
Closed

GB28181: Segmentation fault (core dumped) #1855

21877575 opened this issue Jul 16, 2020 · 7 comments
Assignees
Labels
GB28181 For GB28181. TransByAI Translated by AI/GPT.
Milestone

Comments

@21877575
Copy link

21877575 commented Jul 16, 2020

Description'

Please ensure that the markdown structure is maintained.

SRS service error, segmentation fault (core dumped)'

Please ensure that the markdown structure is maintained.

  1. SRS version: 4.0
  2. The log for SRS is as follows:

Please ensure that the markdown structure is maintained.
image

  1. The configuration for SRS is as follows:

Please ensure that the markdown structure is maintained.

push gb28181 stream to SRS.

listen 1935;
max_connections 1000;
daemon off;
#srs_log_tank console;
srs_log_level trace;
srs_log_tank file;
srs_log_file ./objs/srs.log;

http_api {
enabled on;
listen 1985;
}

stats {
network 0;
}

stream_caster {
enabled on;
caster gb28181;

Forward the stream to the rtmp server address and port

Please ensure that the markdown structure is maintained.
# TODO: https://github.com/ossrs/srs/pull/1679/files#r400875104

[stream] is the VideoChannelCodecID for sip (Video Channel Encoding ID for SIP)

The automatically created channel [stream] is 'chid[ssrc]' where [ssrc] is the RTP SSRC

[ssrc] is the SSRC in RTP

Please ensure that the markdown structure is maintained.
output rtmp://13.32.203.100:1935/live/[stream];

Multiplexing port for receiving RTP streams from the device end

Please ensure that the markdown structure is maintained.
listen 9000;

Minimum value for the range of listening ports for RTP reception

Please ensure that the markdown structure is maintained.
rtp_port_min 58200;

Maximum value for the range of listening ports for RTP reception

Please ensure that the markdown structure is maintained.
rtp_port_max 58300;

Whether to wait for a keyframe before forwarding

  • off: No need to wait, forward directly
  • on: Wait for the first keyframe before forwarding

Please ensure that the markdown structure is maintained.
wait_keyframe on;

Idle waiting time for RTP packets, if no packets are received within the specified time

  • The RTP listening connection will automatically stop and send a BYE command.

Please ensure that the markdown structure is maintained.
rtp_idle_timeout 60;

Whether to forward the audio stream

  • Currently, only AAC format is supported, so the device needs to support AAC format.
  • on: Forward audio
  • off: Do not forward audio, only video
  • Note!!!: FLV only supports three formats: 11025, 22050, and 44100.
  • If the device does not support any of these three formats, it will automatically select one format during forwarding.
  • It will also encapsulate the ADTS header in the FLV AAC raw data.
  • This allows the player to automatically select the sampling frequency based on the ADTS header.
  • Players like ffplay and VLC can do this, but Flash does not have sound.
  • This is because Flash only supports 11025, 22050, and 44100.

Please ensure that the markdown structure is maintained.
audio_enable off;

Whether to enable RTP buffering

  • Enabling this can effectively solve issues such as RTP disorder.

Please ensure that the markdown structure is maintained.
jitterbuffer_enable on;

Server host number, can be a domain name or IP address

  • This is the address to which the device sends media. If the server is on an internal or external network, the external address should be used.
  • When calling the API to create a stream session, the returned IP address is also the host.
  • $CANDIDATE is a system environment variable used to obtain the address. If it is not configured, "*" is used.
  • "*" represents the specified network card address for the stats network. If the network is not configured, the default is the address of the 0th network card.

Please ensure that the markdown structure is maintained.
# TODO: https://github.com/ossrs/srs/pull/1679/files#r400917594
host 13.32.203.100;

Create an RTMP media channel based on the received PS RTP packets, no need to create it through the API interface.

  • The RTMP address parameter [stream] is the channel ID in the format chid[ssrc].

Please ensure that the markdown structure is maintained.
auto_create_channel on;

sip {

Enable internal SIP signaling in SRS.

  • Set to "on" to route signaling through SRS.
  • Set to "off" to only forward PS streams.

Please ensure that the markdown structure is maintained.
enabled on;

SIP listening UDP port.

Please ensure that the markdown structure is maintained.
listen 5060;

SIP server ID.

The device-side configuration number needs to be consistent with this value, otherwise registration will fail.
Please ensure that the markdown structure is maintained.
serial 13010100002000000126;

SIP server domain.

Please ensure that the markdown structure is maintained.
realm 1301010000;

Timeout for receiving response after sending ACK from the server, in seconds.

If no response is received within the specified time, it is considered a failure.

    ack_timeout         60;

Duration for maintaining device heartbeat. If no heartbeat is received within the specified time (in seconds), it is considered that the device is offline.

    keepalive_timeout   120;

Whether to automatically send an invite to the device after registration.

"on": Yes, "off": No. It needs to be controlled through the API.

    auto_play           on;

Whether the port for sending streams from the device is fixed.

"on": Send streams to a multiplexing port, such as 9000.

"off": Automatically select a port from the range between rtp_mix_port and rtp_max_port that is available.

    invite_port_fixed     on;

The interval, in seconds, for querying the device list from the device or subdomain.

Default is 60 seconds.

    query_catalog_interval  60;
}

}
rtc_server {
enabled on;
# Listen at udp://8000
listen 8000;
#
# The $CANDIDATE means fetch from env, if not configed, use * as default.
#
# The * means retrieving server IP automatically, from all network interfaces,
# @see #307 (comment)
candidate 13.32.203.100;
}
vhost defaultVhost {
rtc {
enabled on;
bframe discard;
}
}

Replay

1. GB28181
2. webrtc playback

Expected Behavior (Expect)
To see more detailed logs, understand the cause of the error, and prevent the SRS service from crashing.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title 段错误(吐核) GB28181: 段错误(吐核) Jul 17, 2020
@winlinvip winlinvip added the GB28181 For GB28181. label Jul 17, 2020
@xialixin
Copy link
Contributor

xialixin commented Jul 17, 2020

Please use the latest version srs4.0.32 or above.

TRANS_BY_GPT3

@huxiaochao1995
Copy link

huxiaochao1995 commented Jul 20, 2020

Hello, may I ask if you have resolved it? I also have the same issue. Mine is version 4.0.35.

TRANS_BY_GPT3

@xialixin
Copy link
Contributor

xialixin commented Jul 21, 2020

@huhu123456789 You may have some different issues with them

TRANS_BY_GPT3

@huxiaochao1995
Copy link

huxiaochao1995 commented Jul 21, 2020

@xialixin Oh, can you add me on QQ? Help me remotely and guide me. 1042018884

TRANS_BY_GPT3

@xialixin
Copy link
Contributor

xialixin commented Jul 21, 2020

》gdb objs/srs
》 run -c conf/push.gb28181.conf
If it crashes, use bt to check the log, then take a screenshot.

TRANS_BY_GPT3

@huxiaochao1995
Copy link

huxiaochao1995 commented Aug 6, 2020

@xialixin Okay Xiaogong, sorry for the delay, I just saw it after many days. I'll give it a try.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Dec 1, 2020

Fixed?

TRANS_BY_GPT3

@winlinvip winlinvip added this to the 4.0 milestone Sep 4, 2021
@winlinvip winlinvip changed the title GB28181: 段错误(吐核) GB28181: Segmentation fault (core dumped) Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
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

4 participants