When using the Example iOS app on a physical iPhone 8(14.4), connecting to srt-live-server results in a socket connection but immediate disconnect.
srt { #SRT
worker_threads 1;
worker_connections 300 ;
log_file logs/error.log ;
log_level info;
#stat_post_url http://192.168.31.106:8001/sls/stat;
#stat_post_interval 5;#s
record_hls_path_prefix /tmp/mov/sls;
#vod file name: /tmp/mov/sls/$listen/$domain_publisher/$app_publisher/$stream_name/vod.m3u8
server {
listen 3000;
latency 200; #ms
domain_player output;
domain_publisher input;
backlog 100; #accept connections at the same time
idle_streams_timeout 10;#s -1: unlimited
#on_event_url http://192.168.31.106:8000/sls/on_event; #?method=on_connect|on_close&role_name=&srt_url=%s
app {
app_player live ;
app_publisher live ;
record_hls off;#on, off
record_hls_segment_duration 10; #unit s
#relay {
# type pull;
# mode loop;#loop; hash;
# reconnect_interval 10;
# idle_streams_timeout -1;#s -1: unlimited
# upstreams 127.0.0.1:9090?streamid=live.sls.com/live 192.168.1.100:8080/?streamid=live.test.com/live;
#}
#relay {
# type push;
# mode all; #all; hash
# reconnect_interval 10;
# idle_streams_timeout 10;#s -1: unlimited
# upstreams 192.168.31.106:8080?streamid=uplive.sls.com/live ;
#}
}
}
}
2021-05-18 19:36:31:764 SLS INFO: [0x7ff94480bc00]CSLSSrt::libsrt_accept ok, new sock=652293637, 172.27.23.118:50589.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, new client[172.27.23.118:50589], fd=652293637.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, [172.27.23.118:50589], sid 'input/live/iphone8'
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, new pub=0x7ff943da4000, key_stream_name=input/live/iphone8.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943e04768]CSLSMapData::add ok, key='input/live/iphone8'.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943e04878]CSLSMapPublisher::set_push_2_pushlisher, ok, publisher=0x7ff943da4000, app_streamname=input/live/iphone8, m_map_push_2_pushlisher.size()=1.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, new publisher[172.27.23.118:50589], key_stream_name=input/live/iphone8.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943e04b38]CSLSMapRelay::add_relay_manager, no relay conf info, app_uplive=input/live, stream_name=iphone8.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, m_map_pusher->add_relay_manager failed, new role[172.27.23.118:50589], key_stream_name=input/live/iphone8.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943da4000]CSLSRole::add_to_epoll, publisher, sock=652293637, m_is_write=0, ret=0.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff94401ca00]CSLSGroup::check_new_role, worker_number=0, publisher=0x7ff943da4000, add_to_epoll fd=652293637, role_map.size=2.
2021-05-18 19:36:31:775 SLS INFO: [0x7ff94480bc00]CSLSSrt::libsrt_accept ok, new sock=652293636, 172.27.23.118:53705.
2021-05-18 19:36:31:775 SLS INFO: [0x7ff943d29000]CSLSListener::handler, new client[172.27.23.118:53705], fd=652293636.
2021-05-18 19:36:31:775 SLS INFO: [0x7ff943d29000]CSLSListener::handler, [172.27.23.118:53705], sid 'input/live/iphone8'
2021-05-18 19:36:31:775 SLS ERROR: [0x7ff943d29000]CSLSListener::handler, refused, new role[172.27.23.118:53705], stream='input/live/iphone8',but publisher=0x7ff943da4000 is not NULL.
2021-05-18 19:36:31:775 SLS INFO: [0x7ff944812a00]CSLSSrt::libsrt_close, fd=652293636.
19:36:35.494052/T0x70000bdc9000!W:SRT.br: @652293637:RCV-DROPPED 1 packet(s), packet seqno %1140470064 delayed for 4.877 ms
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943da4000]CSLSRole::get_state, check_idle_streams_duration is true, cur m_state=1, m_idle_streams_timeout=10s, call invalid_srt.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943da4000]CSLSRole::invalid_srt, close sock=652293637, m_state=2.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff94680e200]CSLSSrt::libsrt_close, fd=652293637.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff94401ca00]CSLSGroup::check_invalid_sock, worker_number=0, publisher=0x7ff943da4000, invalid sock=0, state=2, role_map.size=2.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943e04768]CSLSMapData::remove, key='input/live/iphone8' delete array_data=0x7ff945105270.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943da4000]CSLSPublisher::uninit, removed publisher from m_map_data, ret=0.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943e04878]CSLSMapPublisher::remove, publisher=0x7ff943da4000, live_key=input/live/iphone8.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943da4000]CSLSPublisher::uninit, removed publisher from m_map_publisher, ret=0.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff94401ca00]CSLSGroup::check_invalid_sock, worker_number=0, publisher=0x7ff943da4000, delete.
2021-05-18 19:35:27.022439-0400 Example iOS[6443:803303] Could not load the "first" image referenced from a nib in the bundle with identifier "com.haishinkit.srt.SRTHaishinKit"
2021-05-18 19:35:27.023813-0400 Example iOS[6443:803303] Could not load the "second" image referenced from a nib in the bundle with identifier "com.haishinkit.srt.SRTHaishinKit"
2021-05-18 19:35:27.134315-0400 Example iOS[6443:803303] Metal API Validation Enabled
2021-18-05 19:35:27.175 [Warn] [com.haishinkit.HaishinKit] [VideoIOComponent.swift:163] continuousAutofocus > focusMode(2) is not supported
2021-18-05 19:35:27.176 [Warn] [com.haishinkit.HaishinKit] [VideoIOComponent.swift:222] continuousExposure > exposureMode(2) is not supported
2021-18-05 19:35:36.257 [Info] [com.haishinkit.HaishinKit] [VideoIOComponent.swift:96] fps > (fps: 30.0, duration: __C.CMTime(value: 100, timescale: 3000, flags: __C.CMTimeFlags(rawValue: 1), epoch: 0))
2021-18-05 19:36:31.551 [Info] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:42] status > SRT Socket Connected
2021-18-05 19:36:31.559 [Info] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:42] status > SRT Socket Connected
2021-18-05 19:36:31.570 [Info] [com.haishinkit.HaishinKit] [AudioCodec.swift:94] inSourceFormat > AudioStreamBasicDescription(mSampleRate: 44100.0, mFormatID: 1819304813, mFormatFlags: 12, mBytesPerPacket: 2, mFramesPerPacket: 1, mBytesPerFrame: 2, mChannelsPerFrame: 1, mBitsPerChannel: 16, mReserved: 0)
2021-18-05 19:36:31.593 [Info] [com.haishinkit.HaishinKit] [AudioCodec.swift:81] formatDescription > Optional(<CMAudioFormatDescription 0x281550500 [0x1f7fc9b20]> {
mediaType:'soun'
mediaSubType:'aac '
mediaSpecific: {
ASBD: {
mSampleRate: 44100.000000
mFormatID: 'aac '
mFormatFlags: 0x2
mBytesPerPacket: 0
mFramesPerPacket: 1024
mBytesPerFrame: 0
mChannelsPerFrame: 1
mBitsPerChannel: 0 }
cookie: {(null)}
ACL: {(null)}
FormatList Array: {
Index: 0
ChannelLayoutTag: 0x640001
ASBD: {
mSampleRate: 44100.000000
mFormatID: 'aac '
mFormatFlags: 0x2
mBytesPerPacket: 0
mFramesPerPacket: 1024
mBytesPerFrame: 0
mChannelsPerFrame: 1
mBitsPerChannel: 0 }}
}
extensions: {(null)}
})
2021-18-05 19:36:31.617 [Info] [com.haishinkit.HaishinKit] [AudioCodec.swift:72] actualBitrate > 32000
2021-18-05 19:36:36.700 [Warn] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:45] status > SRT Socket Broken
2021-18-05 19:36:36.700 [Info] [com.haishinkit.HaishinKit] [AudioCodec.swift:81] formatDescription > nil
2021-18-05 19:36:36.737 [Warn] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:54] status > SRT Socket Not Exist
2021-18-05 19:36:46.864 [Warn] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:45] status > SRT Socket Broken
2021-18-05 19:36:46.899 [Warn] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:54] status > SRT Socket Not Exist
ffmpeg -f lavfi -i testsrc=duration=1000:size=1280x720:rate=30 -f mpegts "srt://localhost:3000?streamid=input/live/somename"
ffplay -fflags nobuffer -i "srt://172.27.125.195:3000?streamid=output/live/somename
worked successfully.
**NOTE: Using ffplay as an endpoint(instead of srt-live-server) ALSO resulted in an error: **