Closed sperezs95 closed 1 year ago
Hello, when using RTMP, you have to pass credentials through query parameters:
rtmp://localhost/mystream?user=myuser&pass=mypass
The standard way of passing credentials doesn't work since an RTMP client passes those credentials to the server before telling the server whether it wants to publish or read a stream, and therefore we couldn't distinguish between publishUser
and readUser
.
This was written in the README until some time ago but i recently rewrote the README from scratch and i just found out that this information has gone missing. I've added a specific note: #2057
Thank you very much for your help! I already managed to publish!
Hello, when using RTMP, you have to pass credentials through query parameters:
rtmp://localhost/mystream?user=myuser&pass=mypass
The standard way of passing credentials doesn't work since an RTMP client passes those credentials to the server before telling the server whether it wants to publish or read a stream, and therefore we couldn't distinguish between
publishUser
andreadUser
.This was written in the README until some time ago but i recently rewrote the README from scratch and i just found out that this information has gone missing. I've added a specific note: #2057
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.
Which version are you using?
v0.23.5
Which operating system are you using?
Describe the issue
Does not publish RMTP with authentication
Describe how to replicate the issue
publishUser: "admin" publishPass: "admin"
ffmpeg -re -stream_loop -1 -i file.mp4 -c copy -f flv rtmp://admin:admin@localhost:1935/mystream
I got the following error in the console:
[aost#0:1/copy @ 00000273a836a580] Error submitting a packet to the muxer: Error number -10054 occurred [out#0/flv @ 00000273a83648c0] Error muxing a packet [flv @ 00000273a8364cc0] Failed to update header with correct duration. [flv @ 00000273a8364cc0] Failed to update header with correct filesize. [out#0/flv @ 00000273a83648c0] Error writing trailer: Error number -10054 occurred [out#0/flv @ 00000273a83648c0] Error closing file: Error number -10054 occurred [out#0/flv @ 00000273a83648c0] video:2671kB audio:37kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown frame= 83 fps= 37 q=-1.0 Lsize= 2409kB time=00:00:02.70 bitrate=7286.0kbits/s speed=1.22x
While in the mediamtx log I got the following:
2023/07/13 19:14:21 INF [RTMP] [conn [::1]:51906] opened 2023/07/13 19:14:23 INF [RTMP] [conn [::1]:51906] closed (invalid credentials)
ffmpeg -re -stream_loop -1 -i file.mp4 -c copy -f rtsp rtsp://admin:admin@localhost:8554/mystream
Did you attach the server logs?
no, the logs are in the description
Did you attach a network dump?
no
I'm relatively new to this. I hope I'm not making any obvious mistakes. I appreciate any help!