Add MP4 upload support

This commit is contained in:
2026-05-22 20:36:33 +01:00
parent 665ea41c65
commit a25a60f217
6 changed files with 185 additions and 29 deletions

View File

@@ -78,6 +78,8 @@ Open `http://127.0.0.1:7860` and submit a YouTube URL. Jobs run through the same
The OpenAI-compatible translation endpoint, API key, and model can be changed in the UI under **OpenAI-Compatible Settings**. Click **Save Settings** to persist them to `.cache/web_settings.json` for future web jobs. Unsaved values in the fields are still used for the next job you start.
You can also upload a local `.mp4` instead of entering a YouTube URL. Uploaded videos are staged under `.cache/uploads` and processed with the same transcription, translation, dubbing, and render pipeline.
### Docker
Build and run the Gradio UI in a container:
@@ -120,11 +122,18 @@ Authentication options for restricted videos still work as before:
.venv\Scripts\python.exe main.py "https://youtube.com/watch?v=VIDEO_ID" --lang de --cookies cookies.txt
```
Process a local MP4:
```powershell
.venv\Scripts\python.exe main.py --input-file "C:\path\to\video.mp4" --lang es
```
## CLI Options
| Option | Description |
| --- | --- |
| `url` | YouTube video URL to process |
| `--input-file` | Local MP4 file to process instead of a YouTube URL |
| `--lang`, `-l` | Target language code |
| `--browser`, `-b` | Browser name for cookie extraction |
| `--cookies`, `-c` | Path to exported cookies file |