VideoLingo icon indicating copy to clipboard operation
VideoLingo copied to clipboard

[bug] 在windows中上传视频文件 不能以output开头

Open mozz85 opened this issue 11 months ago • 2 comments

问题描述: 在windows中 上传 output 开头的文件(如,output_01.mp4),导致网页卡在Running。

问题原因: VideoLingo-main\core\step1_ytdlp.py : 86 会删除 output/output 开头的文件 step1_ytdlp.py : 86 video_files = [file for file in video_files if not file.startswith("output/output")]

导致 download_video_section.py:14 的 find_video_files() 抛异常。

且由于未知原因,streamlit的st.file_uploader() 在 rerun() 后依旧 返回uploaded_file.

导致 循环执行 st.rerun()

image

mozz85 avatar Jan 04 '25 15:01 mozz85

st.rerun() 后 file_uploader() 依旧返回 已上传的文件 可能原因: after the file is uploaded via file_uploader, it should persist as file_uploader widget value / session_state during reruns, until the user deletes it manually. 参考链接:https://github.com/streamlit/streamlit/issues/7097

mozz85 avatar Jan 04 '25 16:01 mozz85

为什么会发现这个问题?手动用ffmpeg分割视频时,文件名恰巧为output开头。

翻译长视频时,会自动按30分钟分割。但经常在处理第二个分片时,遇到 cuda out of memory。手动分片处理,若不重启服务依旧会有oom。可能有内存泄漏。

mozz85 avatar Jan 05 '25 06:01 mozz85