OpenCV  4.0.1
Open Source Computer Vision
Video analysis (video module)

Look here in order to find use on your video stream algorithms like: motion extraction, feature tracking and foreground extractions.