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
11.41k stars 1.45k forks source link

Authentication seem impossible using OBS 64bit RTMP #1670

Closed Shakesbeard closed 1 year ago

Shakesbeard commented 1 year ago

Which version are you using?

v0.22.0

Which operating system are you using?

Describe the issue

Description

Describe how to replicate the issue

I am trying to set up basic internal authentication by username and password for use with OBS v29.0.2 64bit. I am using the default configuration file which is shipped with the release package. I modify the publishUser and publishPass setting. I have tried providing the credentials for the config file with and without quotes as well in the combinations raw and sha256.

  1. start the server without any commandline options, just using the minialistic modified config file
  2. publish with OBS using RTMP custom server and authentication enabled, providing the credentials This results with this message on server side: INF [RTMP] [conn ....] closed (invalid credentials)

Did you attach the server logs?

no The log does not produce anything useful in addition on debug mode in regards to this issue.

Did you attach a network dump?

no

Verdict

I think there might be something specific to how OBS is handling the handshake. Unfortunately I cannot create a network dump :( Unfortunately, OBS does not accept URL encoded username and password. This breaks the server hostname resolution in OBS.

However, the issue should be super easy to reproduce for you. As a workaround, would it be possible to provide authentication for OBS by other means? Like url query parameters or based on the streamkey field?

aler9 commented 1 year ago

Hello, as clearly stated in the README, credentials from OBS must be passed through query parameters:

If credentials are in use, use the following parameters:

Service: Custom...
Server: rtmp://localhost
Stream key: mystream?user=myuser&pass=mypass
github-actions[bot] commented 10 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.