Skip to content

MediaMTX does not use system routing tables for multicast stream sources #4565

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

Open
chlupm opened this issue May 27, 2025 · 0 comments
Open

Comments

@chlupm
Copy link

chlupm commented May 27, 2025

Which version are you using?

mediamtx_v1.12.2_linux_amd64.tar.gz

Which operating system are you using?

Linux amd64 standard

Describe issue

I welcome the possibility to choose a specific network interface in the form:
source: udp://238.0.0.1:1234?interface=eth0
It is very good feature. Thank you very much.

When use only:
source: udp://238.0.0.1:1234
MediaMTX tries to get the source on all network interfaces.

However, perhaps the current behavior when the interface at the source is not defined should be different.
For example, the vlc uses the system routing table when choosing the interface at multicast.

Test with vlc:

  1. test
    $ vlc udp://@238.0.0.1:1234
    $ ip maddr
    ...
    2: eth0
    inet 238.0.0.1
    ...

  2. test
    $ sudo ip route add 238.0.0.1/32 dev eth1
    $ vlc udp://@238.0.0.1:1234
    $ ip maddr
    ...
    3: eth1
    inet 238.0.0.1
    ...

I think that more tools in Linux behave like this (for example ffplay too: ffplay udp://238.0.0.1:1234).
vlc probably does something like this when choosing an interface:
$ ip route get 238.0.0.1

MediaMTX should respect the routing table just as vlc, ffplay and other tools do.

MediaMTX's current behaviour of trying to get video from all interfaces could then be set as follows:
source: udp://238.0.0.1:1234?interface=ALL
Although someone might be upset that it's a change in behavior.

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

No branches or pull requests

1 participant