Application to view images from a web cam?


DAP

Member
Joined
Aug 29, 2008
Messages
432
I bought a cheap USB Endoscope, and I'd like to use the Pandora as a display for it, but I have been unable to find an application that will do that. Something like "Cheese" would be sufficient, but I have not found that for the Pandora.
Can someone suggest something equivalent?
Thanks.
 
Both VLC and SMPlayer2 seem to want video files, and don't seem to know what to do with a camera.
"Camera" just does not run on my pandora. It fails silently. no window ever opens.
 
Both should have a method of using a USB camera as a capture device.
 
@DAP I'll try to explain how I use it.

First of all, you need a camera that does USB2 (or can go down from USB3 to USB2, or you have a real USB2 hub connector that allows 1.1 and transmits it as USB2).

Step 2 is to connect everything to your usb port. ONLY THEN enable USB.

Now drop down to the commandline and type "dmesg". Check that you have something successful, like "input: USB2.0 camera as /devices/..." and "usbcore: registered new interface..."

If so, open up VLC (I use the old one) and CONTROL+C this will open up the capture device screen, and the PLAY button is just out of screen. So while pressing shift, with the stylus do a flick of the wrist like you do when you cast "Windgardium Leviosa" (drag the screen up to reveal the bottom).
Do not input anything, just go with the defaults and press "play".
 
Both VLC and SMPlayer2 seem to want video files, and don't seem to know what to do with a camera.
"Camera" just does not run on my pandora. It fails silently. no window ever opens.
Crud. Do you have the Community Codec Pack installed? You need mplayer for the PND to work. It's just a shell script so it should still work, hopefully.
 
Crud. Do you have the Community Codec Pack installed? You need mplayer for the PND to work. It's just a shell script so it should still work, hopefully.
Yes, the Community Codec Pack is installed.

If so, open up VLC (I use the old one) and CONTROL+C this will open up the capture device screen, and the PLAY button is just out of screen. So while pressing shift, with the stylus do a flick of the wrist like you do when you cast "Windgardium Leviosa" (drag the screen up to reveal the bottom).
Do not input anything, just go with the defaults and press "play".
When I do this, I get the following error message:
Your input cant be opened:
VLC is unable to open the MRL 'v4l2://'. Check the log for details.

The camera is a USB High Speed device, it has a USB type C connector, even though it is no a super speed device. I am using it with a USB-C to USB A adapter.
It shows up as "/dev/v4l/by-id/usb-lihappe8_Corp._USB_2.0_Camera-video-index0".
This is the camera:
 
Ok. Strange. I have a digital microscope and a logitec webcam and both do not require extra stuff... so I suspect we are missing some firmware. What does the dmesg say and su to root and "lsmod"
 
I just tried a webcam with the Camera PND, and it didn't work. Apparently /dev/video0 is missing. I suspect the case is the same for DAP, which would explain why it's not working. It's possible firmware is missing, yeah. Although, the webcam is logitech, it's very old so maybe it doesn't support UVC.
 
