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

Can't read RTMP source: not enough bytes / Can I push a stream via SRT? #3401

Open
1 task done
tomasz-lasko opened this issue May 27, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working rtmp

Comments

@tomasz-lasko
Copy link

tomasz-lasko commented May 27, 2024

Which version are you using?

v1.8.2

Which operating system are you using?

  • Linux arm7 standard (mediamtx_v1.8.2_linux_armv7.tar.gz)

Run on OpenWRT without problems except this one.

Describe the issue

  1. mediamtx can't read RTMP, because of error [RTMP source] not enough bytes

This is a stream that I have been using for years with all normal RTMP clients (VLC, OBS, vMix, ...) and it works just fine.

  1. By the way a question: can I somehow make mediamtx push by itself that stream via SRT to a remote SRT listener? If yes then how

Describe how to replicate the issue

Don't have nor use ffmpeg, but just run MediaMTX with the following config (based on sample mediamtx.yml, downloaded from releases, just added these three lines):

paths:
  src_cam:
    source: rtmp://server/app/stream

And then I have the problem. But for exampel I don't have a problem if I put an RTSP source to some other camera, so mediamtx pulls it, and then it connect from VLC to mediamtx via SRT and can read it (but it would be nice to make mediamtx push it via SRT to somewhere)

Did you attach the server logs?

Log level debug:

2024/05/27 17:33:15 INF MediaMTX v1.8.2
2024/05/27 17:33:15 INF configuration loaded from mediamtx.yml
2024/05/27 17:33:15 DEB [path src_cam] created
2024/05/27 17:33:15 DEB path manager created
2024/05/27 17:33:15 INF [path src_cam] [RTMP source] started
2024/05/27 17:33:15 DEB [path src_cam] [RTMP source] connecting
2024/05/27 17:33:15 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2024/05/27 17:33:15 INF [RTMP] listener opened on :1935
2024/05/27 17:33:15 INF [SRT] listener opened on :8890 (UDP)
2024/05/27 17:33:15 ERR [path src_cam] [RTMP source] not enough bytes
2024/05/27 17:33:20 DEB [path src_cam] [RTMP source] connecting
2024/05/27 17:33:22 ERR [path src_cam] [RTMP source] not enough bytes
<here I press Control-C>
^C2024/05/27 17:33:26 INF shutting down gracefully
2024/05/27 17:33:26 INF [SRT] listener is closing
2024/05/27 17:33:26 INF [RTMP] listener is closing
2024/05/27 17:33:26 INF [RTSP] listener is closing
2024/05/27 17:33:26 DEB path manager is shutting down
2024/05/27 17:33:26 INF [path src_cam] [RTMP source] stopped: path is closing
2024/05/27 17:33:26 DEB [path src_cam] destroyed: terminated
2024/05/27 17:33:26 INF waiting for running hooks

Did you attach a network dump?

no - it is a private network, so I would not to attach a dump publically :)

But I made the dump myself, and there is something that looks like pretty nice RTMP
connect command > success reply > createStream, play > onStatus reply > and there is some data, but after a short while (sending 3429 and receiving 16927 bytes) mediamtx closes the TCP connection via a reset!

@aler9
Copy link
Member

aler9 commented Jul 1, 2024

Hello, the bug cannot be replicated without a network dump. Generate a network dump in any way you want, clean it up from personal data (if any) and attach it here or send it to aler9.dev@gmail.com

@aler9 aler9 added bug Something isn't working rtmp labels Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rtmp
Projects
None yet
Development

No branches or pull requests

2 participants