Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Wim Brul

Pages: [1] 2 3 ... 16
1
Hardware / Re: WebCam Driver Question
« on: February 14, 2021, 12:40:59 pm »
Hi Wim

This is what I get:

webcam.exe /a24000:
Code: [Select]
[X:\HOME\DOWNLOADS\WEBCAM00-20210120]webcam.exe /a24000
started.
format:mjpg
 acquire webcam
 set configuration
 negotiate video format
/a server (audio) On-Line.
 obtain video format
 commit video format
 set video alt interface
 set audio frequency
 starting iso video
 set audio mike volume
 set audio alt interface
 starting iso audio
[00000057]
obtain audio error.

Hi Martin, thank you for testing.  The [00000057] error code means parameter error and it occurs because webcam.exe uses the wrong isochronous frame length for audio. I have to correct that. This error has to be corrected first so do not spend more time in trying to get it working for audio.

Wim

P.S. Added: I think I got it fixed. Use the attached Webcam00-20210214.zip and see what does.

2
Hardware / Re: WebCam Driver Question
« on: February 12, 2021, 06:28:56 pm »
Hi Martin,

Quote
I wanted to test any kind of sound from my USB Webcam - Logitech C920 HD Pro Webcam
I'm using "Webcam00-20210120.zip" and Lar's USBAUDIO.

Please attach lsusb report of this camera for me to inspect.


Hi

I took this log with testlog, but I'm not sure if that is what you need Wim.

Code: [Select]
Device 1:
  ctrlID=1 DevAdr=2 ConfigVal=0 IfNo=0 Speed=2 Port=1 HubIx=3
  USB Release number=0x200 DevReleaseNumber=0x11
  Class=239 SubClass=2 Protocol=1 MaxPacketSize=64
  Vendor:Product=046d:082d NumConfigurations=1 Logitech, Inc. HD Pro Webcam C920
  Configuration: NumInterfaces=4 ConfigValue=1 StringIx=0 Attr=0x80 MaxPower=250
  Interface 0: Alt=0 nEP=1 Class=14(Video) SubClass=1 Protocol=0 StringIx=0
  Endpoint: Adr=0x83 Attr=0x3 MaxPktSize=64 Interval=8
  Interface 1: Alt=0 nEP=0 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Interface 1: Alt=1 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=192 Interval=1
  Interface 1: Alt=2 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=384 Interval=1
  Interface 1: Alt=3 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=512 Interval=1
  Interface 1: Alt=4 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=640 Interval=1
  Interface 1: Alt=5 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=800 Interval=1
  Interface 1: Alt=6 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=944 Interval=1
  Interface 1: Alt=7 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=2688 Interval=1
  Interface 1: Alt=8 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=2848 Interval=1
  Interface 1: Alt=9 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=3040 Interval=1
  Interface 1: Alt=10 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=4992 Interval=1
  Interface 1: Alt=11 nEP=1 Class=14(Video) SubClass=2 Protocol=0 StringIx=0
  Endpoint: Adr=0x81 Attr=0x5 MaxPktSize=5116 Interval=1
  Interface 2: Alt=0 nEP=0 Class=1(Audio) SubClass=1 Protocol=0 StringIx=0
  Interface 3: Alt=0 nEP=0 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0
  Interface 3: Alt=1 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0
  Interface 3: Alt=2 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0
  Interface 3: Alt=3 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

Regards

Hi Martin,

The information in the testlog is not sufficient. So I googled once more and I found an lsusb report of the Logitech HD Pro Webcam C920. This shows that the builtin microphones  of that webcam deliver 16000/24000/32000 Hz. 16-bit stereo. When you start "webcam.exe /a24000" and also start "wmaudio /a1 /v30" then the audio of your webcam will be reproduced by the 1st audio adapter in your system when that adapter is capable of reproducing 24000 Hz 16-bit stereo.

Regards,
Wim

3
Hardware / Re: WebCam Driver Question
« on: February 10, 2021, 07:41:48 pm »
Hi Rémy,

Hi Wim,

I have a few questions about parameter /f and fps :   

webcam allows to set
/fN - Select Nth discrete frame interval setting for video.
 Proper values for N are 0 up to the highest setting available on your webcam.

Do you know how to get available setting for a webcam ?
I expect getting a discrete frame interval value for each supported fps
Is there a link between the value 0 to n and the supported fps from highest to lowest ?