Probable typeoes here as I am attempting to manually type in these responses. (I'm posting on my desktop, the Pandora is not really convenient for web browsing unless a desktop can't be had)
relevant results from mhesg:
Code:
[256293.718872] usb 1-2.4: new full-speed USB device number 3 using ehci-omap
[I think this is a timestamp, so I won't be repeating it] usb 1-2.4: new high-speed USB device number 4 using ehci-omap
[] usb 1-2.4: New USB device found, idVendor=038f, idProduct =6001
[] usb 1-2.4: New USB device strings: Mfr=1 Product=2 SerialNumber=0
[] usb 1-2.4: Product: USB 2.0 Camera (038f:6001)
[] usb 1-2.4: Manufacturer: lihappe8 Corp.
[] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (038f:6001)
[] input: USB 2.0 Camera as /devices/platform/usbhs-omap.0/echi-omap.0/usb1/1-2/1-2.4/1-2.4:1.0/input/input18

sudo lsmod (abridged)
Code:
Module                                    Size             Used by
uvcvideo                                   64509           0
videobuf2_core                             29931           1 uvcvideo
v4l2_common                                 4593           1 videobuf2_core
videodev                                  104138           3 uvcvideo,videobuf2_core,v4l2_common
media                                      10300           2 uvcvideo,videodev
videobuf2_vmalloc                           2363           1 uvcvideo
videobuf2_memops                            1242           1 videobuf2_vmalloc
 
Last edited:
Don't know if we have mjpeg-streamer but searching on web i found this page https://github.com/foosel/OctoPrint/wiki/Webcams-known-to-work
it says:

Chinese Endoscope 8mm
038f:6001
-r HD -f 30
Tested on Raspberry Pi 3 with OctoPi 0.13.0 - michalzielanski
[doublepost=1515364928,1515364492][/doublepost]another suggestion here https://pyra-handheld.com/boards/th...ebcam-feed-to-the-network.72644/#post-1248305

 
I already know this camera works with linux. It works on my desktop with Cheese, hence my request for something similar to Cheese for the Pandora. On my desktop, I only need to plug in the camera, run Cheese (or one of the other web cam apps available for linux mint, but not available for the pandora), select that particular USB web cam from a drop down menu, and I am displaying a picture.
But I can't really haul my desktop where an endoscope would prove useful (crawl space under my house etc), hence the need for some application on the Pandora.

BTW, "using the TV address" What TV address? what is the syntax? Where do you put this in the VLC application?
 
Last edited:
@DAP You are missing the last step?
[] usbcore: registered new interface driver uvcvideo

You said it worked on your Linux system. Reboot that system, do a "lsmod > /tmp/before.txt", plug it in and do a "lsmod > /tmp/after.txt" diff the files, see if you see a string that is similar in name to one of the /lib/firmware/*.fw files, copy that one over to the Pandora if not available (preserve subdirectories).

In /lib/udev/* are the binaries that check devices and /lib/udev/rules.d/* has the rules that make the /dev/* files (/dev/v4l/by* in our case) pointing to the device.
you can manually modify these rules (to hardcoded add something like ATTR{idVendor}=="038f", ATTR{idProduct}=="6001", ..... /dev/v4l/{...}/...) but that is not necessary, as it shows up as "/dev/v4l/by-id/usb-lihappe8_Corp._USB_2.0_Camera-video-index0".


Firmware (note that the DVB*.fw are TV dongles):
https://github.com/LibreELEC/dvb-firmware/tree/master/firmware


Using the TV:// see: https://github.com/TheImagingSource/tiscamera/wiki/Linux-Support-for-USB-Cameras
 
lsmod diff is not very enlightening
Code:
$ diff Controllsmod.txt testlsmod.txt
90c90
< usb_storage            69632  2 uas
---
> usb_storage            69632  1 uas
I did verify that the camera does still work with Cheese.

I tried vlc, but vlc chose to use the other web cam I have installed, and I did not see how to tell vlc to use this one. (it is inconvenient to disconnect the other camera)

lsusb has lots to say about this camera:
Code:
Bus 009 Device 016: ID 038f:6001 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x038f
  idProduct          0x6001
  bcdDevice            5.38
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          629
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0
      iFunction               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0
      iInterface              4
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength           79
        dwClockFrequency       30.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                28
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 6
        guidExtensionCode         {b0d0bb68-a461-834b-90b7-a6215f3c4f70}
        bNumControl            24
        bNrPins                 1
        baSourceID( 0)          2
        bControlSize            3
        bmControls( 0)       0xff
        bmControls( 1)       0xff
        bmControls( 2)       0xff
        iExtension              0
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x00000000
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier          0
        bControlSize            2
        bmControls     0x0000157f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          White Balance Temperature
          Backlight Compensation
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0
        bmVideoStandards     0x 9
          None
          SECAM - 625/50
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               2
        iTerminal               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               7
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              4
      VideoStreaming Interface Descriptor:
        bLength                            15
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         2
        wTotalLength                      439
        bEndPointAddress                  130
        bmInfo                              0
        bTerminalLink                       3
        bStillCaptureMethod                 2
        bTriggerSupport                     1
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                    27
        bmaControls( 1)                    27
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                6
        guidFormat                            {59555932-0000-1000-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 2 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                147456000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                 48660480
        dwMaxBitRate                 48660480
        dwMaxVideoFrameBufferSize      202752
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 36864000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                  9216000
        dwMaxBitRate                  9216000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                442368000
        dwMaxBitRate                442368000
        dwMaxVideoFrameBufferSize     1843200
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           960
        dwMinBitRate                589824000
        dwMaxBitRate                589824000
        dwMaxVideoFrameBufferSize     2457600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
      VideoStreaming Interface Descriptor:
        bLength                            11
        bDescriptorType                    36
        bDescriptorSubtype                  6 (FORMAT_MJPEG)
        bFormatIndex                        2
        bNumFrameDescriptors                6
        bFlags                              1
          Fixed-size samples: Yes
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 1 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                221184000
        dwMaxBitRate                221184000
        dwMaxVideoFrameBufferSize      921600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                 72990720
        dwMaxBitRate                 72990720
        dwMaxVideoFrameBufferSize      304128
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 55296000
        dwMaxBitRate                 55296000
        dwMaxVideoFrameBufferSize      230400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                 13824000
        dwMaxBitRate                 13824000
        dwMaxVideoFrameBufferSize       57600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                663552000
        dwMaxBitRate                663552000
        dwMaxVideoFrameBufferSize     2764800
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           960
        dwMinBitRate                884736000
        dwMaxBitRate                884736000
        dwMaxVideoFrameBufferSize     3686400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            14
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               2
        wWidth( 0)                       1280
        wHeight( 0)                       960
        wWidth( 1)                       1280
        wHeight( 1)                       720
        bNumCompressionPatterns             2
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0c00  2x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1

My desktop handles the /dev directory very differently than Pandora. The two cameras show up as /dev/video0 and /dev/video1
 
Back
Top