Tutorial
Using the tutorial
Once you have installed valkka-examples with git as instructed in here, the example codes of this tutorial can be run like this:
cd valkka_examples/api_level_1/tutorial
python3 lesson_1_a.py
Prerequisites
Before starting with the tutorial, you need at least:
A decent desktop/laptop linux box with fairly recent Ubuntu installed (prefer LTS distros)
At least 4 GB of total memory (as modern linux distros take around 2 GB out of that)
Valkka and its python bindings installed (instructions here)
OpenCV installed (instructions here)
An RTSP camera connected to your router
Valkka uses standard protocols (RTSP, RTP, etc.), so it works with most of the cameras on the market
If your camera is “OnVif compliant”, then it support RTSP and RTP
Your camera should provide H264 stream (H265 not supported at the moment)
For the USB camera example, a H264 streaming USB camera is required
Basic knowledge of media streaming in linux:
How to connect to an rtsp camera (e.g. “ffplay rtsp://username:passwd@ip_address”)
What are RTSP, SDP, etc., what is H264 and how video is streamed, etc.
A media player installed, say, vlc and/or ffplay
Lessons
- Lesson 1 : Receiving frames from an IP camera
- Lesson 2 : Decoding
- Lesson 3 : Streaming to the X-window system
- Lesson 4 : Receiving Frames at Python
- Lesson 5 : Transmitting stream
- Lesson 6 : Writing / reading stream
- Lesson 7 : Decode, save, visualize, analyze and re-transmit
- Lesson 8: API level 2
- Lesson 9 : Drawing Bounding Boxes
- Lesson 10 : USB Cameras
- Lesson 11 : ValkkaFS