Apr 7, 2020

Using a video capture usb stick with Linux / Ubuntu

Three weeks ago i ordered a video capture usb stick at banggood and today it arrived:




So will this device work with my ubuntu?

I inserted the stick on my laptop and dmesg showed:

[123483.143071] hid-generic 0003:534D:0021.0002: hiddev0,hidraw1: USB HID v1.10 Device [MACROSILICON AV TO USB2.0] on usb-0000:00:14.0-1/input4

That was all...
But there was a module missing:

modprobe uvcvideo
and after that:
[125822.751366] usb 1-1: new high-speed USB device number 19 using xhci_hcd
[125822.901442] usb 1-1: New USB device found, idVendor=534d, idProduct=0021
[125822.901449] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[125822.901454] usb 1-1: Product: AV TO USB2.0
[125822.901458] usb 1-1: Manufacturer: MACROSILICON
[125822.901478] usb 1-1: SerialNumber: 20150130
[125822.902702] uvcvideo: Found UVC 1.00 device AV TO USB2.0 (534d:0021)
[125822.902835] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[125822.904681] uvcvideo 1-1:1.0: Entity type for entity Processing 2 was not initialized!
[125822.904691] uvcvideo 1-1:1.0: Entity type for entity Camera 1 was not initialized!
[125822.911070] hid-generic 0003:534D:0021.0004: hiddev0,hidraw1: USB HID v1.10 Device [MACROSILICON AV TO USB2.0] on usb-0000:00:14.0-1/input4
Checking with
root@zerberus:~# ffmpeg -sources |grep video
Auto-detected sources for video4linux2,v4l2:
  /dev/video1 [AV TO USB2.0]
  /dev/video0 [HD WebCam: HD WebCam]
plus:
root@zerberus:~#  ffmpeg -list_formats all -i /dev/video1

[video4linux2,v4l2 @ 0x55b0d1ca38c0] Compressed:       mjpeg :          Motion-JPEG : 480x320 640x480 720x480
[video4linux2,v4l2 @ 0x55b0d1ca38c0] Raw       :     yuyv422 :           YUYV 4:2:2 : 480x320
/dev/video1: Immediate exit requested

Now i was able to open /dev/video1 with VLC:



The video came from a camera connected via TS832 --[5.8GHz]--> RC832...





5 comments:

  1. Im trying to use this same device with a raspberry pi, I get the same output in dmesg except the hid-generic line. A video device is created, but streaming from video0 gives me a black square. I'm wondering if its the kernel version being 5.1 and not higher

    ReplyDelete
  2. Igot VLC to display video from the VCR player. How do I get VLC to display the audio?

    ReplyDelete
  3. Hallo Dietrich,

    I try easycap (534d:0021) with composit and s-video (on ubuntu (xeni/bio))
    but i received disorted pictures only.
    (it smells like wrong codec)
    Can you complete your page with following informations:
    cat /etc/debian_version
    uname -r
    lsmod | grep vid
    vlc --version | head -1
    vlc:video/tools/codec-informations


    regards Hans

    ReplyDelete
  4. Hallo Dietrich,

    I tried a similar gadget, getting ALMOST the same output with dmesg. In particular the last three rows are:

    [ 1936.166878] uvcvideo: Found UVC 1.00 device AV TO USB2.0 (534d:0021)
    [ 1936.167055] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
    [ 1936.172931] hid-generic 0003:534D:0021.0004: hiddev0,hidraw0: USB HID v1.10 Device [MACROSILICON AV TO USB2.0] on usb-0000:00:14.0-2/input4

    But things start working in a different way when trying with ffmpeg:

    Auto-detected sources for video4linux2,v4l2:
    /dev/video3 [Metadata 3]
    /dev/video2 [Video Capture 3]
    /dev/video1 [Metadata 5]
    /dev/video0 [Video Capture 5]

    Here I see nothing referrable to my USB stick

    P.s.: Ubuntu 18.04LTS on a Lenovo Thinkpad, Kernel version 5.4.0-104-generic


    ReplyDelete
  5. Note: This device is plug-and-play on Slackware Linux with the v6 kernel.

    Mine identified thus:

    usb 1-4: new high-speed USB device number 30 using xhci_hcd
    usb 1-4: New USB device found, idVendor=534d, idProduct=0021, bcdDevice= 1.21
    usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    usb 1-4: Product: AV TO USB2.0
    usb 1-4: Manufacturer: MACROSILICON
    usb 1-4: SerialNumber: 201****0
    usb 1-4: Found UVC 1.00 device AV TO USB2.0 (534d:0021)
    usb 1-4: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
    hid-generic 0003:534D:0021.000F: hiddev96,hidraw1: USB HID v1.10 Device [MACROSILICON AV TO USB2.0] on usb-0000:00:14.0-4/input4

    Afterwards appeared at /dev/video2 and /dev/video3, /0 and one being used by my ThinkPad's built-in webcam.

    ReplyDelete