Skip to content

mdns discovery of chromecast intermittently fails [Windows]

Intermittently VLC running on Windows 11 21H2 (I also had this issue previously on Win10 21H2) is unable to discover my the Chromecast built into my Vizio smart tv.

I was able to replicate the problem tonight and took a network capture. I saw the mdns queries being sent from my PC, but no responses. 19586 177.460636 192.168.1.76 224.0.0.251 MDNS 72 Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question

At the same time, from Edge (Chromium under the hood) I was able to successfully discover and cast to the TV. From the trace it looks like Edge is using SSDP instead of mdns to discover the TV, so that's a mystery solved.

I saw there were several open-and-now-closed issues e.g. #17477 (closed) and #17666 (closed) that described issues with mdns resolution on multihomed systems and my PC does have several network interfaces. Looking at the Wireshark again though, I saw the mDNS request being sent on both the Interface id: 6 (\Device\NPF_Loopback) and my Wifi Interface id: 3 (\Device\NPF_{F1E96286-ECD7-412F-821E-0118A2CD1355}) so I don't think that's it.

Poking around on the internet, I found this page https://forum.videolan.org/viewtopic.php?f=14&t=145455&p=486026&hilit=renderer#p486026 that suggested opening a network stream for udp://@224.0.0.X:5000 where x is between 100 and 199, waiting a bit, and then trying discovery again. Shockingly, that worked.

... But why did it work? Good question.

It's notable here that I didn't see any mdns responses before I did the open stream trick. There's a lot of kit on my network, and I normally see dozens of mDNS responses per minute. After the trick, I started seeing them in the trace again and I can see the mDNS discovery reply from the TV.

I don't have a solid understanding of Multicast and IGMP, so I'm asking this in ignorance. Do we have to do something special on Windows when opening a socket to "request" or "subscribe" to multicast streams and be able to see mDNS replies?

This reproduces infrequently for me, so I'll baby-sit this until it happens again and get a trace of what exactly is happening when I do the open UDP stream trick. If possible, I'll also get a simultaneous trace from a third machine to confirm if my mDNS requests are really being sent and if the TV is replying and I'm just not receiving it.

When I get a repro, what other information can/should I provide besides network traces?

Thanks! Elizabeth Greene

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information