Recent

Author Topic: Component for Reading Video from CAMERA  (Read 4359 times)

BSaidus

  • Hero Member
  • *****
  • Posts: 541
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Component for Reading Video from CAMERA
« on: October 25, 2020, 06:38:23 pm »
Hello.
Is there a components for lazarus for reading streams and video from CAMERA's.
I know that there is RVMedia https://www.trichview.com/features/rvmedia.html,
TVideoGrabber https://www.datastead.com/products/video-sdk/ for delphi.
But they are not free.
So is there any component alternative for this that are able to work on Windows, Linux & Unix.

Thank you.
PS: ( Component or Library that be able to read from any kind of CAMERA ).
« Last Edit: October 25, 2020, 06:41:21 pm by BSaidus »
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: Component for Reading Video from CAMERA
« Reply #1 on: October 25, 2020, 07:05:33 pm »
Maybe you can try OpenCV.

I ported a library for that: https://github.com/t-edson/LazarusOpenCV
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: Component for Reading Video from CAMERA
« Reply #2 on: October 25, 2020, 09:36:58 pm »
rvmedia is indeed not free, but working.

Alternate you can use Directshow on windows an v4l on linux. Or gst on all :-)
« Last Edit: October 25, 2020, 09:41:18 pm by af0815 »
regards
Andreas

BSaidus

  • Hero Member
  • *****
  • Posts: 541
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Component for Reading Video from CAMERA
« Reply #3 on: October 26, 2020, 09:20:14 am »
@Edson, thanks, I will try it.
@af0815 Thank you, could you provide me with links to these projects ?

thanks
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Component for Reading Video from CAMERA
« Reply #4 on: October 26, 2020, 01:54:55 pm »
hello,
you can try also libvlc  with paslibvlc 

Friendly, J.P
« Last Edit: October 26, 2020, 01:59:07 pm by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

BSaidus

  • Hero Member
  • *****
  • Posts: 541
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Component for Reading Video from CAMERA
« Reply #5 on: October 26, 2020, 02:31:36 pm »
hello,
you can try also libvlc  with paslibvlc 

Friendly, J.P

Thank you, but I want a Video Capture library from CAMERA ( any kind of camera ). not just playing video.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Component for Reading Video from CAMERA
« Reply #6 on: October 26, 2020, 02:54:52 pm »
libvlc can capture network video stream  like IP camera (see here),  can also capture webcam video, tv stream video not only play video file
« Last Edit: October 26, 2020, 02:56:53 pm by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Component for Reading Video from CAMERA
« Reply #7 on: October 26, 2020, 04:53:05 pm »
Indeed, libvlc or directly ffmpeg. Libvlc is easier to use.
Specialize a type, not a var.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Component for Reading Video from CAMERA
« Reply #8 on: October 27, 2020, 04:50:27 pm »
In any event, if starting to use a new camera with Linux it's important to watch kernel output: there's still more camera setup variants and results than some v4l drivers are happy about.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

metis

  • Sr. Member
  • ****
  • Posts: 300
Re: Component for Reading Video from CAMERA
« Reply #9 on: December 13, 2020, 02:17:32 pm »
@BSaidus

... or directly ffmpeg ...
In this case, my FFGrab4Laz-Thread might be helpful for You:

Take the Source of 'ScreenRecorder2FPC' (= record Video with FFmpeg-LIBs) or
'RunFFmpeg' (= do anything via FFmpeg-CLIs) or FFmpeg's 'ffmpeg.exe' itself and
replace 'gdigrab' with Your Camera, as described in the FFmpeg-DOC
-> GoTo "26.6.2 Examples" (= for DirectShow) and search for "camera".
(According to Your Signature, You use Windows.)

To open the Camera (and the Microphone), try this:
ffmpeg -f dshow -i video="Camera":audio="Microphone"

And to record it to a File, add an Output, like:
ffmpeg -f dshow -i video="Camera":audio="Microphone" "output.mp4"

These are minimal FFmpeg-CommandLines. You may add more Arguments to adapt them to Your Needs.
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

 

TinyPortal © 2005-2018