schaazzz
schaazzz

Reputation: 568

GStreamer multicast using IPv6 over a specific network interface

I'm relatively new to this topic so there might be some fundamental gap in my knowledge, but I am trying to use GStreamer to send an MPEG2-TS stream to an embedded device using IPv6 (on Windows 10). The embedded device is connected via a USB-Ethernet adapter to a media converter (RJ45 -to- BroadR-Reach).

If I use IPv4 to broadcast (e.g. 192.168.1.255), everything works fine. I can receive the stream on the device without any problems. A sample command that works:

gst-launch-1.0.exe -v filesrc location=d:/video.ts do-timestamp=false ! \ "video/mpegts, systemstream=(boolean)true, packetsize=(int)188" ! \ tsparse set-timestamps=true ! rtpmp2tpay mtu=1200 pt=127 ! \ udpsink host=192.168.1.255 port=5001

Now I need to do this with IPv6 via multicast and I can't figure out how!

Assuming the IPv6 address of the embedded device is fe80::1:2:3 and the IPv6 address of the Ethernet interface on the PC is fe80::1:2:4. Which address do I use as multicast? I already tried ff0x::1:2:4 and ff1x::1:2:4 (where x=1,2,3), but the data is transmitted over my computer's main network interface (e.g. WiFi interface, this was checked using Wireshark).

If I try to add the option of multicast-iface, GStreamer gives the following error:

Could not join multicast group: Error joining multicast group: The requested address is not valid in its context.

Upvotes: 0

Views: 1218

Answers (1)

schaazzz
schaazzz

Reputation: 568

Ok, so after posting similar questions to various mailing lists and forums, I've learned that you can't bind to an interface this way and additionally, multicast traffic is always routed through interface with the lowest metric. So the only possibility to achieve what I wanted is to:

  • Play around with the metrics of the interfaces in question
  • Add a route for the required address range
  • Somehow force all traffic from GStreamer through the required interface (e.g. ForceBindIP)

Since I couldn't make any permanent changes to the Windows machine vis-a-vis the network routes/metrics, I went with a modified version of the 3rd option, i.e. a VirtualBox virtual machine running GStreamer on Linux with the USB-Ethernet adapter setup as the only active network interface.

Upvotes: 0

Related Questions