Video streaming Tutorial of sending processed Opencv video to NGINX and distributing video from NGINX (broadcast) by HLS stream for a wider audience, like multiple web players, VLC, or any other video stream receiver. Opencv application HLS streaming by GStreamer and NGINX We will use GStreamer to send video from the Opencv application by rtmp2sink to an RTMP module in NGINX. In our example, the server is a widely used NGINX server with an Nginx-RTMP-module. The NGINX will receive RTMP video from Opencv and restream as an HLS video stream considered for multiple end consumers. This is a follow-up to the previous article about Video streaming from Opencv to RtspSimpleServer by rtsp protocol. The goal is the same. Send video from Opencv to the server and restream the video for a wider audience. The difference is that RtspSimpleServer running on windows, NGINX is running in docker (WSL2). The one-to-one communication between Opencv and RtspSimpleServer was established by RTSP protocol
Compile OpenCV with Cuda is an easy task. All you need is the right HW from NVIDIA, drivers, and software. Additionally, the processed output video should be stream out from the OpenCV using the GStreamer. I am putting the GStreamer now as the standard option of my installation of OpenCV on the Windows machine. Let's go through step by step compilation of OpenCV from source, including Cuda, Gstreamer, and contribution modules. It is just a small increment to my previous tutorial that focuses just on the GStreamer setting in the Windows CMAKE project. This is a simplified version, verified on a different machine than the previous tutorials. You can found some details in this tutorial Install Opencv Gstreamer on windows step by step . Software prerequisites Install cuda, This is my version of network installer cuda_11.0.2_win10_network Visual Studio 2019 community Cmake 3.17.4 Opencv 4.4 Opencv_contrib Opencv Compilation in windows steps by step with GStreamer Extract or get t