Skip to content

Missing udp socket for host during streaming image #12518

Closed
@PiaskOOO

Description

@PiaskOOO

Windows Version

Windows 10 [Version: 10.0.19045.5371]

WSL Version

2.3.26.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

when try to stream an image from camera on wsl2, the system does not receive udp data packets. The problem is related to the lack of access to the udp protocol on wsl2. I use the following code to stream the image:

`
color_command = "rtspsrc location=rtsp://192.168.1.10/color latency=30 ! rtph264depay ! avdec_h264 ! videoconvert ! appsink drop=true max-buffers=2"
color_stream = cv2.VideoCapture(color_command)

while True:
ret, frame = color_stream.read()

if not ret:
    print("Unable to pull color image.")
    break

cv2.imshow("Podgląd kamery", frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
    break

color_stream.release()
cv2.destroyAllWindows()
`

Adding the "protocols=udp" variable to color_command causes an error in running the code. Streaming with use the "protocols=tcp" variable works and the image is streame. The streaming function works for a certain period of time until the host is ask for a udp socekts from camera. After receiving no udp sockets program dies

Expected Behavior

receiving image from camera using udp protocol on wsl2 and accessing udp protocol

Actual Behavior

program try to access to udp sockets through 5 seconds and after this time program use tcp protocols to streaming. When program streams 36 sekonds again try to pick up udp protocols and connection refused because wsl2 missing this protocol

Diagnostic Logs

I tried to open the image directly from the camera using vlc. During playback, the same problem occurred as with the Python code. I am attaching the read logs from the image reception process in a file. Additionally, using wireshark I checked what protocol VLC uses. When streaming directly through Windows, VLC uses udp all the time. When streaming on wsl2, for the first 5 seconds the program tries to receive packets with udp, but then switches to tcp. After 36 seconds of streaming it tries to use udp again and after no access to it the transmission turns off. I am attaching the logs received from VLC on wsl2.

Log VLC.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions