You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.7KB

  1. import time
  2. from multiprocessing import Queue
  3. from os import getpid
  4. import cv2
  5. import psutil
  6. import requests
  7. from moviepy.editor import VideoFileClip
  8. from pymediainfo import MediaInfo
  9. # aa = time.time()
  10. # try:
  11. # clip = VideoFileClip("rtmp://192.168.10.101:19350/rlive/stream_107?sign=NQe66OXS")
  12. # print("分辨率:", clip.size)
  13. # print("帧率:", clip.fps)
  14. # print("持续时间:", clip.duration)
  15. # except:
  16. # pass
  17. # print(time.time() - aa)
  18. # aa = time.time()
  19. # cap = cv2.VideoCapture("rtmp://192.168.10.101:19350/rlive/stream_123?sign=w6RNKsFF")
  20. # width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
  21. # height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
  22. # total_frames = int(cap.get(7))
  23. # fps = cap.get(cv2.CAP_PROP_FPS)
  24. # duration = cap.get(cv2.CAP_PROP_POS_MSEC) / 1000
  25. # cap.release()
  26. # print("分辨率:", (width, height))
  27. # print("帧率:", fps)
  28. # print("持续时间:", duration)
  29. # print("总帧数:", total_frames)
  30. # print(time.time() - aa)
  31. # aa = Queue()
  32. # for i in range(1000):
  33. # aa.put("1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  34. # "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  35. # "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")
  36. # aa.cancel_join_thread()
  37. # aa.cancel_join_thread()
  38. # aa.close()
  39. # aa.cancel_join_thread()
  40. # aa.cancel_join_thread()
  41. # aa.close()
  42. # aa.cancel_join_thread()
  43. # aa.cancel_join_thread()
  44. # aa.get()
  45. # aa = time.time()
  46. # psutil.Process(getpid()).ppid()
  47. # print(time.time()-aa)