Let me try and explain how it works using your logitech c270 webcam. Suppose that you want to obtain 640x480 mjpg video with the default frame rate. You would then use the /f0 parameter (or you would just omit that parameter altogether) and webcam.exe obtains the dwDefaultFrameInterval value for that video format from the usb descriptors. Since dwDefaultFrameInterval=333333, which means 33.3333 milliseconds, this results into 30 frames per second aka 30 fps. When you would use /f2 then webcam.exe obtains dwFrameInterval(2)=500000 which results into 20 fps. The mapping is given by the usb descriptors and lsusb is your friend.

Note that the actual frame rate as experienced by the client could be lower than the frame rate at which webcam.exe obtains video frames from your webcam. When the client is not fast enough in obtaining frames from webcam.exe then webcam.exe will drop frames. When the client is much faster than webcam.exe then it will be waiting in webcam.exe for the next frame to become available.

Quote
Test show me that the bitrate is reduced when increasing the n value for /f parameter
I didn't notice any real quality degradation when using /f2 which provides a very smaller output file.   

For all resolution, I always have 25fps for my webcam into ffprobe output.
Are any parameters on webcam to set a different supported fps for a given frame size ?

Thanks
Rémy

Yes, higher values of N for the /fN parameter result into lower frame rates.

It seems to me that ffprobe does not measure the actual frame rate.

Wim

4
Hardware / Re: WebCam Driver Question
« on: January 30, 2021, 09:51:39 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,

This latest build has always 48000Hz audio output !
I went back to the previous build which allow me to set 44100Hz

Regards
Rémy

My latter build takes the audio sample frequency specified by the user and validates it against the usb audio descriptors of the webcam. Logitech c250/c270/pro9000 webcams do not support 44100 Hz. according to their audio descriptors and since the last scanned audio descriptor specifies 48000 Hz. this frequency is used. Similarly 16000 Hz. will be used by the Logitech Quickcam Pro for Notebooks because this is the only audio frequency that this webcam reports supported. This latter build is supposed to work with audio from all kinds of uvc compliant webcams.

On the contrary my former build takes the audio sample frequency specified by the user and validates it using a list of hardcoded values that work with the Logitech c250/c270/pro9000 webcams and this list includes 22050 Hz. and 44100 Hz. that happen to work on these webcams despite of the fact that their usb audio decriptors omit these. Scanning of usb audio descriptors was not yet implemented but that is really the way to go.

I checked my c270 under windows.
It supports 16bits 16000Hz, 16bits 32000Hz and 16bits 48000Hz
right, 44100 isn't listed (despite it works well) - 16000, 32000 and 48000 are real selectable frequencies.
Are they available ? (I always get 48000 as output)

Regards
Rémy   

Content of xhprobe.cmd:

Code: [Select]
ffprobe -show_streams -v quiet -i \PIPE\Webcam\Audio > xhprobe.txt

When I use "webcam /a16000' and I check the audio stream with "xhprobe" then xhprobe.txt shows that the audio stream is indeed 16000 Hz. (sample_rate=16000). This way I checked 16000, 24000, 32000, 48000 Hz. and these all work alright with my logitech c250 camera.  I also checked 22050, 44100 Hz. and  these default to 48000 Hz. so everything works as designed.  When you are always getting 48000Hz. then I suspect you are not passing the proper /aN value.

5
Hardware / Re: WebCam Driver Question
« on: January 30, 2021, 08:49:53 pm »
Hi Martin,

Quote
I wanted to test any kind of sound from my USB Webcam - Logitech C920 HD Pro Webcam
I'm using "Webcam00-20210120.zip" and Lar's USBAUDIO.

Please attach lsusb report of this camera for me to inspect.


Hi

I have a strange behavior with lsusb (lsusb-20130526.zip) with this device. If I don't plug the camera, I get the normal report. If I plugged the camera, I get no report at all from any device. Even that  "webcam /n" is working fine to see video from the webcam.

Any other tip to get the USB hardware report?

Regards

Perhaps you encountered 0000680: lsusb not working again?

6
Hardware / Re: WebCam Driver Question
« on: January 30, 2021, 12:28:21 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,

This latest build has always 48000Hz audio output !
I went back to the previous build which allow me to set 44100Hz

Regards
Rémy

My latter build takes the audio sample frequency specified by the user and validates it against the usb audio descriptors of the webcam. Logitech c250/c270/pro9000 webcams do not support 44100 Hz. according to their audio descriptors and since the last scanned audio descriptor specifies 48000 Hz. this frequency is used. Similarly 16000 Hz. will be used by the Logitech Quickcam Pro for Notebooks because this is the only audio frequency that this webcam reports supported. This latter build is supposed to work with audio from all kinds of uvc compliant webcams.

On the contrary my former build takes the audio sample frequency specified by the user and validates it using a list of hardcoded values that work with the Logitech c250/c270/pro9000 webcams and this list includes 22050 Hz. and 44100 Hz. that happen to work on these webcams despite of the fact that their usb audio decriptors omit these. Scanning of usb audio descriptors was not yet implemented but that is really the way to go.

