Big size video playback

Hello guys, I’m making a Deep learning application using CCTV data in its raw format. The problem is that when I try playing it back in like the way in the References, the tab just crashes, the size of the mp4 file ranges from 2GB to 6 GB and this isn’t even the worst size yet. so is there a way to read the video in a buffer or something and just load some of it as we go?

import streamlit as st

video_file = open("cams/cam0.mp4", "rb")
video_bytes =