miface option doesn't work in VLC 2.0.x on Windows

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

miface option doesn't work in VLC 2.0.x on Windows

Postby r21514 » 27 Apr 2012 18:10

VLC 1.0.x and 1.1.x:
vlc.exe --miface-addr=192.168.0.10 udp://@239.1.15.1:1234 <- works perfectly

VLC 2.0
vlc.exe --miface=192.168.0.10 udp://@239.1.15.1:1234 <- nothing
vlc.exe --miface-addr=192.168.0.10 udp://@239.1.15.1:1234 <- nothing

Windows XP SP3 with all updates.

What should I do?
Last edited by r21514 on 04 May 2012 14:24, edited 2 times in total.

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: miface option doesn't work in VLC 2.0.x

Postby r21514 » 27 Apr 2012 18:25

as far as I understand the problen in with function "if_nametoindex" that before 2.0 was defined to "atoi" and worked

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: miface option doesn't work in VLC 2.0.x

Postby VLC_help » 27 Apr 2012 19:30

VLC 2.0.x doesn't have miface-addr option. And miface is only for output

Code: Select all

--miface=<string> Multicast output interface Default multicast interface. This overrides the routing table

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: miface option doesn't work in VLC 2.0.x

Postby r21514 » 27 Apr 2012 21:05

miface-addr ALWAYS worked also for input for last 6 years that I use VLC since version 0.8.4

so how to change INPUT interface in VLC 2.0.x ???

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: miface option doesn't work in VLC 2.0.x

Postby r21514 » 28 Apr 2012 04:17

I have found the problem. Function "if_nametoindex" requires Windows Vista or higher.

So you left millions of IPTV users who use Windows XP without support. Thank you very much.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: miface option doesn't work in VLC 2.0.x on Windows XP

Postby VLC_help » 29 Apr 2012 12:31

The atoi should still be used in Windows builds since the config.h with Windows builds doesn't define the HAVE_IF_NAMETOINDEX
so in VLC 1.1.x it is like

Code: Select all

define if_nametoindex( str ) atoi( str )
(src/network/udp.c)
and in VLC 2.0.x is like

Code: Select all

# ifndef HAVE_IF_NAMETOINDEX # define if_nametoindex(name) atoi(name) # endif
(include/vlc_fixups.h)

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: miface option doesn't work in VLC 2.0.x on Windows XP

Postby r21514 » 29 Apr 2012 13:32

You are offering me to recompile VLC myself? Cool.

Only my ISP has 100K of IPTV users, ~50% is XP. So they all will forever stay on 1.1.11 now.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: miface option doesn't work in VLC 2.0.x on Windows XP

Postby VLC_help » 30 Apr 2012 20:37

No recompile. It should already be like it used to, so the issue is in somewhere else.

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: miface option doesn't work in VLC 2.0.x on Windows XP

Postby r21514 » 04 May 2012 14:16

It's funny but miface gives no result even on Windows 7:

vlc.exe --miface=192.168.0.10 udp://@239.1.15.1:1234 <- nothing
vlc.exe --miface=0 udp... <- nothing (I used number if function "atoi" still used)
vlc.exe --miface=1 udp... <- nothing
vlc.exe --miface=2 udp... <- nothing
vlc.exe --miface="Local area connection 2" udp... <- nothing (name of connection)
vlc.exe "--miface=Local area connection 2" udp... <- nothing
vlc.exe --miface="Realtek...." udp... <- nothing (name of ethernet adapter)
vlc.exe "--miface=Realtek...." udp... <- nothing

So what parameter of network interface must I specify for "miface" to work?
Anybody ever tested miface on Windows?

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

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Rémi Denis-Courmont » 04 May 2012 16:18

Depending on the toolchain that was used to compile VLC, I think multicast interface selection will either work only on Windows Vista and later, or will not work at all.

There is no way to support this on Windows XP anyway. It does not support the needed interface, as it predates the TCP/IP stack updates by Microsoft.

So you need to fix your routing table instead of relying on the hack that the --miface option constitute.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby r21514 » 09 May 2012 14:20

As I mentioned above it doesn't work even in Windows 7. It doesn't work at all!

When you do IP_ADD_MEMBERSHIP you anyway use McastReq structure that contains inet_addr.
Why not simply check if miface matches "*.*.*.*" and set inet_addr('what is miface set to') ?

