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.32k stars 638 forks source link

playing RTSP stream create core dump #325

Closed krab-skunk closed 5 years ago

krab-skunk commented 6 years ago

Issue

When i try to play a simple RTSP stream, ant-media-server-community-1.4.0-180802_1155 crash

Short description

I push via OBS, regular h264 stream to rtmp://ant.mydomain.com:1935/LiveApp/test

But if i want to play the RTSP stream : rtsp://ant.mydomain.com:5554/LiveApp/test, with ffplay or vlc, it crash the server

with ffplay, it doesn't create core dump, here is the error log on ant-media-server

[DEBUG] [NioProcessor-35] com.antstreaming.rtsp.RtspConnectionManager - applicationContext.containsBean(rtmpScheduler) : true
[DEBUG] [NioProcessor-35] com.antstreaming.rtsp.RtspConnectionManager - connection scheduler : null manager scheduler:org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler@27ff6e0c
[DEBUG] [NioProcessor-35] com.antstreaming.rtsp.RtspConnection - setting task scheduler
[DEBUG] [NioProcessor-35] com.antstreaming.rtsp.RtspMinaIoHandler - connection session id:0RFHNC6WXC4U3
[DEBUG] [pool-14-thread-1] com.antstreaming.rtsp.RtspMinaIoHandler - session opened with id 2
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - message received from sessiong with id 2
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - connection session id: 0RFHNC6WXC4U3
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - RTSP Server Receive Message:
OPTIONS rtsp://ant.mydomain.com:5554/LiveApp/test RTSP/1.0
CSeq: 1
User-Agent: Lavf57.83.100

[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - sent message: RTSP/1.0 200 OK
CSeq: 1
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, ANNOUNCE
Server: RtspServer
Content-Length:0

[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - message received from sessiong with id 2
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - connection session id: 0RFHNC6WXC4U3
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - RTSP Server Receive Message:
DESCRIBE rtsp://ant.mydomain.com:5554/LiveApp/test RTSP/1.0
Accept: application/sdp
CSeq: 2
User-Agent: Lavf57.83.100

[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspConnection - rtmp url is: rtmp://ant.mydomain.com/LiveApp/test
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspConnection - on request describe host: ant.mydomain.com path:/LiveApp/test
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspConnection - app:LiveApp streamName:test
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspConnection - input type is LIVE live wait is:LIVE_WAIT
[INFO] [Red5_Scheduler_Worker-29] io.antmedia.muxer.MuxAdaptor - Number of items in the queue 2
[rtmp @ 0x7fd9f80f70c0] Cannot open connection tcp://ant.mydomain.com:1935
[WARN] [RTMPConnectionScheduler-9] com.antstreaming.rtsp.PacketSenderRunnable - could not open input rtmp://ant.mydomain.com/LiveApp/test error code:-110 description: Connection timed out
[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - sent message: RTSP/1.0 500 Internal Server Error
CSeq: 2
Date: 11 Aug 2018 12:50:35 GMT
Content-Type: application/sdp
Server: RtspServer

[DEBUG] [pool-14-thread-2] com.antstreaming.rtsp.RtspMinaIoHandler - session closed (0x00000002: nio socket, server, /5.60.249.0:51658 => 0.0.0.0/0.0.0.0:5554)
[WARN] [pool-14-thread-2] com.antstreaming.rtsp.PacketSenderRunnable - close muxer called with finish process: true
[WARN] [pool-14-thread-2] com.antstreaming.rtsp.PacketSenderRunnable - closeInternal called

If i try to play the stream via VLC

[rtmp @ 0x7fda1403db80] Cannot open connection tcp://ant.mydomain.com:1935
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fd9f0eaca01, pid=14738, tid=0x00007fd9e86f6700
#
# JRE version: OpenJDK Runtime Environment (8.0_181-b13) (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
# Java VM: OpenJDK 64-Bit Server VM (25.181-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libavformat.so.57+0x1bda01]  avformat_free_context+0xf1
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /root/ant-media-server/hs_err_pid14738.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)

Environment

[] Operating system and version: Ubuntu 16.04.4 LTS [] Java version: openjdk version "1.8.0_181"

I also tried by directly subscribing to your ant media server using the Amazon webservice market place (ami-ef774904), and i noticed the very same behavior, so it doesn't seems to be related to a possible wrong installation.

Expected behavior

The RTSP to be displayed on VLC or ffplay, so my question, is RTSP supported by ant-media-server community edition ?

Actual behavior

code dumped.

More details

Idk if that would help anything but on this same server (ec2), i also tested red5pro, or https://github.com/iizukanao/node-rtsp-rtmp-server and RTSP streaming was working fine

mekya commented 6 years ago

Hi @steve-heslouin , Sorry for late reply.

Actually, we do not prefer to use RTSP for playing. We generally do not work about maintaining RTSP support. Because RTSP for playback is not preferred and there is no support in browser for that. Instead, WebRTC, which uses RTP for data transfer as in RTSP, is natively supported in browsers and we are working on WebRTC improvement.

Is there any specific reason for you to use RTSP for play back?

Regards, A. Oguz

kirantpatil commented 6 years ago

Why we need RTSP is because lot of embedded kits does support only RTSP.

We are using TI CC3220 module with Omnivision OV788.

Please find the below document link of TI. http://www.ti.com/lit/an/swra599/swra599.pdf

Thanks.

SelimEmre commented 5 years ago

Hi @kirantpatil, Thank you for your interest. We will notify you when we added RTSP stream feature.

mekya commented 5 years ago

Playing RTSP is not supported anymore. So that I'm closing this issue