Lazarus
Programming => Graphics and Multimedia => Audio and Video => Topic started 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 ).
-
Maybe you can try OpenCV.
I ported a library for that: https://github.com/t-edson/LazarusOpenCV
-
rvmedia is indeed not free, but working.
Alternate you can use Directshow on windows an v4l on linux. Or gst on all :-)
-
@Edson, thanks, I will try it.
@af0815 Thank you, could you provide me with links to these projects ?
thanks
-
hello,
you can try also libvlc with paslibvlc (https://prog.olsztyn.pl/paslibvlc/)
Friendly, J.P
-
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.
-
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
-
Indeed, libvlc or directly ffmpeg. Libvlc is easier to use.
-
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
-
@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.