OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Multimedia => Topic started by: Remy on May 20, 2020, 02:05:55 am

Title: Use of webcam
Post by: Remy on May 20, 2020, 02:05:55 am
Hi,

I would like use my webcam under ArcaOS.
USBEHCD.SYS is installed and my webcam seen as Logitech, Inc.  Webcam C270
Now, how to display the webcam ? (video + sound)

Thanks
Rémy
Title: Re: Use of webcam
Post by: ivan on May 20, 2020, 02:47:07 am
Hi Remy,

Go to https://home.hccnet.nl/w.m.brul/usbvideo/index.html (https://home.hccnet.nl/w.m.brul/usbvideo/index.html) and select your webcam, or equivalent, then select the necessary program.

Not sure about sound as I don't have it on my main computer.
Title: Re: Use of webcam
Post by: Remy on May 20, 2020, 09:21:17 am
Hi Remy,

Go to https://home.hccnet.nl/w.m.brul/usbvideo/index.html (https://home.hccnet.nl/w.m.brul/usbvideo/index.html) and select your webcam, or equivalent, then select the necessary program.

Not sure about sound as I don't have it on my main computer.

Hi Ivan,

I already was there but nothing works.
My system is SMP  -   USBEHCD.SYS  (ArcaOS latest level)
The  webcam is a 720p 30fps - defined as USBECD.SYS /D:046D:0825:0010

Regards
Rémy
Title: Re: Use of webcam
Post by: Lars on May 20, 2020, 12:07:01 pm
As has been mentioned multiple times, the latest (32-bit) ArcaOS Drivers do not support isochronous transfers which is necessary to have for USB audio and USB video.

You are stuck.

Title: Re: Use of webcam
Post by: Wim Brul on May 20, 2020, 02:57:49 pm
Hi Remy,

Go to https://home.hccnet.nl/w.m.brul/usbvideo/index.html (https://home.hccnet.nl/w.m.brul/usbvideo/index.html) and select your webcam, or equivalent, then select the necessary program.

Not sure about sound as I don't have it on my main computer.

Hi Ivan,

I already was there but nothing works.
My system is SMP  -   USBEHCD.SYS  (ArcaOS latest level)
The  webcam is a 720p 30fps - defined as USBECD.SYS /D:046D:0825:0010

Regards
Rémy

Hi Remy,

