From d180d43e184feb8f4f3facc86c917498ca330f1b Mon Sep 17 00:00:00 2001 From: David Kifer Date: Mon, 12 Jan 2026 15:25:11 -0500 Subject: [PATCH] added documentation --- .../documentation/HOW_TO_RUN_BACKGROUND.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 video_transcription/ai_transcriber_v2/documentation/HOW_TO_RUN_BACKGROUND.md diff --git a/video_transcription/ai_transcriber_v2/documentation/HOW_TO_RUN_BACKGROUND.md b/video_transcription/ai_transcriber_v2/documentation/HOW_TO_RUN_BACKGROUND.md new file mode 100644 index 0000000..2547ba0 --- /dev/null +++ b/video_transcription/ai_transcriber_v2/documentation/HOW_TO_RUN_BACKGROUND.md @@ -0,0 +1,62 @@ +# How to Run Long Jobs in the Background (Detach & Disconnect) + +Since transcribing and translating videos can take hours, you likely want to start the job and then disconnect your SSH session or turn off your local computer without stopping the process on the remote server. + +Here are the two best ways to do this. + +## Method 1: Using `tmux` (Recommended for Wizard) +**Best for:** Using the interactive Wizard (`run_wizard_v2.py`) and seeing the progress bar when you reconnect. + +1. **Start a new session:** + ```bash + tmux new -s transcriber + ``` + *(This opens a new terminal "window" managed by the server)* + +2. **Run the Wizard:** + ```bash + ./ai_transcriber_v2/run_wizard_v2.py + ``` + Answer all the prompts as usual until the job starts. + +3. **Detach (Leave it running):** + * Press **`Ctrl` + `B`** together, release them, then press **`d`**. + * You will return to your normal prompt and see `[detached]`. + +4. **Disconnect:** + You can now safely close your SSH terminal or shut down your computer. + +5. **Reconnect Later:** + Log back into the server and run: + ```bash + tmux attach -t transcriber + ``` + You will see the progress bar exactly where you left it. + +--- + +## Method 2: Using `nohup` (Command Line Only) +**Best for:** Running automated scripts non-interactively. You CANNOT use the wizard with this method because you can't answer the prompts. + +1. **Run the command directly:** + Use `main.py` with all arguments provided upfront. + ```bash + nohup python3 ai_transcriber_v2/main.py /path/to/videos \ + --lang English \ + --model medium \ + --prefer-local \ + --embed \ + --cleanup \ + > job_output.log 2>&1 & + ``` + +2. **Verify it's running:** + ```bash + ps aux | grep main.py + ``` + +3. **Monitor Progress:** + Since you can't see the progress bar, check the log file: + ```bash + tail -f job_output.log + ```