Lazarus

Programming => Graphics and Multimedia => Audio and Video => Topic started by: BSaidus on October 25, 2020, 06:38:23 pm

Title: Component for Reading Video from CAMERA
Post by: BSaidus 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 (https://www.trichview.com/features/rvmedia.html),
TVideoGrabber https://www.datastead.com/products/video-sdk/ (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 ).
Title: Re: Component for Reading Video from CAMERA
Post by: Edson 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
Title: Re: Component for Reading Video from CAMERA
Post by: af0815 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 :-)
Title: Re: Component for Reading Video from CAMERA
Post by: BSaidus 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
Title: Re: Component for Reading Video from CAMERA
Post by: Jurassic Pork on October 26, 2020, 01:54:55 pm
hello,
you can try also libvlc  with paslibvlc (https://prog.olsztyn.pl/paslibvlc/) 

Friendly, J.P
Title: Re: Component for Reading Video from CAMERA
Post by: BSaidus on October 26, 2020, 02:31:36 pm
hello,
you can try also libvlc  with paslibvlc (https://prog.olsztyn.pl/paslibvlc/) 

Friendly, J.P

Thank you, but I want a Video Capture library from CAMERA ( any kind of camera ). not just playing video.
Title: Re: Component for Reading Video from CAMERA
Post by: Jurassic Pork on October 26, 2020, 02:54:52 pm
libvlc can capture network video stream  like IP camera (see here (https://forum.lazarus.freepascal.org/index.php/topic,42737.msg298994.html#msg298994)),  can also capture webcam video, tv stream video not only play video file
Title: Re: Component for Reading Video from CAMERA
Post by: Thaddy on October 26, 2020, 04:53:05 pm
Indeed, libvlc or directly ffmpeg. Libvlc is easier to use.
Title: Re: Component for Reading Video from CAMERA
Post by: MarkMLl 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
Title: Re: Component for Reading Video from CAMERA
Post by: metis on December 13, 2020, 02:17:32 pm
@BSaidus

... or directly ffmpeg ...
In this case, my FFGrab4Laz-Thread (https://forum.lazarus.freepascal.org/index.php/topic,43411.0.html) 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 (http://www.ffmpeg.org/ffmpeg-all.html)
-> 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.
TinyPortal © 2005-2018