<div dir="ltr"><div>A couple of major corrections. Please ignore previous mail as it had at least two serious errors/mix-ups.<br></div><div><br></div><div><div>Couple of questions to help you out. I assume you have two interfaces<br></div><div><br></div><div>1) What is the IP source address of the stream you are seeing with Wireshark, but not receiving with udpsrc?</div><div>2) What is the interface you are seeing the stream coming in on?<br></div><div>3) What is your routing table saying for routing to the source address in 1)</div><div><br></div><div><b><u>Now assume your host with multiple interfaces is Linux</u>.</b> If it is not, then much of the text below may or may not apply. If it is Windows, I don't care.<br></div><div><br></div><div>You
 (applications) will by default not get UDP packets from X seen/received
 on interface B from your IP stack if your routing table says the 
address X is reachable via interface A.</div><div><br></div><div>By 
default a linux host with multiple interfaces has a single shared 
routing table. If you want to use a single shared routing table and are 
seeing packets from X on interface B while your routing table says X is 
reachable through interface A, then change your routing table so you reach X via B or make 
sure the packets are coming in on interface A instead of interface B. Basically make sure UDP packets are arriving on the interface the source address is reachable via.<br></div><div><br></div><div>If
 that is not possible, use Google to discover how to setup multiple 
routing tables on a single linux host. That way you can define 
an individual routing table for interface A and define another routing 
table for interface B. That way you can define that packets from X can 
arrive on interface B while you prefer reaching X via interface A. If 
this is how you want it, then you may add to your routing table for 
interface B that X can be reached via B (set metric so interface A is 
still preferred for reaching X, if that is what you want). You may want 
to configure it so traffic sent from X to IP address of B is responded 
to X via interface B (and not A) even though your linux host may overall prefer to 
reach X via interface A.<br></div><div><br></div><div>Please note, just 
adding a secondary routing entry with a higher metric for destination X 
via interface B while maintaining a preferred routing with lower metrix 
via interface A for reaching destination X, <b>WILL NOT HELP YOU</b>.</div><div> </div><div><br></div><div>So either change routing (keeping one routing table) or setup individual routing tables for each interface.</div><div><br></div><div>Best</div><div>Regards</div><font color="#888888"><div>Peter Maersk-Moller</div></font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 28, 2021 at 7:31 PM Peter Maersk-Moller <<a href="mailto:pmaersk@gmail.com">pmaersk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Couple of questions to help you out. I assume you have two interfaces<br></div><div><br></div><div>1) What is the IP source address of the stream you are seeing with Wireshark, but not receiving with udpsrc?</div><div>2) What is the interface you are seeing the stream coming in on?<br></div><div>3) What is your routing table saying for routing to the source address in 1)</div><div><br></div><div><b><u>Now assume your host with multiple interfaces is Linux</u>.</b> If it is not, then much of the text below may or may not apply.</div><div><br></div><div>You (applications) will by default not get UDP packets from X seen/received on interface B from your IP stack if your routing table says the address X is reachable via interface A.</div><div><br></div><div>By default a linux host with multiple interfaces has a single shared routing table. If you want to use a single shared routing table and are seeing packets from X on interface B while your routing table says X is reachable through interface A, then change your routing table or make sure the packets are coming in on interface A instead og interface B</div><div><br></div><div>If that is not possible, use Google to discover how to setup multiple routing tables on a single linux host. That way you can define individual routing table for interface A and define another routing table for interface B. That way you can tell that packets from X can arrive on interface B while you prefer reaching X via interface A. If this is how you want it, then you may add to your routing table for interface B that X can be reached via X (set metric so interface A is still preferred for reaching X, if that is what you want). You may want to configure it so traffic send from X to IP address of B is responded to via interface B even though your linux host may overall prefer to reach X via interface A.<br></div><div><br></div><div>Please note, just adding a secondary routing entry with a higher metric for destination X via interface A while maintaining a preferred routing with lower metrix via interface A for reaching destination X, <b>WILL NOT HELP YOU</b>.</div><div> </div><div><br></div><div>So either change routing (keeping one routing table) or setup individual routing tables for each interface.</div><div><br></div><div>Best</div><div>Regards</div><div>Peter Maersk-Moller<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 28, 2021 at 6:55 PM kepitto <<a href="mailto:kepitto@outlook.com" target="_blank">kepitto@outlook.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've tried a lot of stuff, but I can't seem to get it to work. (Same problem<br>
exists with ffmpeg/vlc)<br>
<br>
Basically, I can't get the UDP Stream directly into a videotool. I can<br>
verify the data coming in through tcpdump/wireshark etc. and i can also<br>
create the videofiles through gstreamer/ffmpeg afterwards, but I can't use<br>
the udp source as input.<br>
<br>
The current setup is the following:<br>
The camera streams MJPEG through UDP to a fixed address & port. I port<br>
mirrored the data from the camera, so that I can verify the data coming in<br>
through wireshark on a 3rd device.<br>
<br>
The reason behind doing this is that multicast is not supported, so I need a<br>
way to get the data on 2 devices through unicast. Port mirroring seemed like<br>
a viable solution.<br>
<br>
Am I missing something here? What do I need to do to get this working?<br>
I thought maybe it's due to the two networkinterface setup as I use 1x usb<br>
to ethernet for the port mirror and 1x ethernet for the web, but<br>
disconnecting the other shows no difference.<br>
The routing seems correct too: "ip route get camera.ip" returns that the<br>
routing is through the usb to ethernet on my static ip.<br>
<br>
Example of an attempt:<br>
<br>
Gst-launch-1.0 udpsrc port=streamingport(confirmed through wireshark) !<br>
jpegdec ! videorate ! video/x-raw,framerate=30/1 ! autovideosink (does not<br>
work)<br>
<br>
Gst-launch-1.0 filesrc location=hexdumpfile.txt ! jpegdec ! videorate !<br>
video/x-raw,framerate=30/1 ! autovideosink (does work)<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>
</blockquote></div>