![]() Setting it up the source to be your ffmpeg camera. Note that the input can only be an url (rtsp or http)Īnd follow this page to setup the dlib component Go into your configuration.yaml and follow this to setup your camera tobytes ()) # Press Q on keyboard to exitĬap. FONT_HERSHEY_SIMPLEX, 0.45, ( 0, 255, 0 ), 2 ) # We send the frame to the standard output, then FFMPEG will catch it and process it putText ( frame, "Timestamp : " + str ( ts ), ( 15, 15 ), cv2. # The input file is located in the current working directory. # python3 simple.py | ffmpeg -f rawvideo -pix_fmt bgr24 -s 720x400 -framerate 25 -i -c:v libx264 output.mp4 # python3 simple.py | ffplay -f rawvideo -pix_fmt bgr24 -s 720x400 -framerate 25 -i. Import cv2 import os import time import sys # Don't forget to check resolution & framerate !! You can check with : ffprobe yourFile.mp4 destroyAllWindows () Standard Output (stdout) piped to FFMPEG & FFPLAY waitKey ( 25 ) & 0xFF = ord ( 'q' ): break else : break # Cleaning write ( frame ) # Press Q on keyboard to exit ![]() read () if ret = True : # Do something with the frame. isOpened () = False ): print ( "Error opening video stream or file" ) while ( cap. VideoWriter_fourcc ( * 'VP80' ), 25.0, ( 720, 400 )) # The input file is located in the current working directory.Ĭap = cv2. Import cv2 import os import time import sys # Don't forget to check the framerate of your input file !! You can check with : ffprobe yourFile.mp4
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |