The original application was a desktop GUI built with Tkinter. To use this application on a headless home server (like TrueNAS or Proxmox) and access it remotely, it needed to be converted into a web application.
-
Streamlit Web UI (
app.py)- Replaced the Tkinter interface with a modern web UI using Streamlit.
- Instead of uploading massive video files through the browser (which would crash or take hours), the app is designed to read files directly from the server's hard drive by pointing it to a
/data/mount. - Added an upload tab (configured for up to 4GB files) for smaller files.
- Added immediate "Download" buttons for the generated
.edland.txtfiles upon task completion.
-
Expanded File Format Support
- The original code hardcoded searches for
.mkvfiles. - Updated the
globlogic in both the "Cut Folder" and "Transcribe Folder" functions to support.mp4,.mov,.avi,.wav, and.mkvfiles (and their uppercase variants).
- The original code hardcoded searches for
-
FFmpeg & Audio Stream Bug (
cutter.py)- The Problem: The original code extracted audio using
ffmpeg -map 0:1. This assumes that the audio stream is always the second stream in the file (index 1). In many.mp4files, the audio is actually index 0. This caused ffmpeg to crash when trying to convert a video stream into a.wavfile. - The Fix: Changed the map argument to
-map 0:a:{chan-1}. Thea:specifier tells ffmpeg to specifically target the audio streams, completely ignoring the video streams regardless of their absolute index.
- The Problem: The original code extracted audio using
-
FFprobe Subprocess Bug (
access_ffprobe.py)- The Problem: The
subprocess.check_output(cmd, shell=True)call was failing becausecmdwas passed as a Python list. Whenshell=Trueis used, the command should be a single string. - The Fix: Changed it to
shell=Falseso the list of arguments is executed safely and correctly.
- The Problem: The
To process files that live on a TrueNAS server without moving them to the laptop:
- The TrueNAS SMB share is mounted to the host machine (Fedora) at the system level:
sudo mount -t cifs //192.168.0.203/winset /mnt/winset -o username=nasuser - The Docker container is launched with
/mnt/winsetvolume-mounted to/data:sudo docker run -d --name yptools -p 8501:8501 -v /mnt/winset:/data youtubepreptools - The web app is accessed at
http://localhost:8501, and the server path is provided as/data/VIDEO_CAPTURE_PROJECTS/....