How to check whether streaming is successful, With the help of VLC Software So the order is wrong, It's easy to take up resources. When it comes to processing images, It's best to save the original image in the queue, Then take it out of the queue for processing, I tried to save the processed pictures to the queue before, Then directly push, It is found that the push process takes up all the resources, Causes the process of processing the image to be unable to execute. Make sure you have installed ffmpeg, and ffmpeg Has been and nginx Good configuration. Size = (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)), int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))) Src = "/usr/local/web/studey/mysite/chat/video/4.mp4" # Push the processed image to the server through the pipeline ,image Is the processed picture # Take the picture out of the queue for processing, Then push it to the server through the pipeline # Piping configuration, The pipeline is used # Push the original picture into the queue Raise IOError("Couldn't open webcam or video") Vid = cv2.VideoCapture(r"/usr/local/web/studey/mysite/chat/video/4.mp4") # Configuration for streaming, There are many parameters, It can be queried and understood online # Streaming address, The front-end address is pulled through, The host IP,2019 yes ffmpeg stay nginx The port number set in # Use thread lock, Prevent thread deadlock Ubuntu16.04 The configuration nginx + RTMP Streaming media serverĬode reference : Camera real-time streaming import cv2 nginx+rtmp For specific installation configuration, please refer to : I'm working on a project recently, The front end only needs to show the original picture, Just connect the camera, Push the video stream to a server address, The front end can obtain the video stream according to the address, The front-end uses a video streaming plug-in video.js, Retractable rtmp Format video stream.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |