Multicast address binding on VLC

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
nero
Blank Cone
Blank Cone
Posts: 18
Joined: 30 Apr 2008 12:01
VLC version: 0.8.6f
Operating System: Fedora
Location: Malaysia
Contact:

Multicast address binding on VLC

Postby nero » 18 Jun 2008 03:30

Hi guys,

I noticed that the VLC binds the socket connection it makes to a multicast address instead of a normal local ip address. Can i know why is the socket is bound to the multicast address instead of a local ip address (as normally would have been).

If we bound the socket to the multicast address, how can we determine on which interface it should be bound upon to for the direction of the packets received? (Receiver end).


btw, Im using 0.8.6f with Fedora 8.

Nero

Edited :

And one more thing, how can we determine which interface do we bind to for the multicast ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multicast address binding on VLC

Postby Rémi Denis-Courmont » 19 Jun 2008 00:49

On 0.9.0 the multicast interface is specified with

Code: Select all

--miface <name>
though I don't know the state of 0.8.6. In principle, the routing table should take care of this, not the applications.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

nero
Blank Cone
Blank Cone
Posts: 18
Joined: 30 Apr 2008 12:01
VLC version: 0.8.6f
Operating System: Fedora
Location: Malaysia
Contact:

Re: Multicast address binding on VLC

Postby nero » 19 Jun 2008 04:05

Okay.. still, can anyone explain why is it that vlc actually binds to a multicast address?

Tq in advance.

Nero

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multicast address binding on VLC

Postby Rémi Denis-Courmont » 19 Jun 2008 17:35

Why not?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

nero
Blank Cone
Blank Cone
Posts: 18
Joined: 30 Apr 2008 12:01
VLC version: 0.8.6f
Operating System: Fedora
Location: Malaysia
Contact:

Re: Multicast address binding on VLC

Postby nero » 20 Jun 2008 03:30

Why not?
Good one :D

Well, first, thanks for your quick reply.

Secondly, the reason i asked this question is because i need to know which interface that is 'RECEIVING' the multicast packets. Using 'miface' only sets the outgoing interface for the multicast session rite? Im interested in setting the incoming interface for the multicast traffic. Will it be possible? Initially, i thought that if the bind is executed by binding to a local interface, what im interested can be achieved.. but since it is binding to a multicast address.. im not sure which interface it is binding now. Surely if the kernel chooses it, there should be a part in the vlc source code that tell the kernel to choose. Im interested to know which part is that ?

:) Hope you understand what i tried to mean.


tq lotz...


Nero

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multicast address binding on VLC

Postby Rémi Denis-Courmont » 20 Jun 2008 20:58

AFAIK, you'll receive multicast packets from any interface. But the kernel will only send IGMP reports to whatever interface is the destination of IGMP reports as per the routing table.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

nero
Blank Cone
Blank Cone
Posts: 18
Joined: 30 Apr 2008 12:01
VLC version: 0.8.6f
Operating System: Fedora
Location: Malaysia
Contact:

Managed to control the Multicast receiving interface

Postby nero » 23 Jun 2008 03:24

Hi,

I think i have a solution to the problem that i was mentioning. I did a small modification on the source code like below:


/modules/misc/network/ipv6.c

i changed the coding
imr.ipv6mr_interface = loc.sin6_scope_id;

to

imr.ipv6mr_interface = if_nametoindex("ethX");

where ethX is the name of your network interface device.

Please bear in mind that I changed this coding accordingly to my specification that is using a IPv6 network using Fedora. But i think it would be more or less the same with IPv4 also.

At the moment, i could actually identify the interface i am receiving my multicast traffic. Works as for now...

Developers : Can you help verifying if this change would pose problem later on in the future or something?

Tq.


Nero


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests