V
V
V Oz2017-01-23 13:50:21
linux
V Oz, 2017-01-23 13:50:21

Why is the application not receiving the video stream coming to the network interface?

At home there is a computer under linux (OpenSUSE) with two network interfaces. One (eth3) for simply accessing the network (LAN and Internet). The second (eth2) is for connecting to a multicast through a tunnel in a remote locale. Both are connected to a router under RouterOS.
Routing is configured, everything works, multicast stream packets arrive on eth2 - tcpdump shows activity on this interface from the correct addresses immediately after the application (ffmpeg, mplayer, VLC) requests a stream from
server over UDP. That is, the request goes to the correct interface, in response to it, a stream is poured through the correct bridges in the router, to the correct interface, but .. the application itself does not receive this stream. For example, in ffmpeg (ffplay) there is just silence, instead of the usual output to the console of stream characteristics, etc. Moreover, the application pushes periodic presence packets, which supports broadcasting from the server. And when I press "stop", the broadcast ends after a few seconds - that is, everything is correct with multicast and routes.
And shortly before that, it somehow worked, but crookedly - the stream entered the computer not through the eth2 allocated for it, but through eth3. I reconfigured the router and the flow went in the right direction, but the video stopped working.
Where, than to dig at the system level, in order to understand where this thread got lost?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
V Oz, 2017-01-23
@v-oz

The ENT doctor prescribed to enter the route not only into the broadcast network, but also to the rendezvous points (RP) of the IPTV provider.
Apparently I didn’t read the materiel about multicast badly, if I forgot about it. Well at least I remembered as soon as I read the recipe.
In short, the client sends a request to the server of the group, which server will be selected there. This server sends traffic to the client and server meeting point for the client's subnet. The client picks up the flow from the rendezvous point. There may be several of these points.
How to determine the RP - turn on the player and view all links to streams in parallel, remove the dump from the interface and see where the traffic comes from to the addresses indicated in the links:
add routes

ip route add -net 224.0.0.0/4 via dev eth2
route add -net 198.18.0.0/16 gw 192.168.222.110

where 192.168.222.110 is the IP address of the router interface to which our client's interface is connected. The route to it must also be defined.
In principle, if there is only one interface in the system, then everything should somehow resolve itself. But in a case like mine or on LOR, a non-default interface has to be specified by hand to access the stream. And hope that the provider will not often change the topology of its network.
PS. this is all short and probably somewhere a bit erroneous and therefore does not cancel the assimilation of materiel about multicast and routing.

A
Alexey Cheremisin, 2017-01-23
@leahch

Register routing to multicast addresses on the required interface.
For example
, in order for multicast to be routed from the interface to the interface, you need to install a special daemon, otherwise there will be no multicast routing!
smcroute and igmproute.
Well, an article just in case - https://www.altlinux.org/Static_Multicast_Routing
and - http://xgu.ru/wiki/Multicast_in_Linux

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question