Recent

Author Topic: Webcam in Linux  (Read 3498 times)

firman

  • New member
  • *
  • Posts: 7
Webcam in Linux
« on: April 30, 2016, 06:36:35 pm »
Hello i m newbi in lazarus. Sorry about english. Anyone can help me some code to access my webcam in linux (/dev/video0)

mrdebug

  • Full Member
  • ***
  • Posts: 160

firman

  • New member
  • *
  • Posts: 7
Re: Webcam in Linux
« Reply #2 on: April 30, 2016, 07:46:03 pm »
Thanks mrdebug . I am trying to run on my win but I dont understand how to use freepascal videotest ?

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Webcam in Linux
« Reply #3 on: May 01, 2016, 01:50:56 am »
hello,
you can also use TmPlayerControl component   see here

With this component and this code for the button :

Code: Pascal  [Select][+][-]
  1.  procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3.   MPlayerControl1.Filename := 'tv://';
  4.   MPlayerControl1.Play;
  5. end;    

i can see video from webcam  (see attachment)

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

 

TinyPortal © 2005-2018