7
Hardware / Re: WebCam Driver Question
« on: January 28, 2021, 10:45:08 am »
Was also wondering if the audio could be made to stream by HTTP?

Yes David, that could probably be done. I am not so sure that it would work satisfactorily since I expect delayed audio (related to video) to occur when streaming that way. Is it your intention to use HTTP streaming from webcam.exe to both wmaudio.exe and wmvideo.exe at the same time? I am asking because right now it is possible to watch the HTTP video stream using firefox or seamonkey. But in my experiments (rexx server) I was not able to do the same for audio. I could made the  browser produce the sound with the <audio> tag but alas it persisted in caching that audio rendering it useless.

8
Hardware / Re: WebCam Driver Question
« on: January 24, 2021, 05:43:23 pm »
Hi Martin,

Quote
I wanted to test any kind of sound from my USB Webcam - Logitech C920 HD Pro Webcam
I'm using "Webcam00-20210120.zip" and Lar's USBAUDIO.

With "Lar's USBAUDIO" do say that you installed audio.zip from usbdrv237.zip ?
[00000057] obtain audio error. This is SYS0087: The parameter is incorrect.
Please attach lsusb report of this camera for me to inspect.

Regards,
Wim

9
Hardware / Re: WebCam Driver Question
« 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

10
Hardware / Re: WebCam and Libusb
« on: January 20, 2021, 05:36:12 pm »
Hi Paul,

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 really cool would be to add support to our libusb port for ISO transfers - that would simplify porting linux apps that support webcams using (iirc) libuvc....

Cheers,

Paul

Yes Paul, that would be very cool. The question remains how to accomplish that...

With my libusb notes and usbcalls api documentation at hand it must be possible to implement that support. Perhaps a phased implementation is necessary. First convert libusb to support asynchronous bulk and interupt transfers and then, when that works, implement asynchronous isochronous transfers. There must be a way to test this. Normally I would write a simple application to test e.g. synchronous bulk transfers and then, when that works,  modify that application to use asynchronous bulk transfers. Or I would use an existing application for that purpose. The problem is that I am not really an application programmer and I will have to resort to assembler or simple borland c programming.

I think this calls for a separate thread.

Regards,
Wim

11
Hardware / Re: WebCam Driver Question
« 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.

12
Hardware / Re: WebCam Driver Question
« 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

13
Hardware / Re: WebCam Driver Question
« 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.

14
Hardware / Re: USB Audio - Issues with some Devices
« on: January 15, 2021, 04:09:50 pm »
Wim, I think not the audio device drivers need a fix but we rather need to add a hack to USBAUDIF.DLL to fake the caller of USBAUDIF.DLL that "playback" or at least "playback or record" was acknowledged instead of "record only". In the end, the caller will overrule this reporting anyway and will subsequently open the stream it needs (playback or record, whatever is intended by the sound app). The drawback of this solution is obvious: if a sound app requests playback but the device really is "record only", this will of course fail if the stream is finally created. However, the audio device drivers properly handle this error, and therefore, at least nothing will crash or break. You will just get an error in the sound app (which might be confusing if everything seemed to work initially).
Yes Lars, that thought crossed my mind too. I think you are right.

By the way, I'm using AN USB 12.07 and I copied USBAUDIO.SYS and USBAUD2.SYS from your usbdrv237. Just in case.
Hi Martin, I hope that you did not just copy those drivers. Proper deinstall/install using minstall /* must have been done.

15
Hardware / USB Audio - Issues with some Devices
« on: January 15, 2021, 12:21:38 pm »
Hi

Today I tried some USB audio input devices I have arround:
- Music Fairy USB 2.0‎‎: worked great with Lar's USBAUDIO.SYS. The chipset is the same as "Conceptronic CSOUNDU C08-041 USB Audio Stick"
- C-Media Electronics USB Mic (0D8C:013C). Did not work.
Karaoke USB Adapter - Only audio Inputs -  This thing has a switch with two modes. Did not work.
-- 1) 046D:0A03  - Logitech USB Microphone  according to some sites)
-- 2) 1415:0000 - Sony SingStar USBMIC by Nam Tai E&E Products Ltd. or OmniVision Technologies, Inc.

I tested these devices with Wim's Audio Recorder.

REgards

Alas, for some reason, the cause of which is yet unknown to me, recording with microphone only USB audio devices does not work.
For me this is a known problem. I think it has to do with some flaw in the USB audio drivers, not with my Wim's Audio Recorder.

Pages: [1] 2 3 ... 16