A generic class which process a video file or other kind of input stream (http, rtsp) and allows the extraction of images frame by frame.
Video sources can be open with "openURL", which can manage both video files and "rtsp://" sources (IP cameras).
Frames are retrieved by calling CFFMPEG_InputStream::retrieveFrame
For an example of usage, see the file "samples/grab_camera_ffmpeg"
- This class is an easy to use C++ wrapper for ffmpeg libraries (libavcodec). In Unix systems these libraries must be installed in the system as explained in MRPT's wiki. In Win32, a precompiled version for Visual Studio must be also downloaded as explained in the wiki.
Definition at line 42 of file CFFMPEG_InputStream.h.
||const std::string &
Open a video file or a video stream (rtsp://) This can be used to open local video files (eg.
"myVideo.avi", "c:\a.mpeg") and also IP cameras (e. "rtsp://a.b.c.d/live.sdp"). However, note that there is currently no support for user/password in IP access. If verbose is set to true, more information about the video will be dumped to cout.
- See also
- close, retrieveFrame
- false on any error (and error info dumped to cerr), true on success.
Definition at line 118 of file CFFMPEG_InputStream.cpp.
References close(), m_grab_as_grayscale, m_impl, m_url, and url.
Referenced by mrpt::hwdrivers::CRovio::thread_video().