Recent

Author Topic: Capture picture from Webcam  (Read 3269 times)

MVG

  • New member
  • *
  • Posts: 7
Capture picture from Webcam
« on: October 06, 2021, 02:25:13 pm »
Hello,

I'm completly new with Lazarus, I reed about the topic but I see in the forum the solutions are not simple, are there some new features or component to simplify this  issue

best regards

Marcelo

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11455
  • FPC developer.
Re: Capture picture from Webcam
« Reply #1 on: October 06, 2021, 02:27:04 pm »
For Windows, you could try the dspack components.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Capture picture from Webcam
« Reply #2 on: October 06, 2021, 04:36:27 pm »
hello,
what is your O.S ? if you have vlc installed  you can use  PasLibvlc. If you have mplayer installed you can use TMPlayerControl.
To capture image with TMPlayerControl see here
And for Paslibvlc it is screenshot.
Friendly,J.P
« Last Edit: October 06, 2021, 04:45:45 pm by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

MVG

  • New member
  • *
  • Posts: 7
Re: Capture picture from Webcam
« Reply #3 on: October 07, 2021, 07:07:25 pm »
Thanks very much for yours responses

finally I installed DSPACK components o package, I compiled a sample but I get the message windows with  "Access violation" and I can see any image

best regards

Marcelo


MVG

  • New member
  • *
  • Posts: 7
Re: Capture picture from Webcam
« Reply #4 on: October 08, 2021, 04:33:28 pm »
Thanks for response,

I have installed vcl, I copied all the dll in the folder application, until now I don't have luck

regards

Marcelo

P.D. I'm working with windows 10 (64) and the current Lazarus version

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Capture picture from Webcam
« Reply #5 on: October 08, 2021, 04:57:23 pm »
hello,
I have installed vcl, I copied all the dll in the folder application, until now I don't have luck
P.D. I'm working with windows 10 (64) and the current Lazarus version
what are you using as component ? With tpaslibvlcplayer you don't need to copied the vlc dll in your folder. But installed vlc must be in the the same "type" that your compiled project ( 32 bits or 64 bits).
What doesn't work ?
Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko


dogriz

  • Full Member
  • ***
  • Posts: 127
Re: Capture picture from Webcam
« Reply #7 on: October 08, 2021, 10:03:21 pm »
You can try with "runcommand" and ffmpeg? Or even better - TProcess and some memory stream...
Something like this:
https://stackoverflow.com/questions/56566734/ffmpeg-take-snapshot-from-webcam-in-windows-10
« Last Edit: October 08, 2021, 10:05:12 pm by dogriz »
FPC 3.2.2
Lazarus 2.2.4
Debian x86_64, arm

 

TinyPortal © 2005-2018