bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
12.34k stars 1.53k forks source link

Error publishing RTMP from DVR #2601

Closed c-reschke closed 11 months ago

c-reschke commented 1 year ago

Which version are you using?

v1.2.1

Which operating system are you using?

Describe the issue

When I try to connect my DVR (NVR) via RTMP it times out.

./mediamtx 
2023/10/29 15:16:06 INF MediaMTX v1.2.1
2023/10/29 15:16:06 INF configuration loaded from /home/ubuntu/mediamtx.yml
2023/10/29 15:16:06 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2023/10/29 15:16:06 INF [RTMP] listener opened on :1935
2023/10/29 15:16:06 INF [HLS] listener opened on :8888
2023/10/29 15:16:06 INF [WebRTC] listener opened on :8889 (HTTP)
2023/10/29 15:16:06 INF [SRT] listener opened on :8890 (UDP)
2023/10/29 15:16:06 INF [RTMP] [conn 167.250.30.179:57260] opened
2023/10/29 15:16:16 INF [RTMP] [conn 167.250.30.179:57260] closed: read tcp 172.31.13.49:1935->167.250.30.179:57260: i/o timeout
2023/10/29 15:16:17 INF [RTMP] [conn 167.250.30.179:57266] opened
2023/10/29 15:16:27 INF [RTMP] [conn 167.250.30.179:57266] closed: read tcp 172.31.13.49:1935->167.250.30.179:57266: i/o timeout
2023/10/29 15:16:28 INF [RTMP] [conn 167.250.30.179:57270] opened

How could I get more information from the mediamtx to find out what's going on?

Describe how to replicate the issue

  1. start the server
  2. publish with h264 => rtmp://localhost/test from my DVR
  3. read with
  4. My DVR has few options for adjustments image
  5. This is my device (https://backend.intelbras.com/sites/default/files/2023-03/Manual%20do%20usu%C3%A1rio%20-%20MHDX%203016-C.pdf)

Did you attach the server logs?

no

Did you attach a network dump?

no

efraimjer commented 1 year ago

Olá, pelo que posso ver vc está tentando usar a porta errada, o listener do rtmp é na porta 1935, se você usar o endereço personalizado você não precisa setar a porta simplesmente colocar o ip e o nome que vc quer para sua stream

ex:

192.168.1.108/my_dvr

e vai reproduzir no localhost:8888/my_dvr

aler9 commented 1 year ago

Hello, this can be solved if you provide a network dump, that can be generated in this way:

1) Download wireshark (https://www.wireshark.org/) 2) Start capturing on the interface used for exchanging RTMP (if the server and the target software are both installed on your pc, the interface is probably "loopback", otherwise it's the one of your network card) 3) Start the server and replicate the issue 4) Stop capturing, save the result in .pcap format 5) Attach

c-reschke commented 1 year ago

@efraimjer Essa foto eu coloquei somente como exemplo, eu usei o endereço personalizado com a porta 1935, se não nem iria chegar no mediamtk. Vou usar o wireshark como o @aler9 falou para capturar o log.

c-reschke commented 1 year ago

rtmp-mediamtx.zip

@aler9 here's the Wireshark capture, I had to put it in a zip because Github didn't accept this type of document.

aler9 commented 11 months ago

Hello, thanks for providing the network dump, i tested it against v1.2.1 and in can confirm that the server gets stuck. However, starting from v1.3.0, the server is able to receive that same stream without any issue.

I'm marking this as resolved, please warn me in case the latest version doesn't fix the problem.

github-actions[bot] commented 4 months ago

This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.