The URL given by Ivan points to my "USB Webcam Tests" web page, which is beta test software, not to be used anymore.
So remove the usbecd.sys line you added in config.sys for your webcam and use my  "UVC Microscope Viewer"  (https://home.hccnet.nl/w.m.brul/uvcscope/index.html) instead.

Regards, Wim.

Title: Re: Use of webcam
Post by: Remy on May 20, 2020, 03:55:46 pm
Hi Remy,

Go to https://home.hccnet.nl/w.m.brul/usbvideo/index.html (https://home.hccnet.nl/w.m.brul/usbvideo/index.html) and select your webcam, or equivalent, then select the necessary program.

Not sure about sound as I don't have it on my main computer.

Hi Ivan,

I already was there but nothing works.
My system is SMP  -   USBEHCD.SYS  (ArcaOS latest level)
The  webcam is a 720p 30fps - defined as USBECD.SYS /D:046D:0825:0010

Regards
Rémy

Hi Remy,

The URL given by Ivan points to my "USB Webcam Tests" web page, which is beta test software, not to be used anymore.
So remove the usbecd.sys line you added in config.sys for your webcam and use my  "UVC Microscope Viewer"  (https://home.hccnet.nl/w.m.brul/uvcscope/index.html) instead.

Regards, Wim.

Changed and test failes.
also fails with parm   /d046D:0825:0010
Title: Re: Use of webcam
Post by: Wim Brul on May 20, 2020, 05:24:20 pm
The program gets this FF14 error when it tries to allocate resources for isochronous transfers.
Like Lars already said: isochronous transfers are not yet supported by the ArcaOS 12.x USB drivers.
Try and use the ArcaOS 11.17 drivers instead. Or use the latest Lars Erdmann USB driver set.
Title: Re: Use of webcam
Post by: Remy on May 20, 2020, 07:39:49 pm
The program gets this FF14 error when it tries to allocate resources for isochronous transfers.
Like Lars already said: isochronous transfers are not yet supported by the ArcaOS 12.x USB drivers.
Try and use the ArcaOS 11.17 drivers instead. Or use the latest Lars Erdmann USB driver set.

Ok, thanks i'll give it a try
Title: Re: Use of webcam
Post by: Remy on May 21, 2020, 09:24:53 pm
Hi Lars,

When will (32-bit) ArcaOS Drivers support isochronous transfers ?
In current periods with pandemic etc.... web conference and use of a webcam is more and more important.

Best regards
Rémy
Title: Re: Use of webcam
Post by: Lars on May 21, 2020, 10:40:20 pm
Don't know. I neither work for nor work with ArcaNoae.
Title: Re: Use of webcam
Post by: Rich Walsh on May 23, 2020, 12:35:56 pm
When will (32-bit) ArcaOS Drivers support isochronous transfers ?

Isochronous transfers are fully supported for USB2 and have been for a while. I have no problems using Lars' USB Audio drivers with the AN stack.

I think someone's confusing the issue with USB3 where (IIUC) it is still under development.
Title: Re: Use of webcam
Post by: Lars on May 23, 2020, 12:43:27 pm
Remy was using the 32-bit version of USBEHCD.SYS which is the USB 2.0 host controller driver.
And as far as I understood the readme, this version of USBEHCD.SYS does not support isochronous transfer. But the one from the 11.17 stack (16-bit) did.
Or has this now changed for the 32-bit version of USBEHCD.SYS ? If that is the case, then it will indeed be sufficient to just use my version of USBAUDIO.SYS / USBAUD2.SYS together with the AN stack.

Title: Re: Use of webcam
Post by: Andy Willis on May 24, 2020, 05:44:16 am
USBEHCD.SYS does support isochronous transfer.
USBXHCD.SYS does not yet support isochronous transfer.
Title: Re: Use of webcam
Post by: Remy on May 24, 2020, 07:33:53 pm
The program gets this FF14 error when it tries to allocate resources for isochronous transfers.
Like Lars already said: isochronous transfers are not yet supported by the ArcaOS 12.x USB drivers.
Try and use the ArcaOS 11.17 drivers instead. Or use the latest Lars Erdmann USB driver set.

Hi    Wim,

According Andy's update,  isochronous is supported.
How to make it work please using  AN latest build ?
Thanks

Regards
Rémy
Title: Re: Use of webcam
Post by: Wim Brul on May 24, 2020, 09:55:34 pm
The program gets this FF14 error when it tries to allocate resources for isochronous transfers.
Like Lars already said: isochronous transfers are not yet supported by the ArcaOS 12.x USB drivers.
Try and use the ArcaOS 11.17 drivers instead. Or use the latest Lars Erdmann USB driver set.

Ok, thanks i'll give it a try

Did you try and use your webcam with the ArcaOS 11.17 drivers? Did it work with these?
Did you try and use your webcam with the Lars Erdmann 10.234 drivers? Did it work with these? 

Hi    Wim,

According Andy's update,  isochronous is supported.
How to make it work please using  AN latest build ?
Thanks

Regards
Rémy

When the answers to my 4 questions above are yes then it is time to use  ArcaNoae's Mantis  (https://mantis.arcanoae.com) to report the problem.   
Title: Re: Use of webcam
Post by: Remy on May 25, 2020, 01:04:37 am
The program gets this FF14 error when it tries to allocate resources for isochronous transfers.
Like Lars already said: isochronous transfers are not yet supported by the ArcaOS 12.x USB drivers.
Try and use the ArcaOS 11.17 drivers instead. Or use the latest Lars Erdmann USB driver set.

Ok, thanks i'll give it a try

Did you try and use your webcam with the ArcaOS 11.17 drivers? Did it work with these?
Did you try and use your webcam with the Lars Erdmann 10.234 drivers? Did it work with these? 

Hi    Wim,

According Andy's update,  isochronous is supported.
How to make it work please using  AN latest build ?
Thanks

Regards
Rémy

As I wrote at the top, I did a try with your usbecd driver and it didn't work too. You told me to remove it, So I did.

No,  I can not  go backward to ArcaOS 11.17  (it requires to backward on all usb drivers and this is not possible to maintain my production (and only system) system fully operational)
This system is with AN supported drivers according support contract, those from Lars aren't supported.
There are no elements telling a failure into AN drivers !  So, no ticket can be opened now for a problems outside AN products

what else please ?

Some information about the webcam seen by the driver.
Device 3:
  ctrlID=3 DevAdr=0 ConfigVal=5 IfNo=1 Speed=2 Port=4 HubIx=4
  USB Release number=0x200 DevReleaseNumber=0x10
  Class=239 SubClass=2 Protocol=1 MaxPacketSize=64
  Vendor:Product=046d:0825 NumConfigurations=1
  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=0x87 Attr=0x3 MaxPktSize=16 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
  Interface 3: Alt=4 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

Best regards
Rémy
 
Title: Re: Use of webcam
Post by: Neil Waldhauer on May 25, 2020, 05:33:13 am
I have a Lenovo Thinkpad T540p with two bootable ArcaOS volumes. One has USB 11.17, and runs websee UVCView.exe perfectly. The second has USB 12.05 and  UVCView terminates with an error: [0000FF14] Obtain thread error!
Title: Re: Use of webcam
Post by: Lars on May 25, 2020, 09:06:06 am
So we are back to zero. Open a problem report with AN. Something must be wrong ( or different) about isochronous support in the 12.05 USBEHCD.SYS driver.
Title: Re: Use of webcam
Post by: roberto on May 25, 2020, 10:03:49 am
I version 12.05 of the usb, I had to remove it because it did not allow me to send forwarding emails from the Thunderbird. For now I continue with 12.04
Title: Re: Use of webcam
Post by: Lars on May 25, 2020, 11:45:32 am
One additional note:
Wim can confirm or not but I would believe that uvcview.exe/uvcscope.exe uses USBCALLS/USBRESMG to do its thing.
Therefore,the problem could also be located in those components.
Taken the fact that Rich reported that USB audio works ok with the AN 32-bit stack, I consider these 2 a likely source of the problem.
Title: Re: Use of webcam
Post by: Wim Brul on May 25, 2020, 12:53:02 pm
One additional note:
Wim can confirm or not but I would believe that uvcview.exe/uvcscope.exe uses USBCALLS/USBRESMG to do its thing.
Therefore,the problem could also be located in those components.
Taken the fact that Rich reported that USB audio works ok with the AN 32-bit stack, I consider these 2 a likely source of the problem.

Yes, uvcview.exe/uvcscope.exe are using USBCALLS/USBRESMG to do their thing. The only difference is that uvcscope.exe has a microscope selection parameter.

I have a Lenovo Thinkpad T540p with two bootable ArcaOS volumes. One has USB 11.17, and runs websee UVCView.exe perfectly. The second has USB 12.05 and  UVCView terminates with an error: [0000FF14] Obtain thread error!

This confirms that the problem is somewhere within the ArcaNoae 12.x USB driver set.
Title: Re: Use of webcam
Post by: Remy on May 25, 2020, 01:54:49 pm
One additional note:
Wim can confirm or not but I would believe that uvcview.exe/uvcscope.exe uses USBCALLS/USBRESMG to do its thing.
Therefore,the problem could also be located in those components.
Taken the fact that Rich reported that USB audio works ok with the AN 32-bit stack, I consider these 2 a likely source of the problem.

Yes, uvcview.exe/uvcscope.exe are using USBCALLS/USBRESMG to do their thing. The only difference is that uvcscope.exe has a microscope selection parameter.

I have a Lenovo Thinkpad T540p with two bootable ArcaOS volumes. One has USB 11.17, and runs websee UVCView.exe perfectly. The second has USB 12.05 and  UVCView terminates with an error: [0000FF14] Obtain thread error!

This confirms that the problem is somewhere within the ArcaNoae 12.x USB driver set.

This doesn't confirm anything due USBCALLS is specific and must be at same level as other usb drivers.
Changing process or like it works is not a sing of miss function but more like compatibility...
 
What can be done to have uvcscope.exe compatible with new releases ?
(this is something I always have with GUI reequiring me to verify and adapt my "tools" at each update)

Do you have a debug option to trace in/out flow ?

Thanks and Regards
Rémy
   
Title: Re: Use of webcam
Post by: Remy on May 25, 2020, 02:00:40 pm
I version 12.05 of the usb, I had to remove it because it did not allow me to send forwarding emails from the Thunderbird. For now I continue with 12.04

With which thunderbird version !
I have done many test recently with thunderbird 38 and 45 and didn't fall into our case (I have all dlls at latest AN rel level). It may be interresting for me to test similar case (after updating clamav xpi plugin). how did you (step by step)
Regards
Rémy
Title: Re: Use of webcam
Post by: Lars on May 25, 2020, 02:41:57 pm
One additional note:
Wim can confirm or not but I would believe that uvcview.exe/uvcscope.exe uses USBCALLS/USBRESMG to do its thing.
Therefore,the problem could also be located in those components.
Taken the fact that Rich reported that USB audio works ok with the AN 32-bit stack, I consider these 2 a likely source of the problem.

Yes, uvcview.exe/uvcscope.exe are using USBCALLS/USBRESMG to do their thing. The only difference is that uvcscope.exe has a microscope selection parameter.

I have a Lenovo Thinkpad T540p with two bootable ArcaOS volumes. One has USB 11.17, and runs websee UVCView.exe perfectly. The second has USB 12.05 and  UVCView terminates with an error: [0000FF14] Obtain thread error!

This confirms that the problem is somewhere within the ArcaNoae 12.x USB driver set.

This doesn't confirm anything due USBCALLS is specific and must be at same level as other usb drivers.
Changing process or like it works is not a sing of miss function but more like compatibility...
 
What can be done to have uvcscope.exe compatible with new releases ?
(this is something I always have with GUI reequiring me to verify and adapt my "tools" at each update)

Do you have a debug option to trace in/out flow ?

Thanks and Regards
Rémy
 

It worked with 11.17. It worked and still works with my USB driver stack. It fails with 12.05. Therefore, it confirms EVERYTHING. If AN did change the programming interface to USBCALLS/USBRESMG either accidentally or deliberately or if it is a bug accidentally introduced, then it is up to them to fix it.
There are a whole lot of other applications using USBCALLS/USBRESMG. Do you also expect them to be updated ?
Title: Re: Use of webcam
Post by: Remy on May 25, 2020, 05:52:26 pm
One additional note:
Wim can confirm or not but I would believe that uvcview.exe/uvcscope.exe uses USBCALLS/USBRESMG to do its thing.
Therefore,the problem could also be located in those components.
Taken the fact that Rich reported that USB audio works ok with the AN 32-bit stack, I consider these 2 a likely source of the problem.

Yes, uvcview.exe/uvcscope.exe are using USBCALLS/USBRESMG to do their thing. The only difference is that uvcscope.exe has a microscope selection parameter.

I have a Lenovo Thinkpad T540p with two bootable ArcaOS volumes. One has USB 11.17, and runs websee UVCView.exe perfectly. The second has USB 12.05 and  UVCView terminates with an error: [0000FF14] Obtain thread error!

This confirms that the problem is somewhere within the ArcaNoae 12.x USB driver set.

This doesn't confirm anything due USBCALLS is specific and must be at same level as other usb drivers.
Changing process or like it works is not a sing of miss function but more like compatibility...
 
What can be done to have uvcscope.exe compatible with new releases ?
(this is something I always have with GUI reequiring me to verify and adapt my "tools" at each update)

Do you have a debug option to trace in/out flow ?

Thanks and Regards
Rémy
 

It worked with 11.17. It worked and still works with my USB driver stack. It fails with 12.05. Therefore, it confirms EVERYTHING. If AN did change the programming interface to USBCALLS/USBRESMG either accidentally or deliberately or if it is a bug accidentally introduced, then it is up to them to fix it.
There are a whole lot of other applications using USBCALLS/USBRESMG. Do you also expect them to be updated ?

Are any RFC about this part of function ?
If no RFC exist, it may be possible, why not ? else it should satisfy rfc.
Title: Re: Use of webcam
Post by: Rich Walsh on May 25, 2020, 07:52:36 pm
It worked with 11.17. It worked and still works with my USB driver stack. It fails with 12.05. Therefore, it confirms EVERYTHING. If AN did change the programming interface to USBCALLS/USBRESMG either accidentally or deliberately or if it is a bug accidentally introduced, then it is up to them to fix it.

This binary "I'm right, you're wrong" mentality gets in the way of developing a more sophisticated understanding of software malfunctions. Often the issue is not a bug, per se, but a difference in implementation. Two examples (not necessarily specific to USBCALLS, etc):

* The client calls a function that takes several arguments but one of the arguments it supplies is invalid. Implementation A identifies the invalid argument but recognizes that it has no effect in the current context, so ignores it and proceeds. In contrast, when Implementation B sees the invalid argument, it returns an error code.

* A public function calls an internal function to read the hardware; that function returns a value that is outside the expected range. Implementation A simply passes the value to the client, expecting it to deal with potentially invalid results. Implementation B examines the value, sees it's out of range and returns an error.

In the first example, the client code is clearly to blame: there's no reason to expect any called code to accept an invalid argument. In the second example, who to "blame" is less clear - this could simply come down to two different interpretations of the specifications/RFC.

Until we know what is happening at the point of failure, we have no way of knowing which implementation is in error - if any.
Title: Re: Use of webcam
Post by: Roderick Klein on May 25, 2020, 08:06:30 pm
I version 12.05 of the usb, I had to remove it because it did not allow me to send forwarding emails from the Thunderbird. For now I continue with 12.04

What do you mean ? You can not press the forward button with your USB mouse ?

If you are saying that installing the USB stack does not allow you to send an forward email. But you can send emails ?
I am sorry but the USB stack is then not the cause. Then other programs would fail.

Simply put ArcaOS is proctected mode OS. Meaning that the drivers and the applications all run in there own memory space.
If the USB driver would somehow overwrite a portion of the Thunderbird memory or any other part of he OS, ArcaOS would have locked up waaay before it ever cam to the PMSHELL.
Sorry you would really need look better before making the claim that installing a USB stack prevents you from forwarding an email.

Roderick

Title: Re: Use of webcam
Post by: Remy on May 25, 2020, 08:43:05 pm
It worked with 11.17. It worked and still works with my USB driver stack. It fails with 12.05. Therefore, it confirms EVERYTHING. If AN did change the programming interface to USBCALLS/USBRESMG either accidentally or deliberately or if it is a bug accidentally introduced, then it is up to them to fix it.

This binary "I'm right, you're wrong" mentality gets in the way of developing a more sophisticated understanding of software malfunctions. Often the issue is not a bug, per se, but a difference in implementation. Two examples (not necessarily specific to USBCALLS, etc):

* The client calls a function that takes several arguments but one of the arguments it supplies is invalid. Implementation A identifies the invalid argument but recognizes that it has no effect in the current context, so ignores it and proceeds. In contrast, when Implementation B sees the invalid argument, it returns an error code.

* A public function calls an internal function to read the hardware; that function returns a value that is outside the expected range. Implementation A simply passes the value to the client, expecting it to deal with potentially invalid results. Implementation B examines the value, sees it's out of range and returns an error.

In the first example, the client code is clearly to blame: there's no reason to expect any called code to accept an invalid argument. In the second example, who to "blame" is less clear - this could simply come down to two different interpretations of the specifications/RFC.

Until we know what is happening at the point of failure, we have no way of knowing which implementation is in error - if any.

I agree with you
(e.g. when I installed latest VLC build, I was surprised not seen it starting as expected but crashed... after checking all my parms, I used an previous releases supported parm but this one was no more accepted under new VLC build. removing this older parm makes VLC work again)
Title: Re: Use of webcam
Post by: Lars on May 26, 2020, 08:03:57 am
Superb. We now have 2 bright persons to get the error fixed. Now you just need to convince Wim to pass the code over to you.
Sorry, that's enough nonsense for me: breaking an interface that everyone had agreed on and that worked. Period. Enough said.
Title: Re: Use of webcam
Post by: Remy on May 26, 2020, 01:17:32 pm
Superb. We now have 2 bright persons to get the error fixed. Now you just need to convince Wim to pass the code over to you.
Sorry, that's enough nonsense for me: breaking an interface that everyone had agreed on and that worked. Period. Enough said.

Hi Lars,

Are your drivers 32bits or 16bits ?
(If 32bits, then I'll take time to create a "test partition" and give them a try. AS I wrote, I prefer working with AN supported driver to not have support exclusion but if it works well under my HW environment with USB3 in a near future - I need it -, I'll migrate my prod system to use your drivers) 

USB like most drivers I think, conforms to RFCs. Are there ?
(I don't know and have no skill to check this).

"As written, I have no knowledge into these specific part but having done software support for a very long time, I had cases where some big companies wrote they own code, founding some working process and based they code on they founding and it worked under all releases and for several version too (worked for several years). At new version, code was rewritten to support new functions and satisfy existing official and supported functions too but this makes the code from these clients no more working and of course, they were upset.  After deep and long investigation, it was put in evidence that they used some not described process they found them self as working but these processes where never part of the product functions nor supported. Clients have to update they programs to conform product official supported function which was always the same with new added functions. When Client no more working product was an OEM product, then OEM development and product I supported development were put in contact to help into a resolution"

This is why, it is important to check USB functions called or call process used are those officially supported. If this is the case, then the product should work and if it doesn't, then some work have to be done to make it work and satisfy supported functions.

For the AN USB driver, it is a main change, version change (32bits).
This means a big code change and I suppose that the focus is to make official supported functions work like before with new ones. Of course, new code could mean new bug but to determine new bugs, support has to know how calls are made to the USB part with may be traces etc... (Wim knows this). 

I think it would be nice if Wim could contact the USB v12 developers and get from them needed information to check if all is ok at his side. If something changed, was it previously officially supported? If yes, then it should work as before under the new v12 code = AN ticket to be opened. If not, is a new more powerful option available?

Could Andy or Roderick help with they suggestions about how to progress into this "no more working issue"?

Best regards

AN notes about USB v12
https://www.arcanoae.com/wp-content/uploads/wiki/ReadMe-USB.txt

What about this extract !
"Note that from version 11.01, the usbcalls library was reorganized to
try to merge the functionality from all the different versions and
create a universal interface. A few versions were incompatible and
those incompatible interfaces were discarded in favor of the more
capable, more popular modern ones. If your application is very old or
was linked with an incompatible library, you will need to relink your
application with the new library."
Title: Re: Use of webcam
Post by: Dave Yeo on May 26, 2020, 05:10:45 pm
Hi Remy,
My understanding is that there was a "RFC" type document for USB at the beginning and IBM faithfully followed it. Unluckily Microsoft didn't, as well as all their vendors so we're left trying to implement the MS version of USB rather then the official implementation.
As for Arca Noae's more recent drivers, my guess is they're mostly focusing on getting USB3 working and once that's done, they'll fix USBCALLS and such. USB3 seems to have turned out much harder then they first thought it seems.
Title: Re: Use of webcam
Post by: roberto on May 26, 2020, 07:46:49 pm
Your query of usb12.05 and the closing of Thunderbird 45.8.0 in standard memory and in highmem.
When I select forward a message, the thunderbird closes.

It is not a problem of the usb12.05
It seems that the error has been when updating the library  libstdc++-fwd
The anpm log shows an error, which did not appear on the screen after updating. And that seems to be my
 problem. sorry.
 
 ----------[ 26 May 2020 19:18:08 ]----------
Executing: @python C:\SYS\APPS\ANPM\scripts\yum_update_dep.py libstdc++-fwd
Return code: 0
----------[ 26 May 2020 19:18:21 ]----------
Executing: @python C:\SYS\APPS\ANPM\scripts\yum_update.py libstdc++-fwd
Ejecutando verificación de transacción
PackageSackError(): Rpmdb checksum is invalid: dCDPT(pkg checksums): libgcc.i686 0:9.2.0-4.oc00 - u
Error: Rpmdb checksum is invalid: dCDPT(pkg checksums): libgcc.i686 0:9.2.0-4.oc00 - u
PackageSackError()
Return code: 0
Title: Re: Use of webcam
Post by: Remy on May 26, 2020, 08:24:26 pm
Hi Remy,
My understanding is that there was a "RFC" type document for USB at the beginning and IBM faithfully followed it. Unluckily Microsoft didn't, as well as all their vendors so we're left trying to implement the MS version of USB rather then the official implementation.
As for Arca Noae's more recent drivers, my guess is they're mostly focusing on getting USB3 working and once that's done, they'll fix USBCALLS and such. USB3 seems to have turned out much harder then they first thought it seems.

Thanks for your reply Dave.
Yes, I could read some information that USB3 implementation requires lot of work and harder as expected (buffer size etc...)

Regards
Title: Re: Use of webcam
Post by: Rich Walsh on May 27, 2020, 05:10:03 am
As for Arca Noae's more recent drivers, my guess is they're mostly focusing on getting USB3 working and once that's done, they'll fix USBCALLS and such.

What exactly needs fixing in USBCALLS or anywhere else? Just because someone mentioned it in passing as a possible cause doesn't make it so. In fact, I went through AN's Mantis bugtracker and found remarkably few open USB tickets - and most of those pertained to USB3.

In my search, I did find one comment from David A (the USB developer) that's relevant here. He said that he uses a "046D:0804" as part of his QA testing and that it works "just fine". I wouldn't have known what device that was if it weren't the very first one on Wim's "USB Webcam Tests" page: a Logitech C250 Webcam.

So, at this point we know that one program is able to establish an isochronous connection with a common webcam using v12.04/12.05 while another isn't. Until someone files a ticket with AN and/or Wim cares to look into this, that's _all_ we know. IMO, it's way too early to play the blame game.
Title: Re: Use of webcam
Post by: Dave Yeo on May 27, 2020, 07:02:20 am
I probably got confused by something mentioned on the testers list in answer to Doug's question about USB on the 20th.
Title: Re: Use of webcam
Post by: Wim Brul on May 27, 2020, 05:11:57 pm
In my search, I did find one comment from David A (the USB developer) that's relevant here. He said that he uses a "046D:0804" as part of his QA testing and that it works "just fine". I wouldn't have known what device that was if it weren't the very first one on Wim's "USB Webcam Tests" page: a Logitech C250 Webcam.

So, at this point we know that one program is able to establish an isochronous connection with a common webcam using v12.04/12.05 while another isn't. Until someone files a ticket with AN and/or Wim cares to look into this, that's _all_ we know. IMO, it's way too early to play the blame game.

Too early to file a ticket. Right now I am busy testing isochronous transfers with my Logitech C250 Webcam using the usbecd.sys interface. Will take some time though.
Title: Re: Use of webcam
Post by: Andy Willis on May 28, 2020, 05:10:59 am
Could Andy or Roderick help with they suggestions about how to progress into this "no more working issue"?
Open a Mantis ticket, be sure to include a testlog that was run with the desired hardware plugged in.  Even if it turns out to be an issue in third party software, we'll look at the issue to try to make that determination.
Be sure to give a good description of what you are attempting and any errors that you receive. 
I can tell you that isochronous support is available, I cannot say it is impossible for there to be an issue with it.
Title: Re: Use of webcam
Post by: Remy on May 29, 2020, 08:11:00 pm
Could Andy or Roderick help with they suggestions about how to progress into this "no more working issue"?
Open a Mantis ticket, be sure to include a testlog that was run with the desired hardware plugged in.  Even if it turns out to be an issue in third party software, we'll look at the issue to try to make that determination.
Be sure to give a good description of what you are attempting and any errors that you receive. 
I can tell you that isochronous support is available, I cannot say it is impossible for there to be an issue with it.

Thanks Andy,
I followed your suggestion and AN found the issue

In fact: The code has nothing to do with isochronous transfers and it seems to be a buffer pointer verification error
I just tested a correction and it works (have to wait on next v12.6)

Now, how to get audio out of the webcam ?
Any idea ?

Regards
Rémy
Title: Re: Use of webcam
Post by: Dave Yeo on May 30, 2020, 02:22:40 am
Is it just a regular USB microphone? I had a turntable that presented itself as a USB microphone and it just worked. Unluckily I forget the specifics.
Title: Re: Use of webcam
Post by: Remy on May 30, 2020, 11:36:50 am
Is it just a regular USB microphone? I had a turntable that presented itself as a USB microphone and it just worked. Unluckily I forget the specifics.

Hi Dave,

The microphone is the one included into the C270. How to make it work ?
Which application to use, how to find the USB microphone information to bind with, any tools ? how to enable it ? ....

As you see, I have a lot of questions :D

Regards
Rémy
Title: Re: Use of webcam
Post by: Dave Yeo on May 30, 2020, 05:56:36 pm
As I said, it was some time back and all I was doing was saving to a wav file to convert to MP3. It was likely with the default usbaudio (from IBM dated 2001) at the time. Unluckily for what you need would probably be tricky as you'd need to use 2 sound devices at the same time, USB Audio to read the microphone and another audio device to play it.
Title: Re: Use of webcam
Post by: Remy on May 30, 2020, 08:10:35 pm
May b Wim could help on this webcan part ?

Full information about c270 found:

Device 3:
  ctrlID=3 DevAdr=0 ConfigVal=5 IfNo=1 Speed=2 Port=4 HubIx=4
  USB Release number=0x200 DevReleaseNumber=0x10
  Class=239 SubClass=2 Protocol=1 MaxPacketSize=64
  Vendor:Product=046d:0825 NumConfigurations=1
  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=0x87 Attr=0x3 MaxPktSize=16 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
  Interface 3: Alt=4 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

Title: Re: Use of webcam
Post by: Wim Brul on May 31, 2020, 10:40:06 am
Quote
  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
  Interface 3: Alt=4 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

The information on audio is rather meager i.e. even endpoint information is missing.
Fortunately I have lsusb reports from both c250 and c270 webcams and the audio descriptors appear to be identical.
The inbuild microphone may deliver 16-bit mono at 16000/ 24000/32000/48000 Hz.

I have experimented in the past to obtain audio from the c250 webcam and it appears to be possible.
The big question is what to do with the audio data once obtained. Should it go to the default audio device?
The truth is that I am not really an application programmer, so I want this to be as simple as it can be.

I also tried to have usbaudio.sys recognize the c250 microphone but I gave up on that.
Title: Re: Use of webcam
Post by: Remy on May 31, 2020, 11:20:55 am
Quote
  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
  Interface 3: Alt=4 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

The information on audio is rather meager i.e. even endpoint information is missing.
Fortunately I have lsusb reports from both c250 and c270 webcams and the audio descriptors appear to be identical.
The inbuild microphone may deliver 16-bit mono at 16000/ 24000/32000/48000 Hz.

I have experimented in the past to obtain audio from the c250 webcam and it appears to be possible.
The big question is what to do with the audio data once obtained. Should it go to the default audio device?
The truth is that I am not really an application programmer, so I want this to be as simple as it can be.

I also tried to have usbaudio.sys recognize the c250 microphone but I gave up on that.

Hi Wim,

I understand.
Having the possibility to get the audio usable as input to ffmpeg (stdout / pipe) in a compatible format would be nice and like this, it could be sent to ffplay etc...

Thanks and kind regards
Rémy

Q: may it be possible to update uvcscope to be able to stream the video to stdout or pipe, usable as input for ffmpeg ?

- This will make webcam usable to record video
- For the integrated microphone, record audio
Title: Re: Use of webcam
Post by: Wim Brul on June 01, 2020, 03:23:13 pm
I have read some of the ffmpeg documentation and rfc1341(mime).

Section 20.15 mpjpeg - MJPEG encapsulated in multi-part MIME demuxer. 
Suppose the webcam streams mjpg video through "\PIPE\Webcam\Video".
Would the following be correct to play that mjpg video?

"ffplay -f mpjpeg \PIPE\Webcam\Video"
"ffplay -f mpjpeg Strict_mime_boundary 0 \PIPE\Webcam\Video"
"ffplay -f mpjpeg Strict_mime_boundary 1 \PIPE\Webcam\Video"

What are the exact mime headers to be used?

Section 20.16 rawvideo - Raw video demuxer.
Suppose the webcam streams yuyv video through "\PIPE\Webcam\Video".
Would the following be correct to play that yuyv video?

"ffplay -f rawvideo -video_size 640x480 \PIPE\Webcam\Video"
"ffplay -f rawvideo -pixel_format yuv420p -video_size 640x480 -framerate 10 \PIPE\Webcam\Video"

The above assumes that the original mjpg/yuyv video from the webcam will be streamed.
An alternative could be to stream rgb24/mjpg snapshots from the application window?
Title: Re: Use of webcam
Post by: Remy on June 02, 2020, 12:40:24 am
I have read some of the ffmpeg documentation and rfc1341(mime).

Section 20.15 mpjpeg - MJPEG encapsulated in multi-part MIME demuxer. 
Suppose the webcam streams mjpg video through "\PIPE\Webcam\Video".
Would the following be correct to play that mjpg video?

"ffplay -f mpjpeg \PIPE\Webcam\Video"
"ffplay -f mpjpeg Strict_mime_boundary 0 \PIPE\Webcam\Video"
"ffplay -f mpjpeg Strict_mime_boundary 1 \PIPE\Webcam\Video"

What are the exact mime headers to be used?

Section 20.16 rawvideo - Raw video demuxer.
Suppose the webcam streams yuyv video through "\PIPE\Webcam\Video".
Would the following be correct to play that yuyv video?

"ffplay -f rawvideo -video_size 640x480 \PIPE\Webcam\Video"
"ffplay -f rawvideo -pixel_format yuv420p -video_size 640x480 -framerate 10 \PIPE\Webcam\Video"

The above assumes that the original mjpg/yuyv video from the webcam will be streamed.
An alternative could be to stream rgb24/mjpg snapshots from the application window?

For ffplay yuv, options are
rawvideo demuxer AVOptions:
  -video_size        <image_size> .D....... set frame size
  -pixel_format      <string>     .D....... set pixel format (default "yuv420p")
  -framerate         <video_rate> .D....... set frame rate (default "25")

For mjpeg, you have:
mjpeg demuxer AVOptions:
  -framerate         <video_rate> .D.......  (default "25")
mjpeg_2000 demuxer AVOptions:
  -framerate         <video_rate> .D.......  (default "25")

and mpjpeg using mime type "multipart/x-mixed-replace"

From you above example, it is supposed the webcam sends frames into a named pipe.
(If this could be done, it would be nice)
Under linux, ffmpeg as well ffplay are able to use specified hw input device like webcam but this is currently not implemented under os/2 (code not ported) 

Or uvcscope sending mjpeg (play video + send all mjpeg or only send mjpeg) to ffmpeg or ffplay (both using parm " f mjpeg -i - "  (reading stdin)
e.g.  uvvscope /dxxxx:xxxx:xxxx - | ffplay -f mjpeg -i -     (or   uvvscope /dxxxx:xxxx:xxxx - | ffmpeg -f mjpeg -i - record.avi   
But audio is missing out of uvcscope...

I think that Dave could help here to progress.
Regards
Rémy

 






Title: Re: Use of webcam
Post by: Dave Yeo on June 02, 2020, 04:20:16 am
As far as I know, a command like
Code: [Select]
"ffplay -f mpjpeg \PIPE\Webcam\Video"
doesn't work on our command line. In theory you could use mkfifo to create FFmpeg friendly pipes, though I've never tried and don't know it mkfifo has been properly ported to OS/2.
Code: [Select]
[Y:\]mkfifo --help
Usage: mkfifo [OPTION]... NAME...
Create named pipes (FIFOs) with the given NAMEs.

Mandatory arguments to long options are mandatory for short options too.
  -m, --mode=MODE    set file permission bits to MODE, not a=rw - umask
  -Z                   set the SELinux security context to default type
      --context[=CTX]  like -Z, or if CTX is specified then set the SELinux
                         or SMACK security context to CTX
      --help     display this help and exit
      --version  output version information and exit

There's some examples here for concatenating, https://ffmpeg.org/faq.html#Concatenating-using-raw-audio-and-video (https://ffmpeg.org/faq.html#Concatenating-using-raw-audio-and-video)

I'd guess if you can concatenate audio and video, you should be able to mux it together but I'm far from an expert at using FFmpeg, just building it.
Title: Re: Use of webcam
Post by: Lars on June 02, 2020, 11:32:32 am
Quote
  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
  Interface 3: Alt=4 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

The information on audio is rather meager i.e. even endpoint information is missing.
Fortunately I have lsusb reports from both c250 and c270 webcams and the audio descriptors appear to be identical.
The inbuild microphone may deliver 16-bit mono at 16000/ 24000/32000/48000 Hz.

I have experimented in the past to obtain audio from the c250 webcam and it appears to be possible.
The big question is what to do with the audio data once obtained. Should it go to the default audio device?
The truth is that I am not really an application programmer, so I want this to be as simple as it can be.

I also tried to have usbaudio.sys recognize the c250 microphone but I gave up on that.

Wim, can you send me the lsusb report for the C250 ? I suspect that there is some feature unit for volume/mute on the USB "data out" (microphone) path that needs to be cranked up (or a multiplexer unit set to the correct input or some such). Currently, USBAUDIO.SYS only controls the feature unit for volume/mute on the USB "data in" (speaker) path.

You can even try to write a REXX script to crank up that feature unit. You sure know how to do that once you find the corresponding feature unit in the descriptor info ...
Title: Re: Use of webcam
Post by: Wim Brul on June 02, 2020, 11:35:40 am
Hi Rémy,

Quote
Under linux, ffmpeg as well ffplay are able to use specified hw input device like webcam but this is currently not implemented under os/2 (code not ported)

Perhaps 2 hardware devices are then being used (one for audio and one for video)? Would that be dll's (like video4linux.dll and alsa.dll)?

Quote
Or uvcscope sending mjpeg (play video + send all mjpeg or only send mjpeg) to ffmpeg or ffplay (both using parm " f mjpeg -i - "  (reading stdin)
e.g.  uvvscope /dxxxx:xxxx:xxxx - | ffplay -f mjpeg -i -     (or   uvvscope /dxxxx:xxxx:xxxx - | ffmpeg -f mjpeg -i - record.avi   

What do you mean by "play video + send all mjpeg or only send mjpeg" ? Would an application without video display (like my weblook.exe) do?

Quote
But audio is missing out of uvcscope...

Yes. To be done of course. But how? I looked into your avxcat.pdf and learned that audio and video are handled as separate inputs.
When both audio and video must be delivered then working with named pipes (one for audio and one for video)  would do I guess.
The webcam can only be accessed by one application, so how would I send both both audio and video through stdout?

Best regards,
Wim.
Title: Re: Use of webcam
Post by: Wim Brul on June 02, 2020, 12:24:27 pm
I also tried to have usbaudio.sys recognize the c250 microphone but I gave up on that.

Wim, can you send me the lsusb report for the C250 ? I suspect that there is some feature unit for volume/mute on the USB "data out" (microphone) path that needs to be cranked up (or a multiplexer unit set to the correct input or some such). Currently, USBAUDIO.SYS only controls the feature unit for volume/mute on the USB "data in" (speaker) path.

O.K. I have attached the lsusb reports for both the c250 and c270.
The problem (in fact feature) with usbaudio.sys is that it does not recognize the webcam as an audio device. It is a so-called miscellaneous device.
Once I fixed that. It appears that only the microphone has descriptors and usbaudio.sys expects an audio output interface as well. It ran into traps.

Quote
You can even try to write a REXX script to crank up that feature unit. You sure know how to do that once you find the corresponding feature unit in the descriptor info ...

Yes I do. The question remains should usbaudio.sys support the webcam microphone. I doubt it.
Title: Re: Use of webcam
Post by: Lars on June 02, 2020, 02:00:59 pm
Hi Wim,

does USBAUDIO.SYS also fail to find the microphone on the C-270 ?
For the C-250 and also for the C-270 I can see AUDIO CONTROL and also one or more AUDIO STREAMING interfaces and that's ok.
But there are also association descriptors. Maybe usbaudio.sys fails to properly find the control and streaming descriptors because it gets confused by the association descriptor.

Certainly, USBAUDIO.SYS should not trap if it finds a "record only" USB audio device. I have a USB microphone (only MIC). Let's see what that does to USBAUDIO.SYS.

I would say that USBAUDIO.SYS (and USBAUD2.SYS) should support everything that has a AUDIO CONTROL and AUDIO STREAMING interface (descriptor). It has to serve all devices of that class, even if there is more to the device than just audio.

The video part would then be handled by a USBVIDEO.SYS driver but you have decided to go a different route via USBCALLS/USBRESMG which is also ok.
Title: Re: Use of webcam
Post by: Wim Brul on June 02, 2020, 03:52:14 pm
Hi Lars,

Hi Wim,

does USBAUDIO.SYS also fail to find the microphone on the C-270 ?

I cannot try because I don't have the C270. But the C270 is also a miscellaneous device so usbaudio.sys will also ignore it.   

Quote
For the C-250 and also for the C-270 I can see AUDIO CONTROL and also one or more AUDIO STREAMING interfaces and that's ok.
But there are also association descriptors. Maybe usbaudio.sys fails to properly find the control and streaming descriptors because it gets confused by the association descriptor.

Certainly, USBAUDIO.SYS should not trap if it finds a "record only" USB audio device. I have a USB microphone (only MIC). Let's see what that does to USBAUDIO.SYS.

I must say that I did a dirty hack to accept the webcam and to find the feature_unit  descriptor. I seem to recall that the traps occur while attempting to record.

Quote
I would say that USBAUDIO.SYS (and USBAUD2.SYS) should support everything that has a AUDIO CONTROL and AUDIO STREAMING interface (descriptor). It has to serve all devices of that class, even if there is more to the device than just audio.

The video part would then be handled by a USBVIDEO.SYS driver but you have decided to go a different route via USBCALLS/USBRESMG which is also ok.
Title: Re: Use of webcam
Post by: Remy on June 02, 2020, 03:54:03 pm
Quote
Quote
Under linux, ffmpeg as well ffplay are able to use specified hw input device like webcam but this is currently not implemented under os/2 (code not ported)

Perhaps 2 hardware devices are then being used (one for audio and one for video)? Would that be dll's (like video4linux.dll and alsa.dll)?


To get video and audio, both interfaces have to be used and as I understand, 2 devices
Both formats video4linux and alsa are not available under ffmpeg yet (missing dlls)   

Quote
Quote
Or uvcscope sending mjpeg (play video + send all mjpeg or only send mjpeg) to ffmpeg or ffplay (both using parm " f mjpeg -i - "  (reading stdin)
e.g.  uvvscope /dxxxx:xxxx:xxxx - | ffplay -f mjpeg -i -     (or   uvvscope /dxxxx:xxxx:xxxx - | ffmpeg -f mjpeg -i - record.avi   

What do you mean by "play video + send all mjpeg or only send mjpeg" ? Would an application without video display (like my weblook.exe) do?


I just give a try to weblook and no, weblook seems to only open access to the webcam. additional code is needed like stream the webcam rawvideo to stdout (or pipe, or local udp port).
ffmpeg can have multiple entries and can handle video as well audio in one command line. Video from first input goes maps as e.g. 0:0 and audio from second input maps as e.g. 0:1 input final video

 ***

In following example, I mux video from video1 with audio from video2 (both mp4) into the pipe (converting into mpegts) and ffplay plays the pipe received video "TS format" (low quality due no other specified options)

having the video and audio as selected under ffmpeg.

ffmpeg -i video1.mp4 -i video2.mp4 -map 0:v:0 -map 1:a:0 -shortest -f mpegts pipe: | ffplay -i pipe:
same as:
ffmpeg -i video1.mp4 -i video2.mp4 -map 0:v:0 -map 1:a:0 -shortest -f mpegts - | ffplay -i -

test done with ffplay show me it only reads pipe:  (or - )

Same example using udp port:
ffmpeg -i video1.mp4 -i video2.mp4 -map 0:v:0 -map 1:a:0 -shortest -f mpegts udp://127.0.0.1:5000 | ffplay -i udp://0.0.0.0:5000

Using pipe or udp, the stream must be seekable (mp4 is no good, this is why I added mpegts)

video1.mp4 and video2.mp4 input can be file (like here) or pipe or udp
Title: Re: Use of webcam
Post by: Lars on June 02, 2020, 04:41:55 pm
Hi Lars,

Hi Wim,

does USBAUDIO.SYS also fail to find the microphone on the C-270 ?

I cannot try because I don't have the C270. But the C270 is also a miscellaneous device so usbaudio.sys will also ignore it.   

Quote
For the C-250 and also for the C-270 I can see AUDIO CONTROL and also one or more AUDIO STREAMING interfaces and that's ok.
But there are also association descriptors. Maybe usbaudio.sys fails to properly find the control and streaming descriptors because it gets confused by the association descriptor.

Certainly, USBAUDIO.SYS should not trap if it finds a "record only" USB audio device. I have a USB microphone (only MIC). Let's see what that does to USBAUDIO.SYS.

I must say that I did a dirty hack to accept the webcam and to find the feature_unit  descriptor. I seem to recall that the traps occur while attempting to record.

Quote
I would say that USBAUDIO.SYS (and USBAUD2.SYS) should support everything that has a AUDIO CONTROL and AUDIO STREAMING interface (descriptor). It has to serve all devices of that class, even if there is more to the device than just audio.

The video part would then be handled by a USBVIDEO.SYS driver but you have decided to go a different route via USBCALLS/USBRESMG which is also ok.
Hi Wim,
in the lsusb report I see a warning "Warning: Descriptor too short" which will break the descriptor chain and that is true for the C-250 and C-270. Maybe THAT is the reason why searching for the audio control and streaming interface descriptors fails because the OS/2 USB client drivers always search the chain by honouring the "bLength" field instead of using known fixed values.
Title: Re: Use of webcam
Post by: Wim Brul on June 07, 2020, 07:38:32 pm
Hi Rémy,

I did install ffmpeg and played around with it. I also modified weblook to provide an mjpeg video stream to stdout. That works now.
Code: [Select]
weblook | ffplay -f mjpeg -noinfbuf -framerate 30 -i -

I also modified weblook to provide an mjpeg video stream to http:\\127.0.0.1:14225\ and that works too (also with SeaMonkey).
Code: [Select]
ffplay -f mjpeg -noinfbuf -framerate 30 -i http://127.0.0.1:14225/

Right now it is a compile option to choose what video stream will be used. I intend to make it a run time option.

So far only video is provided. To combine audio with video I need to provide two separate streams. Doing that from one program mandates the use of named pipes. I tried to create named pipes with mkfifo but that did not work. To solve that I need to write a named pipe filter to stdout. When I provide audio from another program then it can just be streamed to stdout as well and that filter program would not be necessary. Unfortunately I cannot access the very same webcam from 2 different programs at the same time. So in that cause audio has to come from another source i.e. the multimedia subsystem via dart. Without webcam audio support in usbaudio.sys  it will have to be one of the multimedia devices attached to the system. When usbaudio.sys would be modified to recognize the microphone in the webcam then it becomes a problem when one is using an usb audio stick at the same time. Perhaps a difficult problem to solve. So for now I will try and write that filter program first.
Title: Re: Use of webcam
Post by: Rich Walsh on June 07, 2020, 10:23:12 pm
I cannot access the very same webcam from 2 different programs at the same time. So in that cause audio has to come from another source i.e. the multimedia subsystem via dart. Without webcam audio support in usbaudio.sys  it will have to be one of the multimedia devices attached to the system. When usbaudio.sys would be modified to recognize the microphone in the webcam then it becomes a problem when one is using an usb audio stick at the same time. Perhaps a difficult problem to solve. So for now I will try and write that filter program first.

I don't think you're looking at this properly because you have everything you'd need (except the code) to serve both audio and video.

Because you're using usbresmg/usbcalls, your program isn't just a server: it's also a device driver running at Ring 3. You own the device and can do with it as you wish. If it provides both audio and video interfaces, there's nothing stopping you from setting up simultaneous isochronous streams from each. Just as (I assume) you package a series of USB packet payloads into an MPEG frame, you'd do the same for the audio in the appropriate format.

What you do with the streams after you capture them is up to you...
Title: Re: Use of webcam
Post by: Remy on June 07, 2020, 10:36:31 pm
Hi Rémy,

I did install ffmpeg and played around with it. I also modified weblook to provide an mjpeg video stream to stdout. That works now.
Code: [Select]
weblook | ffplay -f mjpeg -noinfbuf -framerate 30 -i -

I also modified weblook to provide an mjpeg video stream to http:\\127.0.0.1:14225\ and that works too (also with SeaMonkey).
Code: [Select]
ffplay -f mjpeg -noinfbuf -framerate 30 -i http://127.0.0.1:14225/

Right now it is a compile option to choose what video stream will be used. I intend to make it a run time option.

So far only video is provided. To combine audio with video I need to provide two separate streams. Doing that from one program mandates the use of named pipes. I tried to create named pipes with mkfifo but that did not work. To solve that I need to write a named pipe filter to stdout. When I provide audio from another program then it can just be streamed to stdout as well and that filter program would not be necessary. Unfortunately I cannot access the very same webcam from 2 different programs at the same time. So in that cause audio has to come from another source i.e. the multimedia subsystem via dart. Without webcam audio support in usbaudio.sys  it will have to be one of the multimedia devices attached to the system. When usbaudio.sys would be modified to recognize the microphone in the webcam then it becomes a problem when one is using an usb audio stick at the same time. Perhaps a difficult problem to solve. So for now I will try and write that filter program first.

Very nice and promising progress
Title: Re: Use of webcam
Post by: Dave Yeo on June 08, 2020, 12:21:33 am
Would libuvc, https://ken.tossell.net/libuvc/doc/ (https://ken.tossell.net/libuvc/doc/) help with the video? Could try to build it.
Title: Re: Use of webcam
Post by: Paul Smedley on June 08, 2020, 01:55:35 am
Hey Dave,

Would libuvc, https://ken.tossell.net/libuvc/doc/ (https://ken.tossell.net/libuvc/doc/) help with the video? Could try to build it.

Assuming usbresmg/usbcalls now support ISO transfers, this should be pretty easy to build. In theory it would open up webcams to being used in other apps ported from Unix
Title: Re: Use of webcam
Post by: Dave Yeo on June 08, 2020, 02:31:36 am
Hi Paul, looking at it a bit harder, libuvc seems to require opencv https://opencv.org/ (https://opencv.org/), which doesn't look that easy to build. The Linux version requires GTK though it looks like on Windows it can use QT. Everything uses CMAKE by the looks of it.
Title: Re: Use of webcam
Post by: Paul Smedley on June 08, 2020, 02:59:41 am
Hi Dave,

Hi Paul, looking at it a bit harder, libuvc seems to require opencv https://opencv.org/ (https://opencv.org/), which doesn't look that easy to build. The Linux version requires GTK though it looks like on Windows it can use QT. Everything uses CMAKE by the looks of it.

On Ubuntu, all I need for a successful run of cmake was the install the latest libusb-1.0.0-dev package....

I forgot about libusb - that may need to be enhanced to support iso transfers too...
Title: Re: Use of webcam
Post by: Paul Smedley on June 08, 2020, 03:01:50 am
-- Found PkgConfig: u:/extras/bin/pkg-config.exe (found version "0.29.2")
-- libusb-1.0 found using pkgconfig
-- Found JPEG: u:/extras/lib/jpeg.lib (found version "62")
-- Found JPEG library using standard module
-- Found JPEG: u:/extras/lib/jpeg.lib
-- Building libuvc with JPEG support.
-- Configuring done
-- Generating done
-- Build files have been written to: U:/DEV/libuvc/build
Title: Re: Use of webcam
Post by: Paul Smedley on June 08, 2020, 03:12:56 am
Apparently libusb-1.0.16-rc6 is too old....

Ignoring unresolved externals reported from weak prelinker.
Error! E2028: _libusb_get_ss_endpoint_companion_descriptor is an undefined reference
Error! E2028: _libusb_free_ss_endpoint_companion_descriptor is an undefined reference
Title: Re: Use of webcam
Post by: Paul Smedley on June 08, 2020, 03:17:30 am
Apparently libusb-1.0.16-rc6 is too old....

Ignoring unresolved externals reported from weak prelinker.
Error! E2028: _libusb_get_ss_endpoint_companion_descriptor is an undefined reference
Error! E2028: _libusb_free_ss_endpoint_companion_descriptor is an undefined reference

yum had libusb 1.0.21

http://smedley.id.au/tmp/uvc.zip has an example.exe which presumably is supposed to show output from a supported webcam...
Title: Re: Use of webcam
Post by: Paul Smedley on June 08, 2020, 08:43:55 am
Anyone know where the source for libusb 1.0.21 is? I don't see it in the bww github, and the netlabs usb still has 1.0.16

I can't tell if ISO transfer are supposed to work or not in libusb. When I ported 1.0.16 the functionality wasn't available in usbcalls - I guess this has changed now given Wim's success.
Title: Re: Use of webcam
Post by: Wim Brul on June 08, 2020, 01:33:38 pm
I can't tell if ISO transfer are supposed to work or not in libusb. When I ported 1.0.16 the functionality wasn't available in usbcalls - I guess this has changed now given Wim's success.
Right. From my notes: The 1.0.16 libusb 1.0 implementation for OS/2 by Paul Smedley supports synchronous transfers. The application gets control back when the transfer request has been completed. But this is not the way the original libusb 1.0 has been designed. It actually supports asynchronous transfers. The application gets control back already when the transfer request has been submitted. The application gets notified later on when that transfer request has been completed by means of a callback function.

For that to work I produced matched sets of usbcalls.dll and usbresmg.sys that are backwards compatible. I removed old code for functions that were never properly supported and added new code to support asynchronous transfers. I reworked existing code to make synchronous transfer functions work well again (these actually are using the asynchronous transfer functions). After that I added code to support isochronous  transfers. I also implemented the REXX/2 External Functions. Since then these changes have been incorporated into the ArcaOS and the Lars Erdmann USB driver sets.

I have attached usbcalls-info.zip containing the USBCALLS - API Reference Guide and the USBCALLS - REXX/2 Reference Guide.
Title: Re: Use of webcam
Post by: Wim Brul on June 09, 2020, 10:10:23 am
Anyone know where the source for libusb 1.0.21 is? I don't see it in the bww github, and the netlabs usb still has 1.0.16

Perhaps ports - Revision 2376:/libusb1/vendor/1.0.21 (http://svn.netlabs.org/repos/ports/libusb1/vendor/1.0.21/) ?
Title: Re: Use of webcam
Post by: Paul Smedley on June 09, 2020, 11:53:51 am
Hi Wim,

Anyone know where the source for libusb 1.0.21 is? I don't see it in the bww github, and the netlabs usb still has 1.0.16

Perhaps ports - Revision 2376:/libusb1/vendor/1.0.21 (http://svn.netlabs.org/repos/ports/libusb1/vendor/1.0.21/) ?

Thanks! That's the original vendor code, but looks like http://svn.netlabs.org/repos/ports/libusb1/trunk/ is updated.

FFS the 1.0.16 was deliberatly put in the netlabs USB repository, yet someone decides to clone it and stick it somewhere else.

Anyway, looking at http://svn.netlabs.org/repos/ports/libusb1/trunk/libusb/os/os2_usb.c confirms that isosynchronous isn't supported yet... A possible job for the weekend :)

Cheers,

Paul
Title: Re: Use of webcam
Post by: Paul Smedley on June 13, 2020, 11:31:24 am
OK I have libusb 1.0.21 compiling locally and  get the same results with example.exe with both a locally built libusb and the yum installed one:
UVC initialized
Device found
uvc: device has a status interrupt endpoint, but unable to read from it
uvc_open: Unknown error (-99)
UVC exited
Title: Re: Use of webcam
Post by: Lars on June 14, 2020, 07:24:58 pm
By the way: can I remove USBLIB from the Netlabs USB repository or is this still needed ? I'd like to remove it in order to avoid any confusion of where the latest version would be.

Regards,
Lars
Title: Re: Use of webcam
Post by: Wim Brul on June 14, 2020, 08:31:10 pm
Hi Rémy,

Derived from weblook I concocted "WebCam Server for OS/2 (ArcaOS/eComStation)". See WebCam.txt for parameters. See xplay.cmd for use with ffplay.

Acting as an HTTP server for mjpg video is the default. Use "webcam /n" to video stream to named pipe. Use "webcam /s" to video stream to stdout.

CAUTION: This is beta test software! May only be used at your own risk!

Best regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on June 14, 2020, 10:44:10 pm
Hi Rémy,

Derived from weblook I concocted "WebCam Server for OS/2 (ArcaOS/eComStation)". See WebCam.txt for parameters. See xplay.cmd for use with ffplay.

Acting as an HTTP server for mjpg video is the default. Use "webcam /n" to video stream to named pipe. Use "webcam /s" to video stream to stdout.

CAUTION: This is beta test software! May only be used at your own risk!

Best regards,
Wim.

Hi Wim,

No sound and only video from what I could test.

I tested all options and got video in all cases
video was ok too from webpage pointing to the http webcam server.
I've got repeated message by ffplay but this seems to be normal using logitec webcam
( [mjpeg @ 0x2fba80] unable to decode APP fields )

found: https://stackoverflow.com/questions/55439184/getting-unable-to-decode-app-fields-while-playing-usb-webcam-stream-through-ff
"The mjpeg stream contains a sequence of jpeg images, some are key frames, the complete image, and some are other frames such as delta frames, describing the differences between frames. What Logitech does is embed an H264 stream into the mjpeg stream by attaching H264 data onto the jpeg frames as APP attachments, i.e. it's a stream within a stream"

I did some test with ffmpeg and could record video in different codec.
Adding the video copy frames to mp4 output prevents of getting lot of [mjpeg @ 0x2fba80] unable to decode APP fields message

webcam /s | ffmpeg -f mjpeg -framerate 30 -i - -y -c:v copy -f rawvideo test.mpg
webcam /s | ffmpeg -f mjpeg -framerate 30 -i - -y -t 10s -c:v copy -f mp4 test.mp4   (here, I limited recording to 10s)
webcam /s | ffmpeg -f mjpeg -framerate 30 -i - -y test.avi

I could see that adding a "-" after the /s parm has no effect and this is good to have a syntax like with other programs.
e.g.  webcam /s - | ffmpeg -f mjpeg -framerate 30 -i - -y h264.avi
May be  webcan could be updated to use  - as a generic parm for /s , could it be done ?

Great work.
Regards
Rémy   

PS: It looks using a lot of CPUs (between 20% and 45% on 3 of 4 CPUs which looks to be very high ! any idea why ? 
Title: Re: Use of webcam
Post by: Remy on June 15, 2020, 09:29:36 pm
Hi Wim,

Output is 640x480
How to get 480p and 720p out of the webcam which is able to deliver 720p ?
Could an additional parm provide this option e.g.  /r480  or /r720 ?  (r for resolution)

Could I get video from http and stdout at the same time ?
(this would allow record the video "via stdout" and play it during recording 'http')

Best regards
Rémy

Playing  with the command, ffplay allows to correct some parms e.g.
webcam /s | ffplay -f mjpeg -framerate 30 -vf eq=gamma_r=1:gamma_b=1.02:gamma_g=1.04:gamma=1.05:contrast=1.06:brightness=0.04:saturation=1.6 -window_title WebCam -i -

Update: New test gives now a very low CPU utilization (nearly 4% on one CPU - didn't find what's wrong during first tests)

tested a quick and simple webCam control GUI  (rxutilex required - base installed under ArcaOS)
(big button to toggle on/off WebCam under whish are a show button for ffplay 640x480 and a smaller [ ] button for a small 160x120 display)
- ffplay supposed been under a path from path statement  (if not, then put wcc under ffplay path)
wcc var1 var2 var3
var1: can be TL TR BL BR  (screen corner position)
var2: only choice between /h or /n
var3: WebCam.exe path only

gui updated and added:
Update alpha 2 : rxutilex.dll required (this dll is base installed under ArcaOs)
- RMB click between webcam on/off button and [] button opens a parameter dialog
  These parameters are used with ffplay displaying output from the webcam
  > gamma
  > gamma red
  > gamma green
  > gamma blue
  > brightness
  > contrast
  > saturation
  > Show video size (max size)
  > reduced video size (min size)

Hi Wim, may this small gui be usefull ?

Updt: just succeffully tested a Logitech QuickCam Pro 9000 (colors balance, brightness, contrast are better but with a visible delay and not   as smooth as c270) 
(high resolution up to 1600x1200) - Of course, webcam only sends 640x480 mjpegs (could it be increased ?)
Title: Re: Use of webcam
Post by: Roderick Klein on June 15, 2020, 11:27:19 pm
By the way: can I remove USBLIB from the Netlabs USB repository or is this still needed ? I'd like to remove it in order to avoid any confusion of where the latest version would be.

Regards,
Lars

Well where is the code stored then ??

Roderick
Title: Re: Use of webcam
Post by: Lars on June 17, 2020, 06:56:47 am
Read Paul's answer:

1) it is stored here (Netlabs "PORTS" repo):
 http://svn.netlabs.org/repos/ports/libusb1/trunk/

2) bww have their own updated version in their github account

Another good example where things drift apart.


Lars
Title: Re: Use of webcam
Post by: Paul Smedley on June 17, 2020, 12:10:51 pm
Read Paul's answer:

1) it is stored here (Netlabs "PORTS" repo):
 http://svn.netlabs.org/repos/ports/libusb1/trunk/

2) bww have their own updated version in their github account

Another good example where things drift apart.

Not quite right.

I originally ported libusb and added source to http://svn.netlabs.org/repos/USB/libusb/trunk/ this is at 1.0.16 level

Later, someone decided that having it somewhere different at netlabs would be a terrific idea, and added it to http://svn.netlabs.org/repos/ports/libusb1/trunk/ - this is at 1.0.21 level

AFAICS bww haven't added to their github yet

To answer your original question though, from my POV, http://svn.netlabs.org/repos/USB/libusb/trunk/ could be removed.

Cheers,

Paul
Title: Re: Use of webcam
Post by: Lars on June 17, 2020, 01:21:42 pm
https://github.com/bitwiseworks/libusb1-os2

I don't know the details but looking at the commits, they added some fixes, maybe because they are linking to USBCALLS.
Title: Re: Use of webcam
Post by: Wim Brul on June 20, 2020, 03:41:20 pm
Hi Rémy,

Quote
No sound and only video from what I could test.
Once we are satisfied with video I will try and implement sound.

Quote
May be  webcam could be updated to use - as a generic parm for /s , could it be done ?
It could probably be done but I am not going to do that. Sorry.

Quote
Could I get video from http and stdout at the same time ?
(this would allow record the video "via stdout" and play it during recording 'http') 
Yes. Done. Acts now as an http server and/or a named pipe server and/or streams to stdout.

Quote
Output is 640x480
How to get 480p and 720p out of the webcam which is able to deliver 720p ?
Could an additional parm provide this option e.g.  /r480  or /r720 ?  (r for resolution)
Perhaps a new /rN argument (like the /fN argument) wil do?

/rN - resolution. Select Nth video streaming frame index setting.
Proper values for N are 0 up to the highest setting available on your webcam.

This way all resolutions available on your webcam could be used.

Best regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on June 20, 2020, 06:52:30 pm

Quote
Could I get video from http and stdout at the same time ?
(this would allow record the video "via stdout" and play it during recording 'http') 
Yes. Done. Acts now as an http server and/or a named pipe server and/or streams to stdout.

Quote
Output is 640x480
How to get 480p and 720p out of the webcam which is able to deliver 720p ?
Could an additional parm provide this option e.g.  /r480  or /r720 ?  (r for resolution)
Perhaps a new /rN argument (like the /fN argument) wil do?

/rN - resolution. Select Nth video streaming frame index setting.
Proper values for N are 0 up to the highest setting available on your webcam.

This way all resolutions available on your webcam could be used.

Best regards,
Wim.

Hi Wim,

I could start with pipe and http enabled but I'm unable to get the video out of both at the same time. only one output is usable at a time.
I would like video stream available on both output at the same (e.g. having ffplay run at the same time I run ffmpeg to control recording etc....) or run ffplay pipe at the same time as web http and have the video on both at the same time.

Yes /rN could be nice.

Regards
Rémy
Title: Re: Use of webcam
Post by: Wim Brul on June 20, 2020, 09:33:47 pm
I could start with pipe and http enabled but I'm unable to get the video out of both at the same time. only one output is usable at a time.
I would like video stream available on both output at the same (e.g. having ffplay run at the same time I run ffmpeg to control recording etc....) or run ffplay pipe at the same time as web http and have the video on both at the same time.
Too bad. There must be something wrong somewhere. What do you exactly use when you attempt to get video out both at the same time?

First I use xplay.cmd which shows video from stdout:
Code: [Select]
webcam /h /n /s | ffplay -f mjpeg -framerate 50 -i -

Then I use xzhttp.cmd showing video from http server:
Code: [Select]
ffplay -f mjpeg -framerate 50 -i http://127.0.0.1:14225/

Then I use xzpipe.cmd which shows video from named pipe:
Code: [Select]
ffplay -f mjpeg -framerate 50 -i \PIPE\Webcam\Video

See attached screenshot all running at the same time with live video. I don't know why the actual video's are all black on the screenshot though.

Quote
Yes /rN could be nice.
This will be my next goal then.
Title: Re: Use of webcam
Post by: Remy on June 21, 2020, 12:45:25 am
I could start with pipe and http enabled but I'm unable to get the video out of both at the same time. only one output is usable at a time.
I would like video stream available on both output at the same (e.g. having ffplay run at the same time I run ffmpeg to control recording etc....) or run ffplay pipe at the same time as web http and have the video on both at the same time.
Too bad. There must be something wrong somewhere. What do you exactly use when you attempt to get video out both at the same time?

First I use xplay.cmd which shows video from stdout:
Code: [Select]
webcam /h /n /s | ffplay -f mjpeg -framerate 50 -i -

Then I use xzhttp.cmd showing video from http server:
Code: [Select]
ffplay -f mjpeg -framerate 50 -i http://127.0.0.1:14225/

Then I use xzhttp.cmd which shows video from named pipe:
Code: [Select]
ffplay -f mjpeg -framerate 50 -i \PIPE\Webcam\Video

See attached screenshot all running at the same time with live video. I don't know why the actual video's are all black on the screenshot though.

Quote
Yes /rN could be nice.
This will be my next goal then.

Hi Wim,

I apology having found what's going wrong under my ArcaOS.
In fact, wrong webcam.exe was taken !  (removed older webcam)
New test show it works well. thanks

* I use detach mode

Regards
Rémy
Title: Re: Use of webcam
Post by: Dave Yeo on June 21, 2020, 01:12:25 am
See attached screenshot all running at the same time with live video. I don't know why the actual video's are all black on the screenshot though.

Colourspace?
Title: Re: Use of webcam
Post by: Remy on June 21, 2020, 02:29:54 pm
See attached screenshot all running at the same time with live video. I don't know why the actual video's are all black on the screenshot though.

Colourspace?

I have the video under each.

Wecam masked !
Reduce framerate to 30 (this value is mostly used below 720p webcam)

You test web page should display the mjpeg  ( <img src....> )

Regards
Rémy
Title: Re: Use of webcam
Post by: Wim Brul on June 24, 2020, 05:49:50 pm
Hi Rémy,
Yes /rN could be nice.
And it really is. Now up to 1080p i.e. 1920x1080 resolution.

With my dell latitude e6500 (kindly given to me by V.O.I.C.E (http://www.os2voice.org/) to develop webcam support) I could only test up to 1600x1200 resolution.

Regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on June 26, 2020, 12:03:46 am
Hi Rémy,
Yes /rN could be nice.
And it really is. Now up to 1080p i.e. 1920x1080 resolution.

With my dell latitude e6500 (kindly given to me by V.O.I.C.E (http://www.os2voice.org/) to develop webcam support) I could only test up to 1600x1200 resolution.

Regards,
Wim.

Fine.
Current working results:
   QuickCam
   Pro 9000         C270
r0 160x120          640x480
r1 160x120         640x480
r2 176x144         160x120
r3 320x240         176x144
r4 352x288         320x180
r5 640x480          320x240
r6 800x600         352x288
r7 960x720         432x240
r8 1600x1200     544x288
r9                         640x360
r10                     752x416
r11                     800x448
r12                     800x600
r13                     864x480
r14                     960x544
r15                     960x720
r16                     1024x576
r17                     1184x656
r18                     1280x720
r19                    1280x960
Title: Re: Use of webcam
Post by: Wim Brul on June 26, 2020, 10:45:13 am
Hi Rémy,

Good to know that it is working for you too. What actual parameters did you use?
I am asking because /m for mjpg versus /u for yuyv makes a big difference in processing.
The mjpg images are sent as is whereas the yuyv images are converted to mjpg first.

I think that for the C270 with /r4 the resolution is 320x176 rather than 320x180.

Thanks for testing and reporting back.
Title: Re: Use of webcam
Post by: Remy on June 26, 2020, 08:55:46 pm
Hi Rémy,

Good to know that it is working for you too. What actual parameters did you use?
I am asking because /m for mjpg versus /u for yuyv makes a big difference in processing.
The mjpg images are sent as is whereas the yuyv images are converted to mjpg first.

I think that for the C270 with /r4 the resolution is 320x176 rather than 320x180.

Thanks for testing and reporting back.

Hi Wim,

Yes, you are right, it is 320x176 with /r4   (I rounded by error the value after taking a window copy by pmview - before changing it to window interior).

I know use ffprob instead of ffplay to get all information with accurate values
webcam /s/r4 | ffprobe -i -
or
webcam /s/r4 | ffprobe -show_streams -i - | more

[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=192
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=320
height=176
coded_width=320
coded_height=176
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]

webcam /u/s/r4 | ffprobe -show_streams -i - | more
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=192
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=320
height=176
coded_width=320
coded_height=176
has_b_frames=0
sample_aspect_ratio=1:1
display_aspect_ratio=20:11
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]

webcam /m/s/r4 | ffprobe -show_streams -i - | more
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=192
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=320
height=176
coded_width=320
coded_height=176
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]

The strange is that I have 640x480 if no /rN parm but the second cam QuickCam pro 9000 has a 160x120 size
With the previous build, I had 640x480 in both cases without new /rN parm which was better as general default size.

Regards
Rémy
Title: Re: Use of webcam
Post by: Remy on June 26, 2020, 09:06:43 pm
Comparaison on the QuickCam pro 9000

webcam /m/s/r3 | ffprobe -show_streams -i - | more
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=192
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=320
height=240
coded_width=320
coded_height=240
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]

webcam /u/s/r3 | ffprobe -show_streams -i - | more
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=192
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=320
height=240
coded_width=320
coded_height=240
has_b_frames=0
sample_aspect_ratio=1:1
display_aspect_ratio=4:3
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]

Note: without /u or /m parm,

QuickCam pro 9000 has:
started.
format:yuyv

while C270 has
started.
format:mjpg

Regards
Rémy
 
Title: Re: Use of webcam
Post by: Wim Brul on June 27, 2020, 03:13:58 pm
Hi Rémy,

Quote
The strange is that I have 640x480 if no /rN parm but the second cam QuickCam pro 9000 has a 160x120 size
With the previous build, I had 640x480 in both cases without new /rN parm which was better as general default size.

All webcams are not equal. Most supply both mjpg and yuyv formats while some provide just mjpg or yuyv formats.
Also the number of resolutions as well as the sequence of these in the list of supported formats varies by webcam.
Right now without /rN parm the first entry in that list is taken. Hence becomes 160x120 for the QuickCam pro 9000.
Since you prefer 640x480 default for all webcams I could change that behavior to force 640x480 instead. But...

It might be better to drop the /rN parameter in favor of /xN and /yN parameters.
The list will be scanned until a match with the /xN and /yN parameters is found.
If only the /xN parameter is used then only a match with /xN will be performed.
If only the /yN parameter is used then only a match with /yN will be performed.
Without /xN and /yN parameters the list is scanned for 640x480 resolution.

What do you think?

Regards,
Wim.
 
 
Title: Re: Use of webcam
Post by: Remy on June 29, 2020, 01:29:41 pm
Hi Rémy,

Quote
The strange is that I have 640x480 if no /rN parm but the second cam QuickCam pro 9000 has a 160x120 size
With the previous build, I had 640x480 in both cases without new /rN parm which was better as general default size.

All webcams are not equal. Most supply both mjpg and yuyv formats while some provide just mjpg or yuyv formats.
Also the number of resolutions as well as the sequence of these in the list of supported formats varies by webcam.
Right now without /rN parm the first entry in that list is taken. Hence becomes 160x120 for the QuickCam pro 9000.
Since you prefer 640x480 default for all webcams I could change that behavior to force 640x480 instead. But...

It might be better to drop the /rN parameter in favor of /xN and /yN parameters.
The list will be scanned until a match with the /xN and /yN parameters is found.
If only the /xN parameter is used then only a match with /xN will be performed.
If only the /yN parameter is used then only a match with /yN will be performed.
Without /xN and /yN parameters the list is scanned for 640x480 resolution.

What do you think?

Regards,
Wim.
 

Hi Wim,

Your suggestion seems easier tu use.
In addition to your suggest, may I suggest to add:
If /xN nor /yN parameters are found, the list is scanned for 640x480 resolution.

Ak.

Regards
Rémy
Title: Re: Use of webcam
Post by: Wim Brul on July 04, 2020, 03:58:24 pm
Hi Rémy,

In addition to your suggest, may I suggest to add:
If /xN nor /yN parameters are found, the list is scanned for 640x480 resolution.
Alright, done. In the meantime I tried to implement streaming raw audio from the builtin microphone to \PIPE\Webcam\Audio with mixed results.

WARNING: This is beta test software! May only be used at your own risk! This time BACKUP YOUR SYSTEM TWICE before even trying.

The problems (traps) are related to the USB driver set installed. Only after installing the Lars Erdmann 10.234 drivers I got rid of the traps.

Note that for now the audio part is hardcoded for the logitech c250/c270 to stream 16-bit, mono, 48000Hz. raw audio.

Your mileage may vary. I keep my fingers crossed.

Regards,
Wim.
Title: Re: Use of webcam
Post by: David McKenna on July 04, 2020, 07:06:47 pm
Hi Wim,

  I decided to give this a try with my Logitech C270, and it works! I ran:

webcam /u/x640/y360/a/h/n/s | ffplay -f mjpeg -framerate 50 -i -

 and got a window with live video. Then ran:

ffplay -f s16le -ar 48000 -ac 1 -showmode 1 -i \PIPE\Webcam\Audio

 and got another window with a live sound wave and could hear the echo of my voice... woohoo!

 When I went to shut it all down, I got a TrapE in USBEHCI when I closed the webcam console. I am using both of Lars' USBAudio drivers. The console showed a couple of errors, so I will upload a log of it in case it is interesting. Thanks for this great software!

Regards,
Title: Re: Use of webcam
Post by: Remy on July 04, 2020, 08:19:25 pm
Hi Rémy,

In addition to your suggest, may I suggest to add:
If /xN nor /yN parameters are found, the list is scanned for 640x480 resolution.
Alright, done. In the meantime I tried to implement streaming raw audio from the builtin microphone to \PIPE\Webcam\Audio with mixed results.

WARNING: This is beta test software! May only be used at your own risk! This time BACKUP YOUR SYSTEM TWICE before even trying.

The problems (traps) are related to the USB driver set installed. Only after installing the Lars Erdmann 10.234 drivers I got rid of the traps.

Note that for now the audio part is hardcoded for the logitech c250/c270 to stream 16-bit, mono, 48000Hz. raw audio.

Your mileage may vary. I keep my fingers crossed.

Regards,
Wim.

Hi Wim

/x and /y works but as soon I enable /a, it hung and I have a trapE
I'm unable to get any audio stream.

Regards
Rémy
Title: Re: Use of webcam
Post by: Lars on July 05, 2020, 02:12:35 am
Hi Wim,

  I decided to give this a try with my Logitech C270, and it works! I ran:

webcam /u/x640/y360/a/h/n/s | ffplay -f mjpeg -framerate 50 -i -

 and got a window with live video. Then ran:

ffplay -f s16le -ar 48000 -ac 1 -showmode 1 -i \PIPE\Webcam\Audio

 and got another window with a live sound wave and could hear the echo of my voice... woohoo!

 When I went to shut it all down, I got a TrapE in OS2EHCI when I closed the webcam console. I am using both of Lars' USBAudio drivers. The console showed a couple of errors, so I will upload a log of it in case it is interesting. Thanks for this great software!

Regards,
If you can post a screen shot of the trap screen, I have a chance to fix the error.
Title: Re: Use of webcam
Post by: Remy on July 05, 2020, 03:08:47 am
Hi Lars,

It looks to be same trap000e "not the same driver" I use
now: USB 12.6 ArcaOS drivers (only the USB3 driver is not used due it does not support isochronous transfer)

Updated comments:
I did more tests.
- Start webcam /a/n     (entering ctrl/c -> trap 000e)   
- Start webcam /a/n
   Start ffplay for audio in a prompt cmd window (could get audio)
   Start ffplay for video in an other prompt cmd window (could get video)
   note: audio is out of syncro with a big gap (nearly 2s after video)
   Close of ffplay audio window ok
   Close of fffplay video window ok
   ctrl/c under webcam window => trap 000e   

Note: for information, -framerate 50 will double the framerate by ffplay but not webcam which provides 25 fps for the specified cam.

Regards
Rémy
Title: Re: Use of webcam
Post by: David McKenna on July 05, 2020, 04:05:00 am
Lars,

 Screen shot attached - similar to Remy's, but not exact. I am using the ArcaNoae 12.06 USB stack including the USBXHCD driver, but audio is your 2: USBAUDIO.SYS and USBAUD2.SYS, ver 10.234.

Regards,
Title: Re: Use of webcam
Post by: Lars on July 05, 2020, 10:23:47 am
I am sorry but the trap happens in USBEHCD of the AN 12.x stack. Of course,that is very different from my driver (it's 32-bit driver to begin with).
Of course,I do not have access to the source code of that driver. You will need to raise a problem report with AN.
If you use my full driver set and if you also get a TRAP000E, I will be able to fix it.
Title: Re: Use of webcam
Post by: Remy on July 05, 2020, 12:06:15 pm
I opened a ticket at Arca Noae bugtracker
Title: Re: Use of webcam
Post by: Lars on July 05, 2020, 04:59:59 pm
What I CAN say about the 2 trap screens:
they point to the very same error location.
The fact that the upper 16 bits of the 32-bit trap offset (EIP) differ is due to the address mapping. The lower 16 bits however are identical.
Title: Re: Use of webcam
Post by: Wim Brul on July 05, 2020, 06:23:41 pm
Hi David and Rémy,

Thanks for the courage to test and reporting back. This is the trap screen I get when running eComStation 2.2 with AN 12.06 drivers:
Code: [Select]
dumptrapscreen v0.4 reading y:\dumpdata.001 07-05-20  11:30:30

Exception in module: USBEHCD
TRAP 000e       ERRCD=0002  ERACC=****  ERLIM=******** CPU=01
EAX=00000060  EBX=f9758910  ECX=00000001  EDX=00000000
ESI=00000060  EDI=00000060  EBP=fce78000  FLG=00010206
CS:EIP=0168:ffc3ee8a  CSACC=c09b  CSLIM=ffffffff
SS:ESP=1550:f8d73f04  SSACC=c093  SSLIM=ffffffff
DS=0160  DSACC=c093  DSLIM=ffffffff  CR0=8001003b
ES=0160  ESACC=c093  ESLIM=ffffffff  CR2=f9758910
FS=0000  FSACC=****  FSLIM=********
GS=0000  GSACC=****  GSLIM=********

Internal revision 14.106_SMP
Same location as to Lars' comment.

I suspect the trap occurs while running the following code:
Code: [Select]
; cancel isochronous audio transfers
  call UsbCancelTransfer c,[fhDevice],[aAddrEndpoint],[aAltInterface],[iAudioEvent]
; close isochronous audio transfer
  call UsbIsoClose c,[fhDevice],[aAddrEndpoint],[aAltInterface]
; reset alternative audio interface request
  call UsbCtrlMessage c,[fhDevice],001h,0Bh,0,[aNumInterface],0,0,0
And specifically during the UsbCancelTransfer function.

I opened a ticket at Arca Noae bugtracker
I could not find that bug report in mantis. Please check.
Title: Re: Use of webcam
Post by: Remy on July 05, 2020, 07:27:19 pm
https://mantis.arcanoae.com/view.php?id=2926
It is set as private.
Title: Re: Use of webcam
Post by: Andreas Schnellbacher on July 05, 2020, 08:09:19 pm
Why private?
Title: Re: Use of webcam
Post by: Remy on July 05, 2020, 09:42:26 pm
Why private?

It always goes private in case of new fixtest
Title: Re: Use of webcam
Post by: Remy on July 06, 2020, 01:37:45 pm
Hi Rémy,

In addition to your suggest, may I suggest to add:
If /xN nor /yN parameters are found, the list is scanned for 640x480 resolution.
Alright, done. In the meantime I tried to implement streaming raw audio from the builtin microphone to \PIPE\Webcam\Audio with mixed results.

WARNING: This is beta test software! May only be used at your own risk! This time BACKUP YOUR SYSTEM TWICE before even trying.

The problems (traps) are related to the USB driver set installed. Only after installing the Lars Erdmann 10.234 drivers I got rid of the traps.

Note that for now the audio part is hardcoded for the logitech c250/c270 to stream 16-bit, mono, 48000Hz. raw audio.

Your mileage may vary. I keep my fingers crossed.

Regards,
Wim.

Hi Wim,

Something is strange, using only the video (no /a), and specifying /x and /y, I have a big delay !
Previous build had a short delay (a few ms) while now, the delay is near 2s !  (time betwwen the real movement until it is shown in the video)
(with ot without /x /y parm, the result is the same)

Any idea about this ?
Is it going into the video size list for each mjpeg ?

Regards
Rémy
Title: Re: Use of webcam
Post by: Wim Brul on July 06, 2020, 04:27:24 pm
Hi Wim,

Something is strange, using only the video (no /a), and specifying /x and /y, I have a big delay !
Previous build had a short delay (a few ms) while now, the delay is near 2s !  (time betwwen the real movement until it is shown in the video)
(with ot without /x /y parm, the result is the same)

Any idea about this ?
Is it going into the video size list for each mjpeg ?

Regards
Rémy

Hi Rémy,

The previous build and this one work the same. The delay occurs when ffplay decides to buffer the video stream before showing it.
When using "webcam /m/s | ffplay -i -" then there is that big delay (shows vq= 742KB which I guess is the buffer size used) .
When using "webcam /m/s | ffplay -framerate 50 -i -" there appears to be almost no delay.
When using "webcam /f5/m/s | ffplay -framerate 50 -i -" there is is almost no delay too.

And no, the video size list is only scanned once or twice at the start of the program.

Regards,
Wim

Title: Re: Use of webcam
Post by: Remy on July 06, 2020, 08:14:46 pm
Hi Wim,

Something is strange, using only the video (no /a), and specifying /x and /y, I have a big delay !
Previous build had a short delay (a few ms) while now, the delay is near 2s !  (time betwwen the real movement until it is shown in the video)
(with ot without /x /y parm, the result is the same)

Any idea about this ?
Is it going into the video size list for each mjpeg ?

Regards
Rémy

Hi Rémy,

The previous build and this one work the same. The delay occurs when ffplay decides to buffer the video stream before showing it.
When using "webcam /m/s | ffplay -i -" then there is that big delay (shows vq= 742KB which I guess is the buffer size used) .
When using "webcam /m/s | ffplay -framerate 50 -i -" there appears to be almost no delay.
When using "webcam /f5/m/s | ffplay -framerate 50 -i -" there is is almost no delay too.

And no, the video size list is only scanned once or twice at the start of the program.

Regards,
Wim

Thanks Wim.
I did new tests and sometimes, I have no latency with framerate 25 but yes, mostly I have it (ffplay is the one adding latency as you wrote)
I found that some parameters makes the video well at start but them, the delay appears and stay constant.
My be I didn't run enough time to see it before and yes, using basic parameters, latency is the same.
Strange having to use a framerate higher than the real one to prevent the delay... (this may introduce more processing)

I added a few more parameters in my ffplay command for lowest latency.
ffplay -f mjpeg -threads auto -framerate 50 -i \PIPE\Webcam\Video

Setting framerate to 30 show vq (video queuing left at 0) while framerate 25 make it increase (not all the time) slowly up to 567K (in my case). As soon vq increases, latency appears and increases as long vq increases. From my tests, adding 5 fps to the real framerate prevents high latency

" delay (seconds) = vq_number * 8 * 1024 / video_stream_bits_per_second "

Then, to not have the "invalid data found" message due specific Logitech process, I added the -v quiet flag
 ffplay -f mjpeg -threads auto -framerate 30 -v quiet -i \PIPE\Webcam\Video

Best regards
Rémy
Title: Re: Use of webcam
Post by: Remy on July 07, 2020, 08:47:29 pm
Hi Rémy,

In addition to your suggest, may I suggest to add:
If /xN nor /yN parameters are found, the list is scanned for 640x480 resolution.
Alright, done. In the meantime I tried to implement streaming raw audio from the builtin microphone to \PIPE\Webcam\Audio with mixed results.

WARNING: This is beta test software! May only be used at your own risk! This time BACKUP YOUR SYSTEM TWICE before even trying.

The problems (traps) are related to the USB driver set installed. Only after installing the Lars Erdmann 10.234 drivers I got rid of the traps.

Note that for now the audio part is hardcoded for the logitech c250/c270 to stream 16-bit, mono, 48000Hz. raw audio.

Your mileage may vary. I keep my fingers crossed.

Regards,
Wim.

I re-wrote my WCC gui and added a readme pdf file to READ before use WCC.
It works with this latest build and by default, audio is disabled to not have the trap000e issue.  (do not enable audio option until it is resolved)

 
Title: Re: Use of webcam
Post by: TeLLie on July 07, 2020, 11:22:36 pm
Hi Remy

I have a Lenova W530
When i start wcc i cannot turn it on

I see only:
The Process Identification Number is 2102.
The Process Identification Number is 2104.
The Process Identification Number is 2106.
The Process Identification Number is 2108.
The Process Identification Number is 2110.
The Process Identification Number is 2112.
The Process Identification Number is 2114.
Title: Re: Use of webcam
Post by: Remy on July 08, 2020, 11:25:52 am
Hi Remy

I have a Lenova W530
When i start wcc i cannot turn it on

I see only:
The Process Identification Number is 2102.
The Process Identification Number is 2104.
The Process Identification Number is 2106.
The Process Identification Number is 2108.
The Process Identification Number is 2110.
The Process Identification Number is 2112.
The Process Identification Number is 2114.

It looks like one required program isn't found !
(webcam or ffplay)

ArcaOS or eCS or OS/2 ?
Is the button going red or is it still green when you click it ?
Where did you see these messages ? 
Did you follow the WCC-readme recommendations ?
- put WCC under ffplay path if ffplay path isn't under config path statement   
- Did you add the required parms under properties ?  (e.g. TR /n webcampath)
 
Settings done (specially getting supported video size list) - ( S ) button ?
Do you have all requirements installed as well ffplay ?

Regards
Rémy
Title: Re: Use of webcam
Post by: TeLLie on July 08, 2020, 08:06:08 pm
Hi remy
Where did you get ffmpeg 4.2.2
As i downloaded from hobbes 4.0.2 but that one complains about mp3lame.dll, i have mp3lame0.dll
So its like you said i miss something.
I run it with wcc 2>&1 |tee run.out
I now get:
The Process Identification Number is 121.
started.
format:mjpg
On-line. Use Ctrl+Break to end.
On-line. Use Ctrl+Break to end.
SYS1804: The system cannot find the file MP3LAME.
SYS1804: The system cannot find the file MP3LAME.
SYS1804: The system cannot find the file MP3LAME.
[close isochronous]
stopped.

Title: Re: Use of webcam
Post by: Remy on July 08, 2020, 08:59:44 pm
Hi remy
Where did you get ffmpeg 4.2.2
As i downloaded from hobbes 4.0.2 but that one complains about mp3lame.dll, i have mp3lame0.dll
So its like you said i miss something.
I run it with wcc 2>&1 |tee run.out
I now get:
The Process Identification Number is 121.
started.
format:mjpg
On-line. Use Ctrl+Break to end.
On-line. Use Ctrl+Break to end.
SYS1804: The system cannot find the file MP3LAME.
SYS1804: The system cannot find the file MP3LAME.
SYS1804: The system cannot find the file MP3LAME.
[close isochronous]
stopped.

Hi, sorry but 4.2.2 is a test build (not finalized by its owner) I use to update my AVxCAT GUI
You have mp3lame.dll here
https://hobbes.nmsu.edu/download/pub/os2/dev/mm/lame-3.99.5.zip 
Title: Re: Use of webcam
Post by: Wim Brul on July 09, 2020, 06:01:31 pm
Hi Rémy,

I have WCC.zip unzipped into e:\wim\testen\wcc
I have ffmpeg 2.8.6-2 installed using Arca Noae Package Manager.
I defined WCC.EXE Parameters: tr /n e:\wim\project\webcam03

I double click on WCC.EXE and the green WebCam OFF button shows at top right.
I find it confusing that it shows WebCam OFF since clicking it turns WebCam ON.
I suppose the button is green because the light on the webcam is off.

I click on the WebCam OFF button and it becomes the red WebCam ON button.
It is confusing that it shows WebCam ON since clicking it turns WebCam OFF.
I suppose the button is red because the light on the webcam is on.

The show button and [] button can be used now and this will show a WebCam window.
When I click on the show button I see myself in 640x480 format in a WebCam window.
When I click on the [] button I see myself in 160x120 format in a WebCam window.

For me it is working with the logitech c250 webcam. I can switch it on and off.
I can see myself in the WebCam window either at 640x480 or at 160x120 resolution.

It did not work right away with the builtin webcam on my dell latitude e6500 laptop.
I could switch that webcam on and off but no picture of myself appeared on screen.
I had to select yuyv in the Defaults pulldown of the Parameters dialog window.
Unfortunately this webcam also needs the /c parameter to get a proper picture.
There is no way right now that I can input that parameter. It gets stripped.

I can change the Min-Size: in the Parameters dialog window and see myself accordingly.
I cannot change the Size: in the Parameters dialog window to see myself accordingly.

Using Vsize List in the Query pulldown and MaxVsize in the Defaults pulldown fails.
There appears an ffprobe -show_streams -i \PIPE\Webcam\Video 2>&1 |RXQUEUE FF window.
But that is all. My Arca Noae system does have h:\sys\dll\rxutilex.dll installed.

Best regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 09, 2020, 07:03:34 pm
Hi Rémy,

I have WCC.zip unzipped into e:\wim\testen\wcc
I have ffmpeg 2.8.6-2 installed using Arca Noae Package Manager.
I defined WCC.EXE Parameters: tr /n e:\wim\project\webcam03

I double click on WCC.EXE and the green WebCam OFF button shows at top right.
I find it confusing that it shows WebCam OFF since clicking it turns WebCam ON.
I suppose the button is green because the light on the webcam is off.

I click on the WebCam OFF button and it becomes the red WebCam ON button.
It is confusing that it shows WebCam ON since clicking it turns WebCam OFF.
I suppose the button is red because the light on the webcam is on.

The show button and [] button can be used now and this will show a WebCam window.
When I click on the show button I see myself in 640x480 format in a WebCam window.
When I click on the [] button I see myself in 160x120 format in a WebCam window.

For me it is working with the logitech c250 webcam. I can switch it on and off.
I can see myself in the WebCam window either at 640x480 or at 160x120 resolution.

It did not work right away with the builtin webcam on my dell latitude e6500 laptop.
I could switch that webcam on and off but no picture of myself appeared on screen.
I had to select yuyv in the Defaults pulldown of the Parameters dialog window.
Unfortunately this webcam also needs the /c parameter to get a proper picture.
There is no way right now that I can input that parameter. It gets stripped.

I can change the Min-Size: in the Parameters dialog window and see myself accordingly.
I cannot change the Size: in the Parameters dialog window to see myself accordingly.

Using Vsize List in the Query pulldown and MaxVsize in the Defaults pulldown fails.
There appears an ffprobe -show_streams -i \PIPE\Webcam\Video 2>&1 |RXQUEUE FF window.
But that is all. My Arca Noae system does have h:\sys\dll\rxutilex.dll installed.

Best regards,
Wim.

Hi Wim (OFF or ON is the current status - Green = OFF)
I can change it to not make it confusing

/c parameter isn't added yet, I'll change WCC to integrate this option
Do you have FFPROBE ? I'm not sure it was available under ffmpeg 2.8.6  (it is required when using this option)
I use FFPROBE to get stream caracteristics as well working sizes

Regards
Rémy
Title: Re: Use of webcam
Post by: Wim Brul on July 10, 2020, 06:48:09 pm
Hi Rémy,

Hi Wim (OFF or ON is the current status - Green = OFF)
I can change it to not make it confusing

/c parameter isn't added yet, I'll change WCC to integrate this option
Do you have FFPROBE ? I'm not sure it was available under ffmpeg 2.8.6  (it is required when using this option)
I use FFPROBE to get stream caracteristics as well working sizes

Regards
Rémy
Thank you for integrating the /cN option. FFPROBE does work with ffmpeg 2.8.6. I did some more testing see below.

Using Vsize List in the Query pulldown and MaxVsize in the Defaults pulldown does work for the c250 webcam.
But it does not work for the builtin webcam on my dell latitude e6500. No images sent for the format requested.

The ffprobe appears to be waiting forever for mjpg video data that is never coming. I think a timeout is needed.
Also probing specifically for yuyv need to be done when the Defaults yuyv has been selected by the user.

Regards,
Wim.
Title: Re: Use of webcam
Post by: TeLLie on July 12, 2020, 10:27:29 am
Hi,
After finally i have all dll found (I hope), it still dont  work

I run wcc tr /n e:\ffmpeg 2>&1 |tee make.out

The Process Identification Number is 97.

Is it still miss some dll or??
Title: Re: Use of webcam
Post by: Remy on July 13, 2020, 01:04:57 am
Hi,
After finally i have all dll found (I hope), it still dont  work

I run wcc tr /n e:\ffmpeg 2>&1 |tee make.out

The Process Identification Number is 97.

Is it still miss some dll or??

why are you specifying  e:\ffmpeg !!!
I hope it is webcam path as required.
Where did you put wcc ?
Title: Re: Use of webcam
Post by: Remy on July 13, 2020, 01:09:45 am
Hi Rémy,

Hi Wim (OFF or ON is the current status - Green = OFF)
I can change it to not make it confusing

/c parameter isn't added yet, I'll change WCC to integrate this option
Do you have FFPROBE ? I'm not sure it was available under ffmpeg 2.8.6  (it is required when using this option)
I use FFPROBE to get stream caracteristics as well working sizes

Regards
Rémy
Thank you for integrating the /cN option. FFPROBE does work with ffmpeg 2.8.6. I did some more testing see below.

Using Vsize List in the Query pulldown and MaxVsize in the Defaults pulldown does work for the c250 webcam.
But it does not work for the builtin webcam on my dell latitude e6500. No images sent for the format requested.

The ffprobe appears to be waiting forever for mjpg video data that is never coming. I think a timeout is needed.
Also probing specifically for yuyv need to be done when the Defaults yuyv has been selected by the user.

Regards,
Wim.

I'll check this updating my wcc.
For your information: I just could test a proposed fix for the usb driver to resolve trap000e and it does. Now waiting on a new release with the integrated fix.
Title: Re: Use of webcam
Post by: Remy on July 13, 2020, 02:57:33 pm
Hi Rémy,

Hi Wim (OFF or ON is the current status - Green = OFF)
I can change it to not make it confusing

/c parameter isn't added yet, I'll change WCC to integrate this option
Do you have FFPROBE ? I'm not sure it was available under ffmpeg 2.8.6  (it is required when using this option)
I use FFPROBE to get stream caracteristics as well working sizes

Regards
Rémy
Thank you for integrating the /cN option. FFPROBE does work with ffmpeg 2.8.6. I did some more testing see below.

Using Vsize List in the Query pulldown and MaxVsize in the Defaults pulldown does work for the c250 webcam.
But it does not work for the builtin webcam on my dell latitude e6500. No images sent for the format requested.

The ffprobe appears to be waiting forever for mjpg video data that is never coming. I think a timeout is needed.
Also probing specifically for yuyv need to be done when the Defaults yuyv has been selected by the user.

Regards,
Wim.

Hi Wim,
May be you can get a try to this update.
Ps: I can get audio out of the c270 but none out of webcam pro 9000.
Regards 

Updt 20/07/12: replaced zip package (corrected a setting)
Title: Re: Use of webcam
Post by: Wim Brul on July 13, 2020, 09:44:39 pm
Hi Rémy,

For your information: I just could test a proposed fix for the usb driver to resolve trap000e and it does. Now waiting on a new release with the integrated fix.
Very well. In the meantime I am improving audio from the c250/c270 webcams a.o. streaming wav audio rather than raw audio.

I can get audio out of the c270 but none out of webcam pro 9000.
The audio part has been hardcoded for the logitech c250/c270 to stream 16-bit, mono, 48000Hz. raw audio.

It will be helpful when you provide the lsusb report (lsusb -d 046d: -v) from the logitech Quickcam Pro 9000.
Scanning of the usb descriptors for audio information will be done in due course though. I am almost there.

Quote
May be you can get a try to this update.
Will do tomorrow.

Regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 13, 2020, 10:42:34 pm
Hi Wim,

Here is the output.
I have both c270 and LQP9000 connected.
At webcam run, only LQP9000 goes active (after unplug of LQP9000, C270 is well used)

C270
About audio, it comes out of ffplay nearly 2s after the video (2 ffplay process)
Title: Re: Use of webcam
Post by: TeLLie on July 14, 2020, 04:26:13 pm
Hi,
After finally i have all dll found (I hope), it still dont  work

I run wcc tr /n e:\ffmpeg 2>&1 |tee make.out

The Process Identification Number is 97.

Is it still miss some dll or??

Hi Remy

Yes is to path from wcc and webcam
Title: Re: Use of webcam
Post by: Wim Brul on July 14, 2020, 05:26:22 pm
Hi Rémy,

LSUB_QCP9000.txt contains only debug information:
Code: [Select]
libusb: 0.000000 debug [libusb_init] libusb-1.0.16-rc6
libusb: 0.000000 debug [usbi_add_pollfd] add fd 5 events 1
libusb: 0.000000 debug [usbi_add_pollfd] add fd 7 events 1
libusb: 0.000000 debug [libusb_get_device_list]
libusb: 0.000000 debug [os2_get_device_list]
libusb: 0.002000 debug [os2_get_device_list] 5 devices detected
libusb: 0.002000 debug [os2_get_device_list] unable to query device report - device= 1  rc= ffea
libusb: 0.002000 debug [libusb_exit]
libusb: 0.002000 debug [usbi_remove_pollfd] remove fd 5
libusb: 0.002000 debug [usbi_remove_pollfd] remove fd 7
Where rc=ffea means: 0xFFEA - ERROR_MORE_DATA -  More data is available.

Perhaps lsusb has not enough buffer space to query that webcams device report?
Or something else is wrong. Try just lsusb to get a list of attached usb devices.
Try to get a device report from some other usb device to see if that works.

Regards,
Wim.
Title: Re: Use of webcam
Post by: Wim Brul on July 14, 2020, 07:16:14 pm
Hi Rémy,

About audio, it comes out of ffplay nearly 2s after the video (2 ffplay process)
I improved streaming audio from the c250/c270 webcams (wav audio instead of raw audio).
When you click on the xhpipe.cmd window then there is hardly a delay in audio anymore.

Too bad that one click is needed...

Regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 14, 2020, 07:46:27 pm
Hi Rémy,

LSUB_QCP9000.txt contains only debug information:
Code: [Select]
libusb: 0.000000 debug [libusb_init] libusb-1.0.16-rc6
libusb: 0.000000 debug [usbi_add_pollfd] add fd 5 events 1
libusb: 0.000000 debug [usbi_add_pollfd] add fd 7 events 1
libusb: 0.000000 debug [libusb_get_device_list]
libusb: 0.000000 debug [os2_get_device_list]
libusb: 0.002000 debug [os2_get_device_list] 5 devices detected
libusb: 0.002000 debug [os2_get_device_list] unable to query device report - device= 1  rc= ffea
libusb: 0.002000 debug [libusb_exit]
libusb: 0.002000 debug [usbi_remove_pollfd] remove fd 5
libusb: 0.002000 debug [usbi_remove_pollfd] remove fd 7
Where rc=ffea means: 0xFFEA - ERROR_MORE_DATA -  More data is available.

Perhaps lsusb has not enough buffer space to query that webcams device report?
Or something else is wrong. Try just lsusb to get a list of attached usb devices.
Try to get a device report from some other usb device to see if that works.

Regards,
Wim.

I only have debug output, nothing else

Updt: I progressed

Case 1:  USB 12.6 (usb3 driver loaded) -> lsusb provides report except for my webcam attached usb  (sochronous isn't supported) but I have wireless KB and Mouse connected to an USB2 received which is no more responding at end of lsusb.exe (unplug both webcam and USB2 receiver followed by usb2 receiver plugin provides KB and Mouse control again.

Case 2: USB 12.6 (usb2 driver loaded instead of loading USB3) -> lsusb provides no report (always using AN libusb10.dll)
Case 3: USB 12.7 (only test experimental) -> with ot without USB3 driver, lsusb.exe provides no output (using AN libusb10.dll). Using the libusb10.dll suggested with lsusb.exe, I only could get the debug output (but without loading usb3 driver) 

Title: Re: Use of webcam
Post by: Remy on July 15, 2020, 12:37:34 am
Hi,
After finally i have all dll found (I hope), it still dont  work

I run wcc tr /n e:\ffmpeg 2>&1 |tee make.out

The Process Identification Number is 97.

Is it still miss some dll or??

Hi Remy

Yes is to path from wcc and webcam

a/ Do not add 2>&1 |tee make.out   (it has no sense due you only get wcc pid)
b/ I suppose "e:\ffmpeg" isn't in your config.sys path statement   (according the actual code, ffmpeg could be not be found)
Please add the path at end of you path statement and give it a try.

note: I'll update WCC to correctly handle this case.

Updt: updated WCC follows
note: audio is supposed to be wav but it can be set to raw if needed  (usable with latest webcam)
Title: Re: Use of webcam
Post by: Wim Brul on July 15, 2020, 10:19:57 pm
Hi Rémy,

There is not much I can do to make lsusb work on your system.
So I just installed lsusb on my ArcaOS 5.0 system for you to compare.

1. You need usbutils from Paul Smedley (lsusb-20130526_0.zip).
Code: [Select]
Directory of G:\lsusb:
26-05-13  1:22         97.368      0 a---  lsusb.exe

2. You need libusb1-legacy-0 installed (@unixroot/usr/lib/libusb10.dll).
Code: [Select]
Directory of H:\usr\lib:
17-06-16 12:24         24.217    124 a---  libusb10.dll

[G:\LSUSB]lsusb
lsusb: cannot open "H:\sys\bin/usb.ids", No such file or directory
Bus 001 Device 001: ID 1397:0508
Bus 001 Device 002: ID 0c45:63f0
Bus 001 Device 003: ID 056a:030e
Bus 001 Device 004: ID 0a5c:5800

3. you need usb.ids in h:\sys\bin (copy from h:\mptn\usb.ids).
Code: [Select]
[G:\LSUSB]copy h:\mptn\etc\usb.ids h:\sys\bin\*.*
        1 file(s) copied.

[G:\LSUSB]lsusb
Bus 001 Device 001: ID 1397:0508 BEHRINGER International GmbH
Bus 001 Device 002: ID 0c45:63f0 Microdia
Bus 001 Device 003: ID 056a:030e Wacom Co., Ltd CTL-480 [Intuos Pen (S)]
Bus 001 Device 004: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor

Regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 15, 2020, 10:26:17 pm
Hi Rémy,

There is not much I can do to make lsusb work on your system.
So I just installed lsusb on my ArcaOS 5.0 system for you to compare.

1. You need usbutils from Paul Smedley (lsusb-20130526_0.zip).
Code: [Select]
Directory of G:\lsusb:
26-05-13  1:22         97.368      0 a---  lsusb.exe

2. You need libusb1-legacy-0 installed (@unixroot/usr/lib/libusb10.dll).
Code: [Select]
Directory of H:\usr\lib:
17-06-16 12:24         24.217    124 a---  libusb10.dll

[G:\LSUSB]lsusb
lsusb: cannot open "H:\sys\bin/usb.ids", No such file or directory
Bus 001 Device 001: ID 1397:0508
Bus 001 Device 002: ID 0c45:63f0
Bus 001 Device 003: ID 056a:030e
Bus 001 Device 004: ID 0a5c:5800

3. you need usb.ids in h:\sys\bin (copy from h:\mptn\usb.ids).
Code: [Select]
[G:\LSUSB]copy h:\mptn\etc\usb.ids h:\sys\bin\*.*
        1 file(s) copied.

[G:\LSUSB]lsusb
Bus 001 Device 001: ID 1397:0508 BEHRINGER International GmbH
Bus 001 Device 002: ID 0c45:63f0 Microdia
Bus 001 Device 003: ID 056a:030e Wacom Co., Ltd CTL-480 [Intuos Pen (S)]
Bus 001 Device 004: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor

Regards,
Wim.

All was already done and checked under my system !
1 ok, 2 ok, 3 usb.ids copied and tried latest one too.
No output as soon the usb3 driver is put into comment to use USB2 and find the webcam 

I see that you have the same issue that I have when using USB 12.6 (as I write it previously) 
- I think you left in you config.sys which make USB3 and USB2 handled by USBXHCD.SYS       
BASEDEV=USBXHCD.SYS
BASEDEV=USBXHCD.SYS
BASEDEV=USBEHCD.SYS
BASEDEV=USBEHCD.SYS
From your report, no webcam found !  (like me, no webcam found and I think this is related to know USBXHCD limitation)

To make the webcam work, you have to change config.sys like this :
REM BASEDEV=USBXHCD.SYS
REM BASEDEV=USBXHCD.SYS
BASEDEV=USBEHCD.SYS
BASEDEV=USBEHCD.SYS

Webcam works but lsusb no more provides any report...
Do you have the same issue in this case and are you able to get usb webcam lsusb results under your AN 5.0.5 ?
Regards
Rémy 

note: I asked the question to the support if this needs a new ticket.
Title: Re: Use of webcam
Post by: Wim Brul on July 16, 2020, 09:56:59 am
Hi Rémy,

Quote
I see that you have the same issue that I have when using USB 12.6 (as I write it previously)
Not really true. I have no problem using lsusb but then I am using Lars' 10.234 usb driver set.

Quote
From your report, no webcam found !  (like me, no webcam found and I think this is related to know USBXHCD limitation)
Not really true. The logitech c250 was not connected at that time. See below for the list when connected.

Code: [Select]
Bus 001 Device 001: ID 1397:0508 BEHRINGER International GmbH
Bus 001 Device 002: ID 0c45:63f0 Microdia
Bus 001 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 001 Device 004: ID 056a:030e Wacom Co., Ltd CTL-480 [Intuos Pen (S)]
Bus 001 Device 005: ID 046d:0804 Logitech, Inc. Webcam C250
The Microdia with ID 0c45:63f0 is the dell latitude e6500 builtin webcam.

Quote
Webcam works but lsusb no more provides any report...
Do you have the same issue in this case and are you able to get usb webcam lsusb results under your AN 5.0.5 ?
note: I asked the question to the support if this needs a new ticket.
No. I don't have usbxhcd.sys installed. and I have only usb 2.0 ports. I am using AN 5.0 i.e. the first release.
You could try and use USB Device Monitor Version 0.9.7 (usbres.exe) to see if the webcam is listed.
Seems to me that a new ticket is needed.

Regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 16, 2020, 06:53:24 pm
Hi Rémy,

Quote
I see that you have the same issue that I have when using USB 12.6 (as I write it previously)
Not really true. I have no problem using lsusb but then I am using Lars' 10.234 usb driver set.

Quote
From your report, no webcam found !  (like me, no webcam found and I think this is related to know USBXHCD limitation)
Not really true. The logitech c250 was not connected at that time. See below for the list when connected.

Code: [Select]
Bus 001 Device 001: ID 1397:0508 BEHRINGER International GmbH
Bus 001 Device 002: ID 0c45:63f0 Microdia
Bus 001 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 001 Device 004: ID 056a:030e Wacom Co., Ltd CTL-480 [Intuos Pen (S)]
Bus 001 Device 005: ID 046d:0804 Logitech, Inc. Webcam C250
The Microdia with ID 0c45:63f0 is the dell latitude e6500 builtin webcam.

Quote
Webcam works but lsusb no more provides any report...
Do you have the same issue in this case and are you able to get usb webcam lsusb results under your AN 5.0.5 ?
note: I asked the question to the support if this needs a new ticket.
No. I don't have usbxhcd.sys installed. and I have only usb 2.0 ports. I am using AN 5.0 i.e. the first release.
You could try and use USB Device Monitor Version 0.9.7 (usbres.exe) to see if the webcam is listed.
Seems to me that a new ticket is needed.

Regards,
Wim.

Sorry, I supposed you where on a higher AN modification level with USB3 support.

Did you upgrade to USB 12.6 or did you use older one ?
I know it works better before 12.6  (ok up to 12.5)
May be I have to backlevel my USB driver to 12.5 to get some information again...   (I will try)

Have a look, here are both HWMANAGER View (webcam is well listed) and USBRES under which no webcam is listed
- Webcam works well

I left my c270 plugged and added my webcam 9000 pro on an other USB2 port.
HWMANAGER show the same information and only C270 while HWEXPLORER (using latest Jully usb.ids shows the 9000pro webcam) which seems to be correct due when I start webcam, the 9000 pro goes active and not the c270....
See the HWEXPLORER output. 

Updt: latest testlog has the c270 only and no information about the 9000 pro !
I unplugged c270 and only left the 9000 pro, testlog didn't find it ...   

Title: Re: Use of webcam
Post by: Remy on July 16, 2020, 08:15:27 pm
Hi Wim,

When I specify alternate interface 1, I have a trap000e into USBRESMGR
From testlog, alternate interface 1 looks special having nep0 and nep1. I think webcam tries to use the first one instead of nep1.
Device 0:
  ctrlID=0 DevAdr=1 ConfigVal=2 IfNo=1 Speed=2 Port=3 HubIx=3
  USB Release number=0x200 DevReleaseNumber=0x10
  Class=239 SubClass=2 Protocol=1 MaxPacketSize=64
  Vendor:Product=046d:0825 NumConfigurations=1
  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=0x87 Attr=0x3 MaxPktSize=16 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
  Interface 3: Alt=4 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

 
 
Title: Re: Use of webcam
Post by: Tom on July 16, 2020, 11:36:14 pm
Remy,

Wim says below, that he is using version 234 of Lars' USB-drivers. That is version 10.234.
Versions 11.x (16-bits versions) and 12.x (32-bits versions) are AN-versions of the USB-drivers.
Different beasts, with different capabilities (like support for isochronous transfers or not, for example).

Hi Rémy,

Quote
I see that you have the same issue that I have when using USB 12.6 (as I write it previously)
Not really true. I have no problem using lsusb but then I am using Lars' 10.234 usb driver set.


Sorry, I supposed you where on a higher AN modification level with USB3 support.

Did you upgrade to USB 12.6 or did you use older one ?
I know it works better before 12.6  (ok up to 12.5)
May be I have to backlevel my USB driver to 12.5 to get some information again...   (I will try)

Title: Re: Use of webcam
Post by: Remy on July 17, 2020, 12:59:14 am
Remy,

Wim says below, that he is using version 234 of Lars' USB-drivers. That is version 10.234.
Versions 11.x (16-bits versions) and 12.x (32-bits versions) are AN-versions of the USB-drivers.
Different beasts, with different capabilities (like support for isochronous transfers or not, for example).

Hi Rémy,

Quote
I see that you have the same issue that I have when using USB 12.6 (as I write it previously)
Not really true. I have no problem using lsusb but then I am using Lars' 10.234 usb driver set.


Sorry, I supposed you where on a higher AN modification level with USB3 support.

Did you upgrade to USB 12.6 or did you use older one ?
I know it works better before 12.6  (ok up to 12.5)
May be I have to backlevel my USB driver to 12.5 to get some information again...   (I will try)


Right but 16 bits drivers are old style and not compatible with new HW (e.g. USB3)
It is better to work with new ones.
Because ha has AN 5.0, he can use USB 12.6 without USB3 use  (AN USB2 drivers well supports isochronous transfers)
Title: Re: Use of webcam
Post by: Lars on July 17, 2020, 09:08:26 am
are we now entering the dark world of fake news, or what ?

DANIS506.ADD is a 16-bit driver. Is it outdated just because of that ? There are loads of other 16-bit only device drivers, including all of the older MAC drivers ? Are they all outdated only because of that ?
Obviously you have been enough worked on to believe that 32-bit drivers are somehow a cure to the whole driver problem on OS/2. They are not, and the initial entry points to ANY driver are STILL 16-bit with the exception of IDC entry points which can be made 32-bit.

Also, my 16-bit drivers are not "not compatible with USB3". In fact, they would be but I have no incentive to write a USB3 host controller driver because I think OS/2 is at the end of its lifeline, or to say it with Frank Zappas words: "OS/2 ain't dead, it just smells funny".
Title: Re: Use of webcam
Post by: Wim Brul on July 17, 2020, 11:18:05 am
Hi Rémy,

Quote
Sorry, I supposed you where on a higher AN modification level with USB3 support.
No need to apologize. We never know what is exactly going on somewhere sometime. 

While developing Webcam Server for OS/2 (ArcaOS/eComStation) I used the 12.05 drivers.
That was cumbersome because I ran into a lot of traps, reboots, lost sources and so on.
It could be my poor coding or perhaps it was caused by something else. So what to do?
So I decided to follow the safest path I could think of: use Lars' 10.234 drivers.

Quote
Right but 16 bits drivers are old style and not compatible with new HW (e.g. USB3)
It is better to work with new ones.
Requires me to install ArcaOS 5.0.5 on my Dell Latitude e6500. No space. No time.
Therefore I am grateful that you, Rémy, work with ArcaOS 5.0.5 and the latest usb drivers.
And what is more, you take your time and effort to file problem reports in ArcaOS mantis.

Quote
I left my c270 plugged and added my webcam 9000 pro on an other USB2 port.
HWMANAGER show the same information and only C270 while HWEXPLORER (using latest Jully usb.ids shows the 9000pro webcam) which seems to be correct due when I start webcam, the 9000 pro goes active and not the c270....
See the HWEXPLORER output. 
The way you shwowed the output of Hardware Explorer is not convincing.
The Hardware Explorer must actually be running to get updated information.
And even then you need to redo showing that output using the way you did.
You better look at the life updating (tree) view of the Hardware Explorer.

Quote
May be I have to backlevel my USB driver to 12.5 to get some information again...   (I will try)
I think it is better to just report the problem that lsusb -v is not working with 12.06 drivers.
To get audio working for the logitech quickcam pro 9000 has to wait till that has been solved.
It is my understanding that the logitech quickcam pro for notebooks only supports 16000 Hz.
Perhaps the logitech quickcam pro 9000 only supports 16000 Hz too. Try webcam /a16000.
 
Best regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 17, 2020, 04:04:23 pm
are we now entering the dark world of fake news, or what ?

DANIS506.ADD is a 16-bit driver. Is it outdated just because of that ? There are loads of other 16-bit only device drivers, including all of the older MAC drivers ? Are they all outdated only because of that ?
Obviously you have been enough worked on to believe that 32-bit drivers are somehow a cure to the whole driver problem on OS/2. They are not, and the initial entry points to ANY driver are STILL 16-bit with the exception of IDC entry points which can be made 32-bit.

Also, my 16-bit drivers are not "not compatible with USB3". In fact, they would be but I have no incentive to write a USB3 host controller driver because I think OS/2 is at the end of its lifeline, or to say it with Frank Zappas words: "OS/2 ain't dead, it just smells funny".

Hi Lars, you do very great jobs.
I had read (no more know where) that AN had to go to 32bits to implement modern HW like USB3 (buffer size, recovery process etc...). May be I didn't well understand (this may be possible)

Regards
Rémy
Title: Re: Use of webcam
Post by: Remy on July 17, 2020, 04:10:51 pm
Hi Rémy,

Quote
Sorry, I supposed you where on a higher AN modification level with USB3 support.
No need to apologize. We never know what is exactly going on somewhere sometime. 

While developing Webcam Server for OS/2 (ArcaOS/eComStation) I used the 12.05 drivers.
That was cumbersome because I ran into a lot of traps, reboots, lost sources and so on.
It could be my poor coding or perhaps it was caused by something else. So what to do?
So I decided to follow the safest path I could think of: use Lars' 10.234 drivers.

Quote
Right but 16 bits drivers are old style and not compatible with new HW (e.g. USB3)
It is better to work with new ones.
Requires me to install ArcaOS 5.0.5 on my Dell Latitude e6500. No space. No time.
Therefore I am grateful that you, Rémy, work with ArcaOS 5.0.5 and the latest usb drivers.
And what is more, you take your time and effort to file problem reports in ArcaOS mantis.

Quote
I left my c270 plugged and added my webcam 9000 pro on an other USB2 port.
HWMANAGER show the same information and only C270 while HWEXPLORER (using latest Jully usb.ids shows the 9000pro webcam) which seems to be correct due when I start webcam, the 9000 pro goes active and not the c270....
See the HWEXPLORER output. 
The way you shwowed the output of Hardware Explorer is not convincing.
The Hardware Explorer must actually be running to get updated information.
And even then you need to redo showing that output using the way you did.
You better look at the life updating (tree) view of the Hardware Explorer.

Quote
May be I have to backlevel my USB driver to 12.5 to get some information again...   (I will try)
I think it is better to just report the problem that lsusb -v is not working with 12.06 drivers.
To get audio working for the logitech quickcam pro 9000 has to wait till that has been solved.
It is my understanding that the logitech quickcam pro for notebooks only supports 16000 Hz.
Perhaps the logitech quickcam pro 9000 only supports 16000 Hz too. Try webcam /a16000.
 
Best regards,
Wim.

I installed USB 12.6 and then fixtest 12.7 under AN 5.0.2
I'll try your suggestion about 16k support
I quickly reported the issue ("lsusb not working", nor usbres provides accurate information and asked if new ticket is required for a not GA testfix driver) under my trap000e ticket for which 12.7 testfix was provided.

note: If no reply from them in a few days, I'll open a ticket.
Regards
Rémy   
Title: Re: Use of webcam
Post by: Rich Walsh on July 17, 2020, 06:26:39 pm
To make the webcam work, you have to change config.sys like this :
REM BASEDEV=USBXHCD.SYS
REM BASEDEV=USBXHCD.SYS
BASEDEV=USBEHCD.SYS
BASEDEV=USBEHCD.SYS

Instead of disabling XHCD, have you tried changing the load order by putting EHCD first? If devices are offered to controllers based on load-order, this would give EHCD the chance to claim the device before XHCD. This is just a W-A-G but worth a try...
Title: Re: Use of webcam
Post by: Lars on July 17, 2020, 11:06:17 pm
Yes, that's worth a try.

But I can only say how it works for EHCI and OHCI/UHCI: if you have an EHCI host controller driver installed, right on driver HW initialization, the driver will "set a global switch" (configure flag) in the EHCI HW to claim all USB devices, regardless if USB2 or only USB 1.x. Later on, if a device is attached, there is an attach logic realized in HW where there is a special "USB2 chirp sequence" checked for by the EHCI HW. If the device does not send the chirp sequence, the EHCI driver will "reject" the device (handing over "port ownership") which either passes it over to a USB 1.x companion driver (and HW) if there is one (OHCI or UHCI) or the EHCI HW also contains a RMH (rate matching hub) which will convert the USB2 transfer to a USB 1.x transfer (which makes it largely transparent to SW if a device is a USB 2.0 device or USB 1.x device).

That said, I have not looked into the USB 3.x host controller spec if it follows the analogue sequence between USB 3.x and USB 2 if you have a port that can handle both, USB 3 and USB 2 (and USB 1.x).
Title: Re: Use of webcam
Post by: Remy on July 17, 2020, 11:52:31 pm
Yes, that's worth a try.

But I can only say how it works for EHCI and OHCI/UHCI: if you have an EHCI host controller driver installed, right on driver HW initialization, the driver will "set a global switch" (configure flag) in the EHCI HW to claim all USB devices, regardless if USB2 or only USB 1.x. Later on, if a device is attached, there is an attach logic realized in HW where there is a special "USB2 chirp sequence" checked for by the EHCI HW. If the device does not send the chirp sequence, the EHCI driver will "reject" the device (handing over "port ownership") which either passes it over to a USB 1.x companion driver (and HW) if there is one (OHCI or UHCI) or the EHCI HW also contains a RMH (rate matching hub) which will convert the USB2 transfer to a USB 1.x transfer (which makes it largely transparent to SW if a device is a USB 2.0 device or USB 1.x device).

That said, I have not looked into the USB 3.x host controller spec if it follows the analogue sequence between USB 3.x and USB 2 if you have a port that can handle both, USB 3 and USB 2 (and USB 1.x).

My mainboard has USB2 and USB3 ports  (USB3 can work as USB2 or USB1)
USB3 from mainboard works as USB2 when loading USB2 driver only. USB3 from my extra card (one USB3 and one USB3 C) requires USB3 drivers to work. Of course, my webcams are plugged into native USB2 port (not USB3)

I give a try as suggested with only C270 and lsusb doesn't produce any report.
- under HW manager (C270 is present)
- under HW Explorer (no C270)

With this order, I have error messages when USB3 tries to load   
With the normal ordre USB3 first followed by USB2, no error message (USB2 may have some special code to not issue message when its companion USB3 driver is loaded !)

Regards
Rémy

note: When AN USB3 is loaded, it is supposed to support all type of USB port (USB3, USB2 and USB1)
Title: Re: Use of webcam
Post by: Remy on July 17, 2020, 11:58:46 pm
Hi Rémy,

Quote
Sorry, I supposed you where on a higher AN modification level with USB3 support.
No need to apologize. We never know what is exactly going on somewhere sometime. 

While developing Webcam Server for OS/2 (ArcaOS/eComStation) I used the 12.05 drivers.
That was cumbersome because I ran into a lot of traps, reboots, lost sources and so on.
It could be my poor coding or perhaps it was caused by something else. So what to do?
So I decided to follow the safest path I could think of: use Lars' 10.234 drivers.

Quote
Right but 16 bits drivers are old style and not compatible with new HW (e.g. USB3)
It is better to work with new ones.
Requires me to install ArcaOS 5.0.5 on my Dell Latitude e6500. No space. No time.
Therefore I am grateful that you, Rémy, work with ArcaOS 5.0.5 and the latest usb drivers.
And what is more, you take your time and effort to file problem reports in ArcaOS mantis.

Quote
I left my c270 plugged and added my webcam 9000 pro on an other USB2 port.
HWMANAGER show the same information and only C270 while HWEXPLORER (using latest Jully usb.ids shows the 9000pro webcam) which seems to be correct due when I start webcam, the 9000 pro goes active and not the c270....
See the HWEXPLORER output. 
The way you shwowed the output of Hardware Explorer is not convincing.
The Hardware Explorer must actually be running to get updated information.
And even then you need to redo showing that output using the way you did.
You better look at the life updating (tree) view of the Hardware Explorer.

Quote
May be I have to backlevel my USB driver to 12.5 to get some information again...   (I will try)
I think it is better to just report the problem that lsusb -v is not working with 12.06 drivers.
To get audio working for the logitech quickcam pro 9000 has to wait till that has been solved.
It is my understanding that the logitech quickcam pro for notebooks only supports 16000 Hz.
Perhaps the logitech quickcam pro 9000 only supports 16000 Hz too. Try webcam /a16000.
 
Best regards,
Wim.

Tried webcam /a16000, no audio from 9000 pro
Title: Re: Use of webcam
Post by: Remy on July 18, 2020, 12:16:09 am
In fact: the webcam is visible under HW MANAGER if it is plugged into the usb port a boot time.
It isn't listed if it is plugged into the USB2 port after boot time but it works too !

* My C270 was always connected while I connected the 9000 pro after boot but this time, I left it connected and did a reboot. 

But this doesn't change lsusb problem with no report.   

From the teslog, I have now:

Device 0:
  ctrlID=0 DevAdr=1 ConfigVal=2 IfNo=0 Speed=2 Port=3 HubIx=3
  USB Release number=0x200 DevReleaseNumber=0x10
  Class=239 SubClass=2 Protocol=1 MaxPacketSize=64
  Vendor:Product=046d:0825 NumConfigurations=1
  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=0x87 Attr=0x3 MaxPktSize=16 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
  Interface 3: Alt=4 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

Device 3:
  ctrlID=3 DevAdr=0 ConfigVal=5 IfNo=1 Speed=2 Port=2 HubIx=2
  USB Release number=0x200 DevReleaseNumber=0x8
  Class=239 SubClass=2 Protocol=1 MaxPacketSize=64
  Vendor:Product=046d:0990 NumConfigurations=1
  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=0x87 Attr=0x3 MaxPktSize=16 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

Strange... I thought HW manager will show all connected HW before or after boot...
Title: Re: Use of webcam
Post by: Remy on July 18, 2020, 01:30:57 am
In fact: the webcam is visible under HW MANAGER if it is plugged into the usb port a boot time.
It isn't listed if it is plugged into the USB2 port after boot time but it works too !

* My C270 was always connected while I connected the 9000 pro after boot but this time, I left it connected and did a reboot. 

But this doesn't change lsusb problem with no report.   

From the teslog, I have now:

Device 0:
  ctrlID=0 DevAdr=1 ConfigVal=2 IfNo=0 Speed=2 Port=3 HubIx=3
  USB Release number=0x200 DevReleaseNumber=0x10
  Class=239 SubClass=2 Protocol=1 MaxPacketSize=64
  Vendor:Product=046d:0825 NumConfigurations=1
  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=0x87 Attr=0x3 MaxPktSize=16 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
  Interface 3: Alt=4 nEP=1 Class=1(Audio) SubClass=2 Protocol=0 StringIx=0

Device 3:
  ctrlID=3 DevAdr=0 ConfigVal=5 IfNo=1 Speed=2 Port=2 HubIx=2
  USB Release number=0x200 DevReleaseNumber=0x8
  Class=239 SubClass=2 Protocol=1 MaxPacketSize=64
  Vendor:Product=046d:0990 NumConfigurations=1
  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=0x87 Attr=0x3 MaxPktSize=16 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

Strange... I thought HW manager will show all connected HW before or after boot...

Same results for USBRES which shows now the logitech QuickCam pro 9000 (but not the C270!). This allows me to get needed information for you :D

<<< Device Description >>>
 Type            : 01
 USB Rev         : 200
 Class           : Unknown class EF
 Subclass        : Unknown Subclass EF
 Protocol        : Unknown Protocol EF
 Max. packetsize : 40
 Vendor  ID      : 046D
 Product ID      : 0990
 Device Release# : 0008
 Strings:
  Manufacturer Name : Not implemented
  Product Name      : Not implemented
  Serial number     : 1E2B4D27
 Number of Configurations : 1

 Configuration 0 :
  Lenght     : 1433
  Name       : <NONE>
  Value      : 1
  Attributes : 0x80
  Power      : 500 mA
  Interfaces : 4
No Interface 0x04, Endpoint 0x05 or Classspec 0x21-0x025 Description is 0x0B

  Interface 0
   Alt Setting : 0
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1
Class-Specific Interface Descriptor, Size : 13
Class-Specific Interface Descriptor, Size : 18
Class-Specific Interface Descriptor, Size : 11
Class-Specific Interface Descriptor, Size : 27
Class-Specific Interface Descriptor, Size : 27
Class-Specific Interface Descriptor, Size : 28
Class-Specific Interface Descriptor, Size : 9
No Interface 0x04, Endpoint 0x05 or Classspec 0x21-0x025 Description is 0x41
No Interface 0x04, Endpoint 0x05 or Classspec 0x21-0x025 Description is 0x41
No Interface 0x04, Endpoint 0x05 or Classspec 0x21-0x025 Description is 0x41
No Interface 0x04, Endpoint 0x05 or Classspec 0x21-0x025 Description is 0x41

   Endpoint 0:
    Address     : 87
    Attributes  : 03
    Packetsize  : 0010
    Interval    : 8
Class-Specific Endpoint Descriptor, Size : 5

  Interface 1
   Alt Setting : 0
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 0
Class-Specific Interface Descriptor, Size : 16
Class-Specific Interface Descriptor, Size : 11
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 38
Class-Specific Interface Descriptor, Size : 39
Class-Specific Interface Descriptor, Size : 6
Class-Specific Interface Descriptor, Size : 27
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 50
Class-Specific Interface Descriptor, Size : 46
Class-Specific Interface Descriptor, Size : 34
Class-Specific Interface Descriptor, Size : 30
Class-Specific Interface Descriptor, Size : 39
Class-Specific Interface Descriptor, Size : 6

  Interface 1
   Alt Setting : 1
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 00C0
    Interval    : 1

  Interface 1
   Alt Setting : 2
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 0180
    Interval    : 1

  Interface 1
   Alt Setting : 3
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 0200
    Interval    : 1

  Interface 1
   Alt Setting : 4
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 0280
    Interval    : 1

  Interface 1
   Alt Setting : 5
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 0320
    Interval    : 1

  Interface 1
   Alt Setting : 6
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 03B0
    Interval    : 1

  Interface 1
   Alt Setting : 7
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 0A80
    Interval    : 1

  Interface 1
   Alt Setting : 8
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 0B20
    Interval    : 1

  Interface 1
   Alt Setting : 9
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 0BE0
    Interval    : 1

  Interface 1
   Alt Setting : 10
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 1380
    Interval    : 1

  Interface 1
   Alt Setting : 11
   Name        : <NONE>
   Class       : Unknown class 0E
   SubClass    : Unknown Subclass 0E
   Protocol    : Unknown Protocol 0E
   Endpoints   : 1

   Endpoint 0:
    Address     : 81
    Attributes  : 05
    Packetsize  : 13FC
    Interval    : 1
No Interface 0x04, Endpoint 0x05 or Classspec 0x21-0x025 Description is 0x0B

  Interface 2
   Alt Setting : 0
   Name        : <NONE>
   Class       : Audio
   SubClass    : AudioControl
   Protocol    : Not used(0)
   Endpoints   : 0
     Audiocontrol CS Interface Descriptor
     Length  : 9
     Type    : 0x24
     Subtype : 0x01
    Header :
     Audio Device Class Release Number : 0100
     Max size of AudioControl interface descriptor. : 21628
     Number of AudioStreaming and MIDIStreaming interfaces : 1
      1. Streaming interface on Device Interface 3
     Audiocontrol CS Interface Descriptor
    Input Terminal :
     Length  : 12
     Type    : 0x24
     Subtype : 0x02
     Unique Terminal ID       : 1
     Terminal Type            : 0x0201
     Assoc. Terminal ID       : 0
     Number of Log. Channels  : 1
     Spatial channel location : 0x0000
     Name of Channel          : Not Implemented
     Name of Terminal         : At Index 9 has an Invalid lenght of 0x0000
     Audiocontrol CS Interface Descriptor
    Output Terminal :
     Length  : 9
     Type    : 0x24
     Subtype : 0x03
     Unique Terminal ID : 3
     Terminal Type      : 0x0101
     Assoc. Terminal ID : 1
     Source ID          : 5
     Name of Terminal   : Not Implemented
     Audiocontrol CS Interface Descriptor
    Feature Unit :
    Length  : 8
    Type    : 36
    Subtype : 6
    Dumped Data :
     05 01 01 03 00 09
     
     Unique Unit ID  : 5
     Source ID       : 1
     Size of Control Item  : 1
     ControlMap for Master : 0x03
     Name of Feature Unit : At Index 9 has an Invalid lenght of 0x0000

  Interface 3
   Alt Setting : 0
   Name        : <NONE>
   Class       : Audio
   SubClass    : Streaming Audio
   Protocol    : Not used(0)
   Endpoints   : 0

  Interface 3
   Alt Setting : 1
   Name        : <NONE>
   Class       : Audio
   SubClass    : Streaming Audio
   Protocol    : Not used(0)
   Endpoints   : 1
    General Endpoint Information:
     Length  : 7
     Type    : 0x24
     Subtype : 0x01
     Controls:
      - Sampling Frequency
      - Pitch
      - Locktime 21684 ms
     Audiostreaming CS Interface Descriptor
     Format Type:
     Length  : 11
     Type    : 0x24
     Subtype : 0x02
      Physical Channels : 1
      Subframe size     : 2
      Bits used         : 16
      Supported Frequencies
       - 16000Hz
       - 8783113Hz

   Endpoint 0:
    Address     : 86
    Attributes  : 05
    Packetsize  : 0024
    Interval    : 4
    General Endpoint Information:
     Length  : 7
     Type    : 0x25
     Subtype : 0x01
     Controls:
      - Sampling Frequency
      - Locktime 21711 (No Unit)
 
Title: Re: Use of webcam
Post by: Lars on July 18, 2020, 07:33:40 am
USBRES is buggy, in particular for audio devices.
8783113Hz as supported sampling freq is obviously wrong.
Title: Re: Use of webcam
Post by: Remy on July 18, 2020, 10:46:25 am
USBRES is buggy, in particular for audio devices.
8783113Hz as supported sampling freq is obviously wrong.

Yes I agree that this sampling is non sense 
Title: Re: Use of webcam
Post by: Wim Brul on July 18, 2020, 03:44:03 pm
Hi Rémy,

Quote
Tried webcam /a16000, no audio from 9000 pro
No audio - does that mean that the audio window titled \PIPE\Webcam\Audio does not appear?
Or does that window appear but no audio can be heard i.e. dead silent (like volume is zero)
Is there any error shown? Like [00004000] obtain audio error? 
When using webcam /a/n do you have video but still not sound?

Quote
Same results for USBRES which shows now the logitech QuickCam pro 9000 (but not the C270!).
This allows me to get needed information for you :D
Thanks. It confirms that the logitech Quickcam Pro only supports 16000 Hz. audio.
Apart from idProduct the Quickcam Pro for notebooks has the same usb descriptors.

I have attached lsusb-046d0991.txt that I found on the internet.

Regards,
Wim. 
Title: Re: Use of webcam
Post by: Remy on July 18, 2020, 05:50:02 pm
Hi Rémy,

Quote
Tried webcam /a16000, no audio from 9000 pro
No audio - does that mean that the audio window titled \PIPE\Webcam\Audio does not appear?
Or does that window appear but no audio can be heard i.e. dead silent (like volume is zero)
Is there any error shown? Like [00004000] obtain audio error? 
When using webcam /a/n do you have video but still not sound?


- The windows appears but no audio - silent
- error
[00008080]
obtain audio error.
- /a/n = Video works but no audio

Regards
Rémy

Update: During all my test, I left the C270 connected. My latest boot was without C270 connected and only the 9000 pro connected.
Currious, I tried again the lsusb command and this time, I get a report !  (I will do more test and what could make that 2 webcam usb connected could make no report ! conflicts ?, I don't know)

Here is lsusb report (finally !)
   
Title: Re: Use of webcam
Post by: Remy on July 18, 2020, 09:34:34 pm
After last finding, I did tests several times and have:

Booted with only logitech C270 webcam connected
> no LSUSB report  (start/end without any messages)
> Webcam works using C270
Booted with both logitech c270 and Logitech, Inc. QuickCam Pro 9000 connected
> no LSUSB report  (start/end without any messages)
> webcam works using Pro 9000
Booted with only Logitech, Inc. QuickCam Pro 9000 connected
> LSUSB provides a report !
> webcam works using Pro 9000

Title: Re: Use of webcam
Post by: nyao on July 19, 2020, 08:15:04 am
Hi Wim.
Thank you for your wonderful work.

I also use the C270, so I thank Remy for his efforts.
I look forward to future developments.
Title: Re: Use of webcam
Post by: Wim Brul on July 19, 2020, 06:39:32 pm
Hi Rémy,

Thank you for the lsusb report of the logitech QuickCam Pro 9000.
Now I can see some differences with the logitech QuickCam Pro for notebooks.
In particular wMaxPacketSize being 1x36 bytes versus 1x68 bytes (c250/c270 too).
However my program has hardcoded 1x36 bytes for 16000hz so it should work.
Please try webcam /a/n with your logitech c270 to see if that fails too.

Right now I am working on two companion webcam monitor programs:

wmaudio.exe - Webcam Monitor Audio for OS/2 (ArcaOS/eComStation)
wmvideo.exe - Webcam Monitor Video for OS/2 (ArcaOS/eComstation)

wmaudio.exe /aN plays audio thru AmpMix0N so on any audio adapter.
Input is \PIPE\Webcam\Audio. It plays with minimal delay.

wmvideo.exe is a pm program that shows video on your desktop.
Input is \PiPE\Webcam\Video. It shows with minimal delay.

The purpose is to monitor audio and video while recording with ffmpeg.
The question comes up how do you want to connect the Webcam Server?
Obviously there is one connection missing for audio. What to do?
Did you already try to record audio and video at the same time?

Best regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 19, 2020, 11:13:22 pm
Hi Rémy,

Thank you for the lsusb report of the logitech QuickCam Pro 9000.
Now I can see some differences with the logitech QuickCam Pro for notebooks.
In particular wMaxPacketSize being 1x36 bytes versus 1x68 bytes (c250/c270 too).
However my program has hardcoded 1x36 bytes for 16000hz so it should work.
Please try webcam /a/n with your logitech c270 to see if that fails too.

Right now I am working on two companion webcam monitor programs:

wmaudio.exe - Webcam Monitor Audio for OS/2 (ArcaOS/eComStation)
wmvideo.exe - Webcam Monitor Video for OS/2 (ArcaOS/eComstation)

wmaudio.exe /aN plays audio thru AmpMix0N so on any audio adapter.
Input is \PIPE\Webcam\Audio. It plays with minimal delay.

wmvideo.exe is a pm program that shows video on your desktop.
Input is \PiPE\Webcam\Video. It shows with minimal delay.

The purpose is to monitor audio and video while recording with ffmpeg.
The question comes up how do you want to connect the Webcam Server?
Obviously there is one connection missing for audio. What to do?
Did you already try to record audio and video at the same time?

Best regards,
Wim.

"Please try webcam /a/n with your logitech c270 to see if that fails too."
It works with c270 and except the trap000e resolved by USB driver update, I never got any error with c270 (I have audio and video - So did I under WCC where you have audio and video at the same time)
- Under WCC, I reduced audio to a max volume of 30 to prevent larsen (try it and put higher volume level to hear the audio)
 
Quote
With C270 :

...\webcam /a/n
started.
format:mjpg
On-line. Use Ctrl+Break to end.
On-line. Use Ctrl+Break to end.
 opening isochronous
 opening isochronous

Since I found USB problem, I did a new test when the c270 is not plugged and only the Pro 9000 is plugged which already provided a working lsusb report.
Only in this configuration, the audio works too with the pro 9000.

Quote
...\webcam /a16000/n
started.
format:yuyv
On-line. Use Ctrl+Break to end.
On-line. Use Ctrl+Break to end.
 opening isochronous
 opening isochronous

Previous problem I had were due USB issue when 2 webcams are connected (may it be possible it tried to get audio from c270 but couldn't get it the output stream !!!) 

ffmpeg can have multiple entries and each one can be pipe or streamer
The easiest would be pipe (This will left http to what the video currently recorded) but this prevent using a pipe as output but the need is to create a video audio file.
e.g. ffmpeg -y -f wav -i \PIPE\Webcam\Audio -f mjpeg -i \PIPE\Webcam\Video -f avi output.avi

- See attached log file

The problem would be about video/audio syncro but -sync and other parms exist to try sync both when the gap isn't to big

ffmpeg can also be used in a different way (using http or udp or other streaming protocol):
e.g. ffmpeg -f wav -i \PIPE\Webcam\Audio -f mjpeg -i \PIPE\Webcam\Video -f avi udp://127.0.0.1:nnnn  (used as streamer)
+
ffplay -i udp://127.0.0.1:nnnn
This way, it may play video and audio   

To simplify into one line command:
e.g. ffmpeg -f wav -i http://127.0.0.1:14226/ -f mjpeg -i  http://127.0.0.1:14225/ -f avi - |ffplay -i -
(using @ip and port for each video and audio will allow to use the pipe as ffmpeg output usable by ffplay (of course, some latency may exist but it could be reduced to a very low latency value, may be below 100ms !

An alternative option would be to run 2 ffmpeg processes, one for video and one for audio. In a next step, get both resulting audio and video files and mix them together to get one video with sound file... This needs more time but sync could be better adjusted due different adjustment can be tried using the same recorded files.
Title: Re: Use of webcam
Post by: Remy on July 19, 2020, 11:39:28 pm
Right now I am working on two companion webcam monitor programs:

wmaudio.exe - Webcam Monitor Audio for OS/2 (ArcaOS/eComStation)
wmvideo.exe - Webcam Monitor Video for OS/2 (ArcaOS/eComstation)

wmaudio.exe /aN plays audio thru AmpMix0N so on any audio adapter.
Input is \PIPE\Webcam\Audio. It plays with minimal delay.

wmvideo.exe is a pm program that shows video on your desktop.
Input is \PiPE\Webcam\Video. It shows with minimal delay.

Best regards,
Wim.

How do you make both been in syncro ?
With ffplay, video has a lot of possible adjustment etc with low latency (as soon input buffer is kept at 0) but ffplay audio has high latency and I didn't find a way to reduce it under ffplay...
Through ffmpeg, I think it could be different... 

May be wmaudio could provide a syncronized audio with the ffplay video output !

Note: WCC updated to allow webcam audio supported sampling (from 16000 up to 48000)
- If AN USB drivers (wait for official USB 12.7 drivers to prevent trap000e)
- With Lars 16 bits drivers, it should work
Once enabled, You have video + audio (audio latency is higher than video)   

note: I apology having left hard coded path I use during development test. Corrected in the the 20072020 build
 
Title: Re: Use of webcam
Post by: Wim Brul on July 20, 2020, 10:49:56 pm
Hi Rémy,

At last some test results working with WCC_update-20072020.zip:

1. Buttons "Cam is off" and "Cam is on" do their work.
2. Video is shown when using the show and [] buttons.
3. Query vSize list c250 webcam never finds 640x400 video formats.
4. Query vSize list e6500 webcam does not find yuyv 640x480,1024x768,1280x1024 formats.
5. Query vSize list e6500 webcam finds yuyv 1200x1600 format but size button does not show it.[] button shows it.
6. Query vSize list e6500 webcam correctly finds no mjpg formats. But see point 7.
7. Using Defaults Max Vsize after point 6. shows strange VMMXxVHMx default format.

This WCC version works much better than the previous ones.
Audio has not yet been tested but I will try that tomorrow.

Documentation needs brushing up: better structure and better spelling.
Pictures and text need to match what the program does and what it shows.
But you know that already. Not easy to do. To be done...

Regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 20, 2020, 11:46:10 pm
Hi Rémy,

At last some test results working with WCC_update-20072020.zip:

1. Buttons "Cam is off" and "Cam is on" do their work.
2. Video is shown when using the show and [] buttons.
3. Query vSize list c250 webcam never finds 640x400 video formats.
4. Query vSize list e6500 webcam does not find yuyv 640x480,1024x768,1280x1024 formats.
5. Query vSize list e6500 webcam finds yuyv 1200x1600 format but size button does not show it.[] button shows it.
6. Query vSize list e6500 webcam correctly finds no mjpg formats. But see point 7.
7. Using Defaults Max Vsize after point 6. shows strange VMMXxVHMx default format.

This WCC version works much better than the previous ones.
Audio has not yet been tested but I will try that tomorrow.

Documentation needs brushing up: better structure and better spelling.
Pictures and text need to match what the program does and what it shows.
But you know that already. Not easy to do. To be done...

Regards,
Wim.

About 640x400, 1024x768 and 1280x1024, I missed them into my check list !

For 4/ 5/ 6/ and 7/
Did you try with and without yuyv option ?

7/ could happen if your webcam has a long respons time

Doc:
Right, I'm not top into this part... :D

I updated WCC an included missing video format scan and added more time if needed to get webcam datas.
[] has limited format and query Vsize updates size button entries (no update done under min-size used when [] is used (the min button is limited to small standard sizes supported by ffplay, independent from Vsizes found used to set webcam - Sound is disabled when click on [] but available under [show] with enable audio (*Be careful about USB issue*) with correct sampling rate.
Title: Re: Use of webcam
Post by: TeLLie on July 21, 2020, 11:14:01 am
Hi Remy,
With this latest update its working on the W530
Thankz  and also Wim thankz alot :)
Title: Re: Use of webcam
Post by: Remy on July 21, 2020, 02:36:08 pm
Hi Remy,
With this latest update its working on the W530
Thankz  and also Wim thankz alot :)

Good news.
Thanks
Title: Re: Use of webcam
Post by: Wim Brul on July 22, 2020, 06:24:09 pm
Hi Remy,

Test results with WCC_updated-21072020_nodoc.zip:

1. I saw the "Missing Requirements" popup several times.
    Each time only once just after booting op the system.
    But not always. Too short timeout perhaps?

2. Now all yuyv formats are found for the builtin webcam.
    1600x1200 and 1280x1024 formats only show with the [] button.
    Perhaps because my laptop screen size is 1440x900 pixels?

3. Cam-Intf range is 1:9 but logitech webcams have 1:11 range.
    There could be webcams out there with even a larger range.

4. Audio does not work with my ffmpeg 2.8.6-2 installation.
    Without -volume 30 and without -nodisp audio works.
    And without -sync ext audio works somewhat better.

5. When I set Defaults Audio to 22050HZ then 48000 Hz is used.
    When I set Defaults Audio to 44100HZ then 48000 Hz is used.
    The c250/c270 webcams support 16000/24000/32000/48000 Hz.
    I could make these deliver 22050 Hz and 44100 Hz too.
    At least the list must include 24000 Hz and 32000 Hz.

Regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 22, 2020, 09:22:20 pm
Hi Remy,

Test results with WCC_updated-21072020_nodoc.zip:

1. I saw the "Missing Requirements" popup several times.
    Each time only once just after booting op the system.
    But not always. Too short timeout perhaps?

2. Now all yuyv formats are found for the builtin webcam.
    1600x1200 and 1280x1024 formats only show with the [] button.
    Perhaps because my laptop screen size is 1440x900 pixels?

3. Cam-Intf range is 1:9 but logitech webcams have 1:11 range.
    There could be webcams out there with even a larger range.

4. Audio does not work with my ffmpeg 2.8.6-2 installation.
    Without -volume 30 and without -nodisp audio works.
    And without -sync ext audio works somewhat better.

5. When I set Defaults Audio to 22050HZ then 48000 Hz is used.
    When I set Defaults Audio to 44100HZ then 48000 Hz is used.
    The c250/c270 webcams support 16000/24000/32000/48000 Hz.
    I could make these deliver 22050 Hz and 44100 Hz too.
    At least the list must include 24000 Hz and 32000 Hz.

Regards,
Wim.

1/ I run in detach mode a process. May be your system isn't fully available when WCC is run ! (I run it under a delayed start folder "AN")
    I added a short delay near what I use under mys system to not having trouble running some process in detach mode and add an extra delay if this process didn't reply in the expected time delay)

2/ If you have virtual desktop, it should display with a part in the next window... (So doesn't look under my system when I select the highest size above my screen size)...  When you use the show button, video size is what webcam provides (no specified size under ffplay) using Size setting. The [] uses the same webcam setting but ffplay has a size set to the min-size  (At start, it may display for a fraction of seconds, original webcam size set but immedialtly, it switches to the specified min-size.
note1: sometimes, I have no output from first webcam start but all next restart work
note2: Now, if you select a Size above what your screen is able, the Text Size goes into red.

3/ increased to 15

4/ "Without -volume 30 and without -nodisp audio works"
     It must work but I think your system audio level is set very low (ref for 100) and when 30 is used, the audio is then very very low may be like no sound (I'll added an option to use default volume at 100 or to reduce it to 50). -nodisp has no impact here and prevent video simulation process for audio stream. About -sync ext (it improves a little audio latency under my system but it could have a little impact on audio under some systems. I removed it

    As I wrote it, audio is comming later then the video (about 2s). You have to wait to hear the audio... Under ffplay, I reduces as much as possible but I know it will introduce long delay du to ffplay internal process. 

5/ 24000 and 32000 added
    When you set 22050HZ, /a22050 is set on webcam (no other value is possible using this setting and so is it for other audio sample settings).
    I did a try  webcam /a22050 | ffplay -f wav -i \PIPE\Webcam\Audio  and I have 48000
    With -f wav , ffplay provides 48000 for the received input stream   (webcam sends wav audio stream)
    I tried -f s16le - ffplay provides 44100 for the received input stream   (but bad audio in this case due input is wav)
    The issued webcam command is correct. In fact, no matter if ffplay output has higher sampling then the input stream.
    If webcam could send needed information to allow ffplay to auto detect the codec, this would prevent -f wav use. 
   
     
Title: Re: Use of webcam
Post by: Wim Brul on July 23, 2020, 06:09:30 pm
Hi Remy,

Thank you for your explanations and modifications. WCC_update-22072020.zip works well.

Only audio does not work for me because I have ffmpeg 2.8.6-2 installed which does not support -volume 30 nor -nodisp.
Quote
4/ "Without -volume 30 and without -nodisp audio works"
     It must work but I think your system audio level is set very low (ref for 100) and when 30 is used, the audio is then very very low may be like no sound (I'll added an option to use default volume at 100 or to reduce it to 50). -nodisp has no impact here and prevent video simulation process for audio stream.
That is not the case. It does not work because I am using ffmpeg 2.8.6-2 which rejects -volume 30 and -nodisp.

I have updated webcam.exe because:
A. It now recognizes webcams better while scanning descriptors.
B. It may obtain 22050/44100 Hz. audio streams from logitech webcams.
Note: Audio capabilities are still hardcoded i.e. descriptors not scanned.

Quote
May be wmaudio could provide a syncronized audio with the ffplay video output !
I added wmaudio.exe - Webcam Monitor Audio for OS/2 - first beta version.
Not really synchronized but perhaps more appropriate.
 
Best regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 23, 2020, 06:56:33 pm
Hi Remy,

Thank you for your explanations and modifications. WCC_update-22072020.zip works well.

Only audio does not work for me because I have ffmpeg 2.8.6-2 installed which does not support -volume 30 nor -nodisp.
Quote
4/ "Without -volume 30 and without -nodisp audio works"
     It must work but I think your system audio level is set very low (ref for 100) and when 30 is used, the audio is then very very low may be like no sound (I'll added an option to use default volume at 100 or to reduce it to 50). -nodisp has no impact here and prevent video simulation process for audio stream.
That is not the case. It does not work because I am using ffmpeg 2.8.6-2 which rejects -volume 30 and -nodisp.

>> ok, parms have changed (not supported)


I have updated webcam.exe because:
A. It now recognizes webcams better while scanning descriptors.
B. It may obtain 22050/44100 Hz. audio streams from logitech webcams.
Note: Audio capabilities are still hardcoded i.e. descriptors not scanned.

Quote
May be wmaudio could provide a syncronized audio with the ffplay video output !
I added wmaudio.exe - Webcam Monitor Audio for OS/2 - first beta version.
Not really synchronized but perhaps more appropriate.
 
Best regards,
Wim.

Nice.
I just did a few test (audio delay seems to be much better but not enough time to be sure "larsen")
tried with c270: default or /a3 provides no audio, I have to set /a1 to get some audio

Now, 22050 and 44100 provides correct results as expected. 

But I can not reduce its volume and it goes immediately into larsen at full volume level. It seems that PMUNIMIX loses control. May it possible to add a volume level flag to wmaudio ?  /vNNN or something like that (volume level adjustable from 0 to 100 ? like ffplay has)
Thanks

regards
Rémy 
Title: Re: Use of webcam
Post by: Remy on July 24, 2020, 02:15:12 pm
Hi Wim,

I tried other test using webcam and ffmpeg
- Latency is not a real problem recording video with ffmpeg
- But it is if the output should be streamed

My ffmpeg test show audio having a delay against video but it seems to me that the tempo isn't fully correct.
I tried several ffmpeg test but I didn't find the right setting up to know.
My latest test:
webcam set to 640x360 and audio to 22050
ffmpeg -y -thread_queue_size 128 -f:a atempo=1.01 -f wav -ac 1 -i \PIPE\Webcam\Audio -itsoffset 2.80 -thread_queue_size 128 -framerate 25 -f mjpeg -i \PIPE\Webcam\Video -q:v 4 -vcodec copy -acodec copy -async 1 -threads 2 output.avi

itsoffset reduces audio delay
-tread_queue_size 128 to prevent some messages
copy for video and audio to not convert
async 1 (to try to maintain in sync quickly)
treads 2 to optimize process
outup as avi because it is compatible with wav and mjped
q:v 4 to set video quality
Because audio seems slower than the video, I added atempo to try having a better result (supported with recent ffmpeg build ok with 4.0.2)
(note: setting a slower framerate than 25 could help but to much dropped frames)
The result is better but not good at all...

Any suggestion to improve sync and final result is wellcome

Tried:
ffmpeg -y -thread_queue_size 192 -f:a atempo=1.02 -f wav -ac 1 -i \PIPE\Webcam\Audio -itsoffset 3.23 -thread_queue_size 64 -framerate 16 -f mjpeg -i \PIPE\Webcam\Video -q:v 4 -vcodec copy -acodec copy -async 1 -threads 2 output.avi

Reducing video framerate to 16 instead of source 25 makes things a little bit better. It looks like the video is too fast or audio too slow ! 
Title: Re: Use of webcam
Post by: Wim Brul on July 25, 2020, 09:57:16 am
Hi Remy,

Quote
I just did a few test (audio delay seems to be much better but not enough time to be sure "larsen")
tried with c270: default or /a3 provides no audio, I have to set /a1 to get some audio
On my DELL Latitude E6500 laptop /a1 is the builtin audio adapter and /a2 is the Conceptronic CSOUNDU and /a3 is the Behringer UMC204HD.
The Behringer UMC204HD is setup as the default device and thus on my system /a0 is that adapter too.
See USB Audio Adapters (https://home.hccnet.nl/w.m.brul/recorder/index.html#USBAudioAdapters) on my website. ;) Now you know where wmaudio is coming from.

Quote
May it possible to add a volume level flag to wmaudio ?  /vNNN or something like that (volume level adjustable from 0 to 100 ? like ffplay has)
Done. I added the /vN parameter and I changed the default of the /aN parameter. See wmaudio.txt for more information.

Regards,
Wim.
Title: Re: Use of webcam
Post by: Remy on July 26, 2020, 11:15:24 am
Hi Remy,

Quote
I just did a few test (audio delay seems to be much better but not enough time to be sure "larsen")
tried with c270: default or /a3 provides no audio, I have to set /a1 to get some audio
On my DELL Latitude E6500 laptop /a1 is the builtin audio adapter and /a2 is the Conceptronic CSOUNDU and /a3 is the Behringer UMC204HD.
The Behringer UMC204HD is setup as the default device and thus on my system /a0 is that adapter too.
See USB Audio Adapters (https://home.hccnet.nl/w.m.brul/recorder/index.html#USBAudioAdapters) on my website. ;) Now you know where wmaudio is coming from.

Quote
May it possible to add a volume level flag to wmaudio ?  /vNNN or something like that (volume level adjustable from 0 to 100 ? like ffplay has)
Done. I added the /vN parameter and I changed the default of the /aN parameter. See wmaudio.txt for more information.

Regards,
Wim.

Hi Wim,

I have good results using wmaudio  (I could limit larsen when using PC HPs and hear me very good using headphones)
I did more test using ffmpeg and the strange I found is that the c270 output specifies a framerate of 25 but in fact, it isn't due I have to use framerate 15 to get a ormal video output speed (with ffplay, framerate doesn't change the video speed but it helps to drop latency, read buffer..) . A test which allow me to have a nearly "syncronized" video file (it can be adjusted changing parm -itsoffset value).

switched from mjpeg to yuyv (better for syncro) for webcam with audio rate 48000 or 44100   
Used following command (inverted video and audio order compared ti my previous test and it is better)

ffmpeg -itsoffset 2.38 -framerate 15 -thread_queue_size 128 -f mjpeg -i \PIPE\Webcam\Video -thread_queue_size 192 -f wav -i \PIPE\Webcam\Audio -probesize 128 -q:v 5 -vsync 1 -threads 2 test.avi

A 30s recording test provided me a better result than all tests I previously did.
(wait about 3s second having started the recording to start speak etc...)   

Regards
Rémy

An updated WCC will be available soon.
Title: Re: Use of webcam
Post by: Remy on July 26, 2020, 07:02:33 pm
WCC update (including wmaudio volume reduction (one setting only to prevent larsen)
Title: Re: Use of webcam
Post by: Wim Brul on July 26, 2020, 07:16:37 pm
Hi Remy,

To record zmovie.avi I used webcam.exe /a/n and the following line:

ffmpeg -async 1 -framerate 25 -itsoffset 2.0 -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -c:v copy -c:a copy -map 0:0 -map 1:0 zmovie.avi

And it works very well. The following line produces compressed output (10 times reduction in filesize):

ffmpeg -async 1 -framerate 25 -itsoffset 2.0 -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -map 0:0 -map 1:0 zmovie.avi

And works very well too. But I do prefer the uncompressed movie.

There is no delay in the recorded audio and it stays in sync.

Best regards,
Wim.

Title: Re: Use of webcam
Post by: Remy on July 26, 2020, 09:41:48 pm
Hi Remy,

To record zmovie.avi I used webcam.exe /a/n and the following line:

ffmpeg -async 1 -framerate 25 -itsoffset 2.0 -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -c:v copy -c:a copy -map 0:0 -map 1:0 zmovie.avi

And it works very well. The following line produces compressed output (10 times reduction in filesize):

ffmpeg -async 1 -framerate 25 -itsoffset 2.0 -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -map 0:0 -map 1:0 zmovie.avi

And works very well too. But I do prefer the uncompressed movie.

There is no delay in the recorded audio and it stays in sync.

Best regards,
Wim.

Oh well done,
I have missplaced parameters...

Your command line as given:
It will not work with ffmpeg 4.0.2 and up  (many options or parameters changed between versions.
(I have to check ffmpeg version to use correct ffmpeg version/parameters under AVxCAT) 

ffmpeg -async 1 -framerate 25 -itsoffset 2.0 -i \PIPE\Webcam\Video -i \PIPE
\Webcam\Audio -c:v copy -c:a copy -map 0:0 -map 1:0 zmovie.avi
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.5.0 (GCC)
  configuration: --enable-gpl --disable-doc --cpu=i686 --enable-fontconfig --ena
ble-libfreetype --enable-libxvid --enable-libvpx --enable-libx264 --enable-libmp
3lame --enable-libopus --enable-libtheora --prefix='h:/tmp/ffmpeg' --disable-sta
tic --enable-shared --extra-libs=-lcx --extra-ldflags=-Zhigh-mem --extra-cflags=
'-isysroot k:/usr/include'
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Option framerate not found.

Without framerate, it works but it is played very fast (not real framerate) due to auto set to 25 which is too fast (accelerated video/audio)

But, from yous suggestion I did a new test changing parameters as needed and it work now well here with c270 using :
ffmpeg -async 1 -framerate 15 -itsoffset 2.0 -f mjpeg -i \PIPE\Webcam\Video
 -i \PIPE\Webcam\Audio -c:v copy -c:a copy -map 0:0 -map 1:0 zmovie.avi

note: mapping is not needed here because each input file only has one stream (video or audio), it is automatically mapped by ffmpeg. 
copy will copy frames as is without changes (this produces a big file) 

I have to set framerate to 15 to get normal speed and add -f mjpeg to use -framerate option.

The best command line with a resulting small video size:
ffmpeg -async 1 -framerate 15 -itsoffset 2.0 -f mjpeg -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -q:v 3 -b:a 192k zmovie.avi

To remove the thread_queue_size message, I add one more parameter:
ffmpeg -async 1 -framerate 15 -itsoffset 2.0 -f mjpeg -i \PIPE\Webcam\Video -thread_queue_size 96 -i \PIPE\Webcam\Audio -q:v 3 -b:a 192k zmovie.avi

video quality set to a good value and audio set to CBR (converted into mp3) with a good 192K bitrate.

Thanks  ;)
Regards
Rémy 

logfile from a test using an experimental ffmpeg build (not available yet by its author):

Update: after adding -framerate 25 to the input stream just after -f mjpeg, It works too using the -framerate 25 setting after -async, having a correct 25 fps output.
ffmpeg -async 1 -framerate 25 -itsoffset 2.0 -f mjpeg -framerate 25 -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -q:v 3 -b:a 192k zmovie.avi
(adding the -thread_queue_size may introduce some out of sync
 
Title: Re: Use of webcam
Post by: Remy on July 26, 2020, 11:27:50 pm
It seems the target is achieved    :D

Now, developpers can record warpstock présentations for they own use !
or any presentation needed to be shared for education etc...

Regards
Rémy
Title: Re: Use of webcam
Post by: onlineuser2 on July 26, 2020, 11:56:29 pm
Wooowww!!!!!!!!!
Title: Re: Use of webcam
Post by: ivan on July 27, 2020, 12:03:48 am
I would like to thank Wim and Remy for their work on this.

Now all it needs is some bright programmer to either put together a zip file containing everything necessary to run video streaming or explain in simple language what we need to do.  That way I might be able to do video conferencing without having to fire up Zoom on one of my Linux boxes.

 
Title: Re: Use of webcam
Post by: Remy on July 27, 2020, 02:50:52 am
I would like to thank Wim and Remy for their work on this.

Now all it needs is some bright programmer to either put together a zip file containing everything necessary to run video streaming or explain in simple language what we need to do.  That way I might be able to do video conferencing without having to fire up Zoom on one of my Linux boxes.

 

You already can give it some try changing ffmpeg output to an url. On the other side, use ffplay to show the video (use ffplay nobuffer and other tips to reduce latency)

First give a try to check hw the video is. May be you'll nee to adjust framerate according what is send by your webcam. Start using 25 and if the video is like an accelerated video, reduce it to 15.

ffmpeg -async 1 -framerate 15 -itsoffset 2.0 -f mjpeg -i \PIPE\Webcam\Video -thread_queue_size 96 -i \PIPE\Webcam\Audio -q:v 3 -b:a 192k zmovie.avi

Once the video is nice, then replace it by an url which could be udp ( udp://your pc ip@:2000 ) or of other supported type. On the other side, use ffplay to read the stream or other compatible player.

Not tested (itsoffset may be adjusted etc... if only voice has to be recorded, than 22050 should be enough and may reduce kbps sent as well reducing video quality to 5 give a correct video but with less kbps):
e.g.  ffmpeg -async 1 -framerate 15 -itsoffset 1.0 -f mjpeg -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -q:v 5 -b:a 128k -ar 22050 -tune zerolatency -f mpegts udp://yourserver-ip@:2000

e.g.  ffplay -fflags nobuffer -probesize 64 -analyzeduration 1 -f mpegts -i udp://yourserver-ip@:2000 -volume 60  (use headphone if on the same pc in which case yourserver-ip@ could be 127.0.0.1)

If you go through an internet box, do not forget to customize the NAT (network address translation "table" to route incoming traffic on port 2000 (in this example) to your pc @ip at port 2000 for udp traffic

To allow many  end users(2 or more)  to watch the live stream, start ffserver after configuring the ffserver.conf file (provided conf sample provides useful information)   

internet box NAT example (warning, not secured)
just as illustration
(good information can be found here: https://trac.ffmpeg.org/wiki/StreamingGuide#Pointtopointstreaming )

 
 
 
Title: Re: Use of webcam
Post by: Remy on July 27, 2020, 05:16:09 pm
If mp4 is a prefered recorded video, don't use the line command used for avi or mpegts (it seems that replacing avi or mpegts by mp4 provides out of sync)
To prevent this, following line command works well:
ffmpeg -async 1 -framerate 25 -itsoffset 2 -f mjpeg -framerate 25 -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -q:v 3 -q:a 1 -f avi - |ffmpeg -y -i - mymp4.mp4
Title: Re: Use of webcam
Post by: Remy on July 30, 2020, 04:44:44 pm
Suggestion:

About live streaming, maybe something like this could work !
I could get the flv file and a test to rtmp doesn't provide errors except no key to be allowed   
(Those having an account could do a test and report feedback please)

With a twich account:
ffmpeg -y -async 1 -framerate 25 -itsoffset 2.5 -f mjpeg -framerate 25 -i \PIPE\Webcam\Video -i \PIPE\Webcam\Audio -c:v libx264 -preset veryfast -b:v 2500k -maxrate 2500k -bufsize 5000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 1 -
ar 44100 -tune zerolatency -f flv rtmp://live.twitch.tv/app/<stream key>

Or for vimeo rtmp://rtmpin.livestreamingest.com/rtmpin/<stream key> after having added/corrected output video size, video bitrate, audio bitrate etc...

Note: ffserver is no more supported (but may work)