Skip to content

Missing udp socket for host during streaming image #12518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 2 tasks
PiaskOOO opened this issue Jan 29, 2025 · 2 comments
Closed
1 of 2 tasks

Missing udp socket for host during streaming image #12518

PiaskOOO opened this issue Jan 29, 2025 · 2 comments

Comments

@PiaskOOO
Copy link

PiaskOOO commented Jan 29, 2025

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

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant