Wednesday, August 3, 2022

Diamond VC500 Video Capture in Linux

 I wanted to do some video capture, and a local place had a Diamond VC500.  I ordered one off of Amazon, and it flat out didn't work.  The Windows 10 installation just gave me a black screen all the time.  Troubleshooting failed, even though I hooked the same old camcorder device up to an RCA TV and it displayed fine there, so I new it was device-specific.  I hooked it up in Linux, and it told me there was no signal on the composite using the v4l command to check it:

    v4l2-ctl --get-fmt-video -d /dev/video0 --all

Amazon's return policy was a life saver.  I had them send me a replacement.

 I tried WIndows 10 again (because that was the native driver supported by the company and... it just gave me a black screen again, no matter what I tried to do.  It just wouldn't work.

Since Linux had given me the no hsync error on the previous device, I decided to try that one and see if it gave me anything different.  I booted into Linux, and ran the command again.  I was a little bit shocked to see the "Video input : 0 (Composite1: ok)" message glaring me in the face :

    
    ┌──(username@hostname)-[~]
    └─$ v4l2-ctl --get-fmt-video -d /dev/video0 --all         
    Driver Info:
            Driver name      : cx231xx
            Card type        : Geniatech OTG102
            Bus info         : usb-0000:01:00.0-4
            Driver version   : 5.18.5
            Capabilities     : 0x85200011
                    Video Capture
                    VBI Capture
                    Read/Write
                    Streaming
                    Extended Pix Format
                    Device Capabilities
            Device Caps      : 0x05200001
                    Video Capture
                    Read/Write
                    Streaming
                    Extended Pix Format
    Priority: 2
    Video input : 0 (Composite1: ok)
    Video Standard = 0x00001000
            NTSC-M
    Format Video Capture:
            Width/Height      : 720/480
            Pixel Format      : 'YUYV' (YUYV 4:2:2)
            Field             : Interlaced
            Bytes per Line    : 1440
            Size Image        : 691200
            Colorspace        : SMPTE 170M
            Transfer Function : Default (maps to Rec. 709)
            YCbCr/HSV Encoding: Default (maps to ITU-R 601)
            Quantization      : Default (maps to Limited Range)
            Flags             : 
    Crop Capability Video Capture:
            Bounds      : Left 0, Top 0, Width 720, Height 480
            Default     : Left 0, Top 0, Width 720, Height 480
            Pixel Aspect: 11/10
    Selection Video Capture: crop_default, Left 0, Top 0, Width 720, Height 480, Flags: 
    Selection Video Capture: crop_bounds, Left 0, Top 0, Width 720, Height 480, Flags: 
    Streaming Parameters Video Capture:
            Frames per second: 29.970 (30000/1001)
            Read buffers     : 2
    
    User Controls
    
                         brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=128 flags=slider
                           contrast 0x00980901 (int)    : min=0 max=127 step=1 default=64 value=64 flags=slider
                         saturation 0x00980902 (int)    : min=0 max=127 step=1 default=64 value=64 flags=slider
                                hue 0x00980903 (int)    : min=-128 max=127 step=1 default=0 value=0 flags=slider
                             volume 0x00980905 (int)    : min=0 max=65535 step=655 default=60928 value=60928 flags=slider
                            balance 0x00980906 (int)    : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                               bass 0x00980907 (int)    : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                             treble 0x00980908 (int)    : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                               mute 0x00980909 (bool)   : default=0 value=0
                                                                                                                                                                     
    ┌──(username@hostname)-[~]
    └─$
    

 So I launched VLC to see if I could see it.  It gave me video, but it wasn't the greatest :

I've never  captured using VLC, so this would be a learning curve.  Since it only worked in Linux, it was my only option.  I've got to figure this one out.  First, let's find the devices we need to use with two commands, "sudo dmesg|grep cx231xx|grep 'Registered video device'" and "arecord -l" :

    ┌──(username@hostname)-[~]
    └─$ sudo dmesg|grep cx231xx|grep 'Registered video device'
    [ 221.933201] cx231xx 1-4:1.1: Registered video device video0 [v4l2]
    
    ┌──(username@hostname)-[~]
    └─$ arecord -l **** List of CAPTURE Hardware Devices **** card 1: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Generic [HD-Audio Generic], device 2: ALC1220 Alt Analog [ALC1220 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Cx231xxAudio [Cx231xx Audio], device 0: Cx231xx Audio [Conexant cx231xx Capture] Subdevices: 0/1 Subdevice #0: subdevice #0 ┌──(username@hostname)-[~] └─$

With those devices known (video0 and card 2 are identifying the cx231xx / OTG102 / Diamond VC500 video captuire device), we can configure VLC for a capture.  Use "Video camera" for the capture mode, and set the device to match (it should have the same thing from the dmesg output above, with a /dev/ added to the front of it).  The audio is a little more difficult - the arecord -l showed the cx231xx device on "card 2".  So, in the audio device name, find the hw:2,0 card.  Set the video standard to an appropriate setting (I'm doing this inside the US, so I went with "NTSC M.  You can click on "play" to test it.  Once you are good with the settings, do it all over, and instead of clicking play, click the little arrow beside it and click on the "Convert" option.

Unfortunately, it absolutely failed.  It [sort of] had a video signal.  This Diamond VC500 really can't function well.  Perhaps it is a USB interface issue, but I'm kind of giving up (I used a USB 3.0 interface, maybe that capable was bad).

So, I'm now trying an HDMI converter and an HDMI capture device.  The converter picks up the signal well enough, so now it's a matter of checking the capture device when it gets here.

If that doesn't pop open a convert window, close VLC and re-start it, then get to the convert option again, it should pop open the convert window.  Click on "browse", and select a filename.  Change the profile to something with a 720x480, since that is what the v4l2-ctl command revealed as resolution for this card above.  Then just click on start, and then press play on your VCR or camcorder.

When done, click the stop button on the VCR and then the stop button in VLC.  You should now be able to find your file and play it like any other media file!

No comments:

Post a Comment