Skip to content

RTMP URL with query string parsing issue #5765

@0xcdcdcdcd

Description

@0xcdcdcdcd

Which version are you using?

1.18.1

Which operating system are you using?

Other (please describe)

Describe the issue

When publishing using an RTMP URL with a query string like "https://rtmp.example.com/app1?query/stream1", the variables are parsed as follows:
MTX_PATH=app1
MTX_QUERY=query%2Fstream1

This is not the expected behavior. The correct parsing should be:
MTX_PATH=app1/stream1
MTX_QUERY=query

I believe this is caused by url.Parse being called on the string "app1?query/stream1" inside the buildURL function in gortmplib/server_conn.go.

bluenviron-gortmplib.patch

Describe how to replicate the issue

ffmpeg -re -i source.mp4 -c:v copy -c:a copy -f flv "rtmp://rtmp.example.com/app1?query/stream1"

MediaMTX configuration

MediaMTX logs

No response

Packet dump

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions