Error displaying video

When I use this code to upload a video after applying YOLOv5 detection model (mp4 format) on Streamlit, it cannot play. But the normal video that I had on my phone is played well, so I don’t know how to display this and how different they are when they have the same format mp4. This is the code I use:

import streamlit as st

video_file = open('IMG_0887_left_Trim.mp4', 'rb')
video_bytes = video_file.read()

st.video(video_bytes)

This is the result when I run

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.