Author Topic: WebCam Driver Question  (Read 62770 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
WebCam Driver Question
« on: January 18, 2021, 08:33:20 pm »
Hi

I'm sorry to ask this again but there are some things that sometimes do not get to well stored in my mind.

I used to test the webcam in my Thinkpad L420 with Wim's "USBECD".  I just put this on the config.sys "DEVICE=X:\OS2\BOOT\USBECD.SYS /D:05C8:0317:#### /N:$CHICON$" and used the software to show image from the camera.

But at some point I got confused on other forum posts, that you no longer needed USBECD.SYS with "UVC Webcam Support".  Does "UVC Webcam Support" uses USBRESMG.SYS as driver for the webcam? or do I still need USBECD.SYS? or it depends on the webcam model?

I would appreciate some explanation that will help me with my confusion, since on the last two years I haven't been testing any webcams on ArcaOS.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Wim Brul

  • Sr. Member
  • ****
  • Posts: 300
  • Karma: +26/-0
    • View Profile
    • Wim's home page
Re: WebCam Driver Question
« Reply #1 on: January 19, 2021, 02:09:23 pm »
Hi Martin,

When I started developing webcam support I produced USB Webcam Tests that required usbecd.sys in order to function. It only supported a few webcams owned by those persons that helped me out by testing. It is not recommended to be used anymore. At that time only usbecd.sys supported the required isochronous transfers. Since then I worked on usbcalls.dll and usbresmg.sys to implement a.o. isochronous transfers and that capability is nowadays present in both ArcaOS and Lars Erdmann drivers.

After that I developed UVC Webcam Support which works with usbcalls.dll and usbresmg.sys and consists of two separate sets of programs for UVC compliant webcams. Use either the 640x480 or the 320x240 set. Use the WebCam Viewer to watch video and take snapshots or use WebSee Server and Websee Client to watch video over a tcp/ip connection and take snapshots.  Later on I developed UVC Microscope Viewer which works with usbcalls.dll and usbresmg.sys and consist of one program for UVC compliant webcams to inspect specimem at 640x480 resolution and take snapshots.

My latest development (for Rémy Dodin's Use of webcam for video and audio recording) works with usbcalls.dll and usbresmg.sys and contains 3 programs for UVC compliant webcams. Webcam Server obtains video and audio from your UVC webcam and acts as an HTTP server and/or named pipe server and/or streams to stdout. Webcam Monitor Video acts as named pipe or HTTP client and shows video from the Webcam Server. Webcam Monitor Audio acts as a named pipe client and plays pcm wave audio from the Webcam Server.
« Last Edit: January 19, 2021, 06:30:51 pm by Wim Brul »

Remy

  • Hero Member
  • *****
  • Posts: 763
  • Karma: +12/-1
    • View Profile
Re: WebCam Driver Question
« Reply #2 on: January 19, 2021, 07:24:03 pm »
Hi Wim,

It works nice since.

Regards
Rémy

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WebCam Driver Question
« Reply #3 on: January 19, 2021, 10:58:25 pm »
Thank you very much for the explanation and patience Wim. Now I get it.

I will do some Webcam testing with the "WebCam Viewer" and usbcalls.dll/usbresmg.sys.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Wim Brul

  • Sr. Member
  • ****
  • Posts: 300
  • Karma: +26/-0
    • View Profile
    • Wim's home page
Re: WebCam Driver Question
« Reply #4 on: January 20, 2021, 11:57:26 am »
Hi Wim,

It works nice since.

Regards
Rémy

Hi Rémy,

Fine. In the meantime I have updated webcam.exe and wmaudio.exe and added  wmvideo.exe and I think my package is now complete.
I think I tested it with your wcc.exe but I don't remember. My memory is getting worse. I have attached it here so Martin could try these too.

@Martin - Use "webcam /n" to start the Webcam Server and use "wmvideo /n" to start the Webcam Monitor Video and see what you get.

Regards,
Wim
« Last Edit: January 20, 2021, 11:59:51 am by Wim Brul »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WebCam Driver Question
« Reply #5 on: January 20, 2021, 03:47:16 pm »
@Martin - Use "webcam /n" to start the Webcam Server and use "wmvideo /n" to start the Webcam Monitor Video and see what you get.

Thanks Wim for the crash course. I just use it here in my Thinkpad L420 and it worked to show my webcam image.
Just one question. What if I connect a second USB Webcam, how does the program knows which webcam image to get?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Wim Brul

  • Sr. Member
  • ****
  • Posts: 300
  • Karma: +26/-0
    • View Profile
    • Wim's home page
Re: WebCam Driver Question
« Reply #6 on: January 20, 2021, 04:38:06 pm »
@Martin - Use "webcam /n" to start the Webcam Server and use "wmvideo /n" to start the Webcam Monitor Video and see what you get.

Thanks Wim for the crash course. I just use it here in my Thinkpad L420 and it worked to show my webcam image.
Just one question. What if I connect a second USB Webcam, how does the program knows which webcam image to get?

Regards

Webcam Server uses the first webcam that it finds. On my Dell Latitude e6500 this is the builtin webcam.
When I plugin my Logitech c250 webcam and then start Webcam Server then it will find that device.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WebCam Driver Question
« Reply #7 on: January 22, 2021, 08:24:17 pm »
Hi

I also tested this USB webcam and worked: Ausdom USB Generic Webcam Realtek / 0BDA:58B0

Was some test software to try to use the USB mic of cameras?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Remy

  • Hero Member
  • *****
  • Posts: 763
  • Karma: +12/-1
    • View Profile
Re: WebCam Driver Question
« Reply #8 on: January 22, 2021, 08:35:13 pm »
Hi

I also tested this USB webcam and worked: Ausdom USB Generic Webcam Realtek / 0BDA:58B0

Was some test software to try to use the USB mic of cameras?

Regards

Have look here
https://www.os2world.com/forum/index.php/topic,2453.msg27426.html#msg27426

When using the USB webcam micro, use a headset to prevent larsen.

Remy

  • Hero Member
  • *****
  • Posts: 763
  • Karma: +12/-1
    • View Profile
Re: WebCam Driver Question
« Reply #9 on: January 22, 2021, 08:36:05 pm »
Hi Wim,

It works nice since.

Regards
Rémy

Hi Rémy,

Fine. In the meantime I have updated webcam.exe and wmaudio.exe and added  wmvideo.exe and I think my package is now complete.
I think I tested it with your wcc.exe but I don't remember. My memory is getting worse. I have attached it here so Martin could try these too.

@Martin - Use "webcam /n" to start the Webcam Server and use "wmvideo /n" to start the Webcam Monitor Video and see what you get.

Regards,
Wim

Hi Wim,

I'm going to give it a try.

Regards

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2285
  • Karma: +176/-0
    • View Profile
Re: WebCam Driver Question
« Reply #10 on: January 23, 2021, 08:34:55 am »
HI Wim,

When I started developing webcam support I produced USB Webcam Tests that required usbecd.sys in order to function. It only supported a few webcams owned by those persons that helped me out by testing. It is not recommended to be used anymore. At that time only usbecd.sys supported the required isochronous transfers. Since then I worked on usbcalls.dll and usbresmg.sys to implement a.o. isochronous transfers and that capability is nowadays present in both ArcaOS and Lars Erdmann drivers.

What would be cool would be cool to enhance our libusb port to support isochronous transfers - that would allow us to port libuvc and help with porting linux apps that use webcams...

Cheers,

Paul

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: WebCam Driver Question
« Reply #11 on: January 23, 2021, 09:19:30 am »
Once I am done updating the USB sound drivers to support "record only" devices I'll try and have a look into it.
I have never ported any SW, so it might take some time.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2285
  • Karma: +176/-0
    • View Profile
Re: WebCam Driver Question
« Reply #12 on: January 23, 2021, 10:02:29 am »
Once I am done updating the USB sound drivers to support "record only" devices I'll try and have a look into it.
I have never ported any SW, so it might take some time.

The existing port of libusb is at http://trac.netlabs.org/ports/browser/libusb1/trunk

http://trac.netlabs.org/ports/browser/libusb1/trunk/libusb/os/os2_usb.c has the existing OS/2 code that only supports bulk transfers.

There are examples of other implementations in the same directory.

I can help with compiling and might even look at it myself if I get time.

Cheers,

Paul

Wim Brul

  • Sr. Member
  • ****
  • Posts: 300
  • Karma: +26/-0
    • View Profile
    • Wim's home page
Re: WebCam Driver Question
« Reply #13 on: January 23, 2021, 10:08:52 am »
Hi Martin,

Was some test software to try to use the USB mic of cameras?
It might be a good idea ;) to read the included webcam.txt file?

Code: [Select]
┌───────────────┐                                                ┌────────────┐
│ Webcam Server ├────────────────────────────────────────────────┤ webcam.exe │
└───────────────┘                                                └────────────┘
.
Use "webcam /a" to run named pipe server for wav audio from the microphone.
.

Code: [Select]
┌──────────────────────┐                                        ┌─────────────┐
│ Webcam Monitor Audio ├────────────────────────────────────────┤ wmaudio.exe │
└──────────────────────┘                                        └─────────────┘
.
Plays pcm wave audio from the Webcam Server. Acts as named pipe client.
Use "wmaudio" to connect the Webcam Monitor Audio to \PIPE\Webcam\Audio.
Use e.g "wmaudio /a1/v30" to play on audio adapter 1 at reduced volume.
.

Best regards,
Wim
« Last Edit: January 23, 2021, 10:33:23 am by Wim Brul »

David McKenna

  • Hero Member
  • *****
  • Posts: 814
  • Karma: +25/-0
    • View Profile
Re: WebCam Driver Question
« Reply #14 on: January 23, 2021, 02:59:53 pm »
Hi Wim,

 I have a Logitech C270 webcam (which has a built in mic) and gave your latest version a try. Copied the files to \sys\bin and following your example, opened a command prompt window and typed 'webcam /a /n'. It seemed to work and showed exactly the same as in your screen shot. Opened another command prompt window and typed 'wmvideo' and a window opened called 'Webcam Monitor' showing the webcam video - nice! Then opened yet another command prompt window and typed 'wmaudio' It looked the same as in your screen shot, but I do not get any sound to my speakers from the microphone. I also tried 'wmaudio /a1' but still no sound. Is this because of what Lars mentions as a 'record only device'?

 I assume the /a1 switch is to define the audio playback device, but how does the audio input device get chosen? I do have a microphone jack on the computer - does that interfere somehow? Trying to understand how the pieces fit together...

 Was also wondering if the audio could be made to stream by HTTP?

 Thanks for providing this fantastic software!

Regards,