Enhance file selection to support multiple video formats (MP4, AVI, MOV, MKV) and provide user guidance on supported formats.
This commit is contained in:
9
app.py
9
app.py
@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user