ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.29k stars 632 forks source link

Connection only lasts a second #1031

Closed The-Code-Monkey closed 5 years ago

The-Code-Monkey commented 5 years ago

Issue

Short description

Sometimes the connection only lasts for a second and sometimes it will stay connected, all locally hosted on a mac with the firewall turned off so all ports open.

Environment

Expected behavior

should stay connected

Actual behavior

connects but then disconnects

Steps to reproduce

  1. run default package

onNetworkThreadReady
onWorkerThreadReady
onSignalingThreadReady
[INFO] [http-nio2-0.0.0.0-5080-exec-10] io.antmedia.websocket.WebSocketCommunityHandler - received sdp type is offer test
[WARN] [<noname> - ] io.antmedia.webrtc.adaptor.Adaptor - onAddStream for stream: test
[WARN] [<noname> - ] io.antmedia.webrtc.adaptor.Adaptor - onCreate Success for stream: test
[INFO] [<noname> - ] org.webrtc.audio.WebRtcAudioTrack - initPlayout(sampleRate=16000, channels=1)
[INFO] [<noname> - ] org.webrtc.audio.WebRtcAudioTrack - WebRTCAudioTrack initPlayout: org.webrtc.audio.WebRtcAudioTrack@6d6ee14d
[INFO] [<noname> - ] org.webrtc.audio.WebRtcAudioTrack - byteBuffer.capacity:320
[INFO] [<noname> - ] org.webrtc.audio.WebRtcAudioTrack - start playout org.webrtc.audio.WebRtcAudioTrack@6d6ee14d
[INFO] [<noname> - ] io.antmedia.webrtc.adaptor.Adaptor - set localdescription on set success  for test
[WARN] [<noname> - ] io.antmedia.webrtc.adaptor.Adaptor - onIceCandidate
[WARN] [<noname> - ] io.antmedia.webrtc.adaptor.Adaptor - onIceCandidate
[WARN] [<noname> - ] io.antmedia.webrtc.adaptor.Adaptor - onIceCandidate
[INFO] [Red5_Scheduler_Worker-31] io.antmedia.muxer.MuxAdaptor - avformat_find_stream_info takes 3717ms
[INFO] [Red5_Scheduler_Worker-31] io.antmedia.muxer.MuxAdaptor - after avformat_find_sream_info for stream: test
[WARN] [Red5_Scheduler_Worker-31] io.antmedia.muxer.MuxAdaptor - input format context cannot be created for stream -> test
[WARN] [Red5_Scheduler_Worker-31] io.antmedia.muxer.MuxAdaptor - closing adaptor for test
[INFO] [Red5_Scheduler_Worker-31] io.antmedia.muxer.MuxAdaptor - close resources for streamId -> test
[INFO] [Red5_Scheduler_Worker-31] io.antmedia.AntMediaApplicationAdapter - update source quality for stream: test quality:NA speed:0.0
[WARN] [Red5_Scheduler_Worker-31] io.antmedia.muxer.MuxAdaptor - closed adaptor for test
[INFO] [<noname> - ] io.antmedia.webrtc.adaptor.RTMPAdaptor - Received total video frames: 100  received fps: 25
[INFO] [<noname> - ] io.antmedia.webrtc.adaptor.RTMPAdaptor - Received total video frames: 200  received fps: 25```
The-Code-Monkey commented 5 years ago

I keep getting this no matter what I do

[INFO] [Red5_Scheduler_Worker-15] io.antmedia.muxer.MuxAdaptor - after avformat_find_sream_info for stream: test
[WARN] [Red5_Scheduler_Worker-15] io.antmedia.muxer.MuxAdaptor - input format context cannot be created for stream -> test
[WARN] [Red5_Scheduler_Worker-15] io.antmedia.muxer.MuxAdaptor - closing adaptor for test
[INFO] [Red5_Scheduler_Worker-15] io.antmedia.muxer.MuxAdaptor - close resources for streamId -> test
[INFO] [Red5_Scheduler_Worker-15] io.antmedia.AntMediaApplicationAdapter - update source quality for stream: test quality:NA speed:0.0
[WARN] [Red5_Scheduler_Worker-15] io.antmedia.muxer.MuxAdaptor - closed adaptor for test
SelimEmre commented 5 years ago

Hi @The-Code-Monkey, Can you please check UDP Ports (5000-65000) is open in Server and Streaming Side ?

The-Code-Monkey commented 5 years ago

All ports are open as my firewall is off