Author Topic: Use of webcam  (Read 11727 times)

Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #105 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
« Last Edit: July 06, 2020, 08:37:09 pm by Remy »

Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #106 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)

 
« Last Edit: July 07, 2020, 08:49:25 pm by Remy »

TeLLie

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 8
  • Posts: 88
    • View Profile
Re: Use of webcam
« Reply #107 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.

Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #108 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

TeLLie

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 8
  • Posts: 88
    • View Profile
Re: Use of webcam
« Reply #109 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.


Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #110 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 

Wim Brul

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 35
  • Posts: 206
    • View Profile
    • Wim's home page
Re: Use of webcam
« Reply #111 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.
« Last Edit: July 09, 2020, 06:35:43 pm by Wim Brul »

Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #112 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

Wim Brul

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 35
  • Posts: 206
    • View Profile
    • Wim's home page
Re: Use of webcam
« Reply #113 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.

TeLLie

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 8
  • Posts: 88
    • View Profile
Re: Use of webcam
« Reply #114 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??

Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #115 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 ?

Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #116 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.

Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #117 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)
« Last Edit: July 13, 2020, 11:25:46 pm by Remy »

Wim Brul

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 35
  • Posts: 206
    • View Profile
    • Wim's home page
Re: Use of webcam
« Reply #118 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.

Remy

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 337
    • View Profile
Re: Use of webcam
« Reply #119 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)
« Last Edit: July 13, 2020, 10:55:34 pm by Remy »