text: Title: YOLO + OpenCV: Stream Decoding Issues
  Body: ### Search before asking
  
  - [x] I have searched the Ultralytics YOLO [issues](https://github.com/ultralytics/ultralytics/issues) and [discussions](https://github.com/orgs/ultralytics/discussions) and found no similar questions.
  
  
  ### Question
  
  I am attempting to use YOLO to perform real-time object detection on an RTSP stream from my Raspberry Pi connected to a camera. When I process the stream in real-time (a direct stream input), there are no artifacts, and it runs fine. However, when I process the stream frame by frame, I get many artifacts and the error 'h264 error while decoding MB'. Could this be related to the rate at which frames are being processed? I am running on a powerful machine, so I can rule out hardware limitations. Is there a way I can process the stream frame by frame without experiencing these artifacts?
  
  ![Image](https://github.com/user-attachments/assets/f797dab4-e661-4b96-8b4b-263f583239de)
  
  ### Additional
  
  _No response_