Enhance file selection to support multiple video formats (MP4, AVI, MOV, MKV) and provide user guidance on supported formats.

This commit is contained in:
Your Name
2025-07-16 23:50:32 -04:00
parent ce9bb9c2e2
commit c2ee2394d2

9
app.py
View File

@ -319,10 +319,15 @@ def main():
st.markdown(f"- {error}") st.markdown(f"- {error}")
return return
# File selection # File selection - support multiple video formats
recordings = list(base_path.glob("*.mp4")) supported_extensions = ["*.mp4", "*.avi", "*.mov", "*.mkv"]
recordings = []
for extension in supported_extensions:
recordings.extend(base_path.glob(extension))
if not recordings: if not recordings:
st.warning(f"📂 No recordings found in the folder: {base_folder}!") st.warning(f"📂 No recordings found in the folder: {base_folder}!")
st.info("💡 Supported formats: MP4, AVI, MOV, MKV")
return return
selected_file = st.selectbox("Choose a recording", recordings) selected_file = st.selectbox("Choose a recording", recordings)