/src/network/udp.c :

Code: Select all

case AF_INET: { struct ip_mreq imr; memset (&imr, 0, sizeof (imr)); assert (grplen >= sizeof (struct sockaddr_in)); imr.imr_multiaddr = ((const struct sockaddr_in *)grp)->sin_addr; >> add settings "imr.imr_interface. s_addr" to "inet_addr('value of "--miface"')" here << if (setsockopt (fd, SOL_IP, IP_ADD_MEMBERSHIP, &imr, sizeof (imr)) == 0) return 0; break; }
One line of code!
It's a critical feature for IPTV and it was used for years till VLC 2.0

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Jean-Baptiste Kempf » 09 May 2012 14:45

Patch is very welcome.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Titanic » 17 Oct 2012 16:40

Is there a solution for Windows Vista and higher users available? I've tried to use "--miface=<Index_of_NIC>" (e.g. --miface=17) but nothing happened. I still didn't get the stream in VLC even if I see it on the network with wireshark. Has anybody already used miface and got it to work?

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

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Rémi Denis-Courmont » 17 Oct 2012 18:38

  • Add the IETF RFC3678 §5 definitions to Mingw toolchain.
  • Build VLC with that updated toolchain.
AFAIK, VLC is just fine. The problem is in the Mingw SDK.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Titanic » 18 Oct 2012 08:09

Hi Remi,

Thx for the quick reply. Is there a way to add these RFC3678 §5 definitions to the standard VLC build toolchain used for nightly builds of VLC because I'm not really sure how to add these definitions to the Mingw toolchain. Also my Mingw toolchain was set up a couple of months ago and it's not in a working condition right now so if this could be added to the nightly builds of VLC on the main development servers you would do me a really big favour :-)

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

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Rémi Denis-Courmont » 18 Oct 2012 10:48

I don't know what the build bots use. I would guess some Mingw version from Debian.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Jean-Baptiste Kempf » 18 Oct 2012 10:50

Buildbots are using mingw-w64 3.0-beta.
Releases are still using the old mingw.org compilers
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Titanic » 18 Oct 2012 10:52

Does that mean the Nightly Builds of VLC are not having this problem with miface parameter? I'll give it a try.

Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Titanic » 18 Oct 2012 16:52

I've checked it with last nightly build (2.1.0) for x86 and x64 and both are not working as expected with the miface parameter. Any ideas?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Jean-Baptiste Kempf » 18 Oct 2012 18:21

You will have to do it yourself, I am afraid.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby Titanic » 19 Oct 2012 08:39

If I need Win x86 and x64 builds, best way to achive this is using Ubuntu and mingw-x64_beta3.0 I assume.

mvelkavrh
New Cone
New Cone
Posts: 1
Joined: 08 Nov 2012 21:40

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby mvelkavrh » 08 Nov 2012 22:58

I agree with quite few things posted by r21514.

I have the same problem and i find it quite ignorant.

This was posted as a bug at before and dismissed. I've posted it again with the same result and without any helpful advice:
https://trac.videolan.org/vlc/ticket/7707

The explanation stated in release notes is by no means useful, at least not for Windows user where there are no such things as eth0... I've tried with network adapter "names", IPs, numbers. Nothing.

It seem we'll have to stick to 1.1.11.

However, I would expect different attitude towards users. It doesn't seem very reasonable also and I didn't expect something like that.

I hope it will be addressed in the future and I wish all the best to VideoLAN an VLC, probably the best in its field.

Regards, Marko

tttonyyy
New Cone
New Cone
Posts: 1
Joined: 18 Apr 2013 15:40

Re: miface option doesn't work in VLC 2.0.x on Windows

Postby tttonyyy » 18 Apr 2013 15:47

On Linux I tested it working as this: --miface="eth1" to use my second network card.

On Windows as observed above - it does nothing.

However there is a quick fix for Windows - under

Network Connections -> Local Area Connect 2 -> Properties -> Internet Protocol (TCP/IP) -> Properties -> Advanced

...there is an "Interface metric" box. Untick auto, and set your metric to 1 on the interface you want VLC to use, then go back out and do the same for the interface you don't want VLC to use, but set it to 2.

If you run wireshark you'll see that VLC's IGMP joins/leaves are sent on the interface with the lower metric and things should start working again :mrgreen:


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 27 guests