Show Posts

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


Messages - Wim Brul

Pages: [1] 2 3 ... 13
1
Multimedia / Re: Use of webcam
« 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


2
Multimedia / Re: Use of webcam
« 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.

3
Multimedia / Re: Use of webcam
« 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.

4
Multimedia / Re: Use of webcam
« 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.
 
 

5
Multimedia / Re: Use of webcam
« 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.

6
Multimedia / Re: Use of webcam
« 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 to develop webcam support) I could only test up to 1600x1200 resolution.

Regards,
Wim.

7
Multimedia / Re: Use of webcam
« 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.

8
Multimedia / Re: Use of webcam
« 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.

9
Multimedia / Re: Use of webcam
« 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.

10
Multimedia / Re: Use of webcam
« 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 ?

11
Multimedia / Re: Use of webcam
« 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.

12
Multimedia / Re: Use of webcam
« 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.

13
Multimedia / Re: Use of webcam
« 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.

14
Multimedia / Re: Use of webcam
« 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.

15
Multimedia / Re: Use of webcam
« 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.

Pages: [1] 2 3 ... 13