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

fix: rtmp server failing to connect when auth is configured #131

Merged
merged 2 commits into from May 17, 2024

Conversation

radiohertz
Copy link
Contributor

@radiohertz radiohertz commented May 11, 2024

Fix 1: the app name contains the whole query param for whatever reason, this patch removes it.

Fix 2: somehow the query parameters passed to on_connect function are empty even though they exist and the auth fails because it thinks there's no token even tho there is, i just use the connect_properties url to get the required info instead.

@radiohertz
Copy link
Contributor Author

cc @harlanc

@harlanc
Copy link
Owner

harlanc commented May 13, 2024

@radiohertz Thank you for your contributions. The fix for BUG 1 is good, although it's a bit unusual to see a case where the app name includes query parameters. As for BUG 2, I need to confirm whether the query parameters are empty or if the entire 'stream_name_with_query' field is empty?

The following picture is from ffmpeg pushing :
image

@radiohertz
Copy link
Contributor Author

radiohertz commented May 13, 2024

I need to confirm whether the query parameters are empty or if the entire 'stream_name_with_query' field is empty?

I encountered the bug when i was pushing the stream using OBS on Linux. maybe OBS is doing something funny, but if im correct OBS still uses ffmpeg under the hood so im not really sure. @harlanc

@harlanc
Copy link
Owner

harlanc commented May 13, 2024

You'd better provide the captured RTMP network packets to do some analysis @radiohertz

@radiohertz
Copy link
Contributor Author

radiohertz commented May 13, 2024

Here's a screenshot, as you can see it's an empty string. The URL i configured in OBS is rtmp://127.0.0.1:1935/live/x0?token=test123 @harlanc

image

You can download the capture here https://files.evsky.art/rtmpcap.pcapng

@harlanc
Copy link
Owner

harlanc commented May 14, 2024

I use ffmpeg to push the stream to xiu server, using the following address: rtmp://127.0.0.1:1935/live/x0?token=test123, and the captures:

image

image

Abnormal packet capture records from @radiohertz :

image

image

BUG 1: the app name contains the whole query param for whatever reason,
this patch removes it.

BUG 2: somehow the query parameters passed to on_connect function are
empty even tho they exist, i just use the `connect_properties` url to
get the required info instead.
@radiohertz
Copy link
Contributor Author

@harlanc updated the patch and the changelog. I'd appreciate it if you can do a release on crates.io.

@harlanc
Copy link
Owner

harlanc commented May 14, 2024

okay, will do it on the weekend..

@radiohertz
Copy link
Contributor Author

ping @harlanc

@harlanc harlanc merged commit 477e412 into harlanc:master May 17, 2024
1 check passed
@harlanc
Copy link
Owner

harlanc commented May 17, 2024

Done @radiohertz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants