You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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:
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!
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.
Uh oh!
There was an error while loading. Please reload this page.
Windows Version
Windows 10 [Version: 10.0.19045.5371]
WSL Version
2.3.26.0
Are you using WSL 1 or WSL 2?
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()
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
The text was updated successfully, but these errors were encountered: