Linux Tips - Record Video from USB Camera in WSL (2022)

preview_player
Показать описание
Record a video using a USB camera or webcam in Windows Subsystem for Linux (WSL).
WANT TO SUPPORT?

---
00:00 Introduction
00:46 USBIPD-WIN
01:31 Attach a USB device to WSL
03:03 Build WSL2 kernel with usb-camera driver
06:43 Using custom kernel in WSL2 (.wslconfig)
07:22 Attach and use the USB camera to WSL
08:18 Record video in WSL
---

💻 Connect USB devices on WSL:

💻 WSL2 Linux Kernel:

📝 Commands and configs:

▶️ Use Ext4 USB Drive in WSL:

▶️ Window Docking on Windows 11 & 10:

●▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬●
👨‍👩‍👧‍👦 Social:
●▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬●
🎮🕹️🐭 Snappy Mouse Run:
●▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬●

#camera #usb #wsl
Рекомендации по теме
Комментарии
Автор

You're a freaking legend. I tried everything before kernel build. ty!

cinvoke
Автор

Worked for me on a RealSense camera too. Thank you so much for this tutorial!

serenefeng
Автор

Very helpful. Thanks!

I've encountered an issue while executing `sudo make -j$(nproc)`: 'bc is not found'

I had to do a `sudo apt install bc` because bc was not installed on my system.

manofvulture
Автор

This was super helpful for my ROS project, thank you!

One thing I will note is that I had to chown the /dev/video* from root to my username and then run guvcview instead of sudo guvcview to make it work.

vigneshedithal
Автор

beautiful! it was super helpful to me. I was struggling to add a usb camera to klipper inside WSL. Now i can monitor my 3D printing devices properly! After that i've installed crownest that did the job. Thank you!

imprimindoideiasemd
Автор

Thanks man, it works good! Love your guide

penglu
Автор

Worked for me. Thank you so much man it would've taken me forever to figure this shit out on my own lmao

natedog
Автор

thanks man you are the best coder of the world

mfs
Автор

Thanks man, it was super helpful! Love your videos!

hahungle
Автор

thank you very much, it worked flawlessly

rfreh_iwnl
Автор

Im getting "ls: cannot access '/dev/video*' : no such file or directory" anyone fix this issue?

Baylison
Автор

Was fun but the fact that I had to build a linux kernel in order to get my webcam to work speaks a lot

NaipiaGaming
Автор

Excuse me sir. When I followed all your steps and reached 7:30 I tried ls -al /dev/video* but it still say cannot access. What may be the possible cause to this?

__-ydpm
Автор

I have followed the tutorial, and rebuilt the kernel but I still can't use my usb camera on linux. I can see /dev/video0 and /dev/video1, but I can never access it with any program (guvcview, cheese, opencv). The closest I got was after changing the ownership and permissions of the /dev/video*, if I try to run some example cv2.VideoCapture code I can see the light on the camera light up, but nothing happens, and after a few seconds it times out. Any idea what's wrong?

ahmadalkhateeb
Автор

Cool!
I will make a real practice on my machine

ElinLiu
Автор

Thank you very much for this tutorial, but in my pc i am able to run my webcam in wsl but after that i am facing a new ereor that says ""V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable Segmentation fault"" Please help me to debug this 😢

yashdhakade
Автор

Interesting video. My webcam works with gucview but no with cheese or opencv .... Any idea why?

khoroshyypetro
Автор

Hi the camera seems working with " sudo guvcview", but when i try to capture the video from open cv, the camera light up, but after a while it output timeout and does not capture any video, any Idea why?

marco
Автор

Could you please illustrate how to enable Realtek 8811cu wireless USB card in WSL? I have tried to config the latest 5.15 kernel and 6.1 kernel but still can't make it work.

Slybabyfox
Автор

Made this can I use the webcam with python and opencv ?

matheus