This project helps in fetching continous live RTSP stream using GStreamer, Python and numpy without compromising on stream quality.
multiprocessing is used in python to avoid main thread getting stuck.
Just clone this Repo then in main_prg.py add your rtsp stream on below line:
self.camlink = '' #Add your RTSP cam link
This you would already know
You will need GStreamer. Installation instruction can be found on this link GStreamer Still for your quick reference will list installation instruction for Ubuntu:
apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
There are various way to install OpenCV but example using (Conda, PIP or build from source). But for purpose of this project below is instruction using PIP
pip3 install opencv-contrib-python
pip3 install numpy
Post cloning the Repo, go to repo dir (Also include cam link in main_prg.py as mentioned above).
python3 main_prg.py
This project is licensed under the MIT License - see the LICENSE.md file for details