Fix YouTube downloads - Add Deno runtime for video cipher decryption #259
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix YouTube Downloads - Issue #224
Problem
YouTube downloads were failing with "exit status 1" error. Root cause: YouTube now requires yt-dlp to use a JavaScript runtime for video cipher decryption (see yt-dlp/yt-dlp#14404).
Solution
1. Install Deno Runtime
Added Deno installation to both Dockerfiles (standard and CUDA) since YouTube requires JavaScript execution for video decryption.
Files:
Dockerfilelines 71-77,Dockerfile.cudalines 74-802. Upgrade to yt-dlp[default]
Changed from
yt-dlptoyt-dlp[default]to include all optional dependencies (brotli, pycryptodomex, websockets, mutagen).File:
internal/transcription/adapters/whisperx_adapter.goline 3493. Add Error Diagnostics
Added stderr capture to YouTube download command to surface actual yt-dlp errors instead of generic "exit status 1" messages.
File:
internal/api/handlers.golines 2700-27534. Add Performance Logging
Added timing metrics for YouTube downloads to identify bottlenecks.
File:
internal/api/handlers.go- Download timing and file size loggingTesting
Manual verification:
Test case: 30-minute YouTube video
Files Modified
Dockerfile- Added Deno installationDockerfile.cuda- Added Deno installationinternal/api/handlers.go- Added stderr capture and YouTube performance logginginternal/transcription/adapters/whisperx_adapter.go- Changed to yt-dlp[default]Related Issues
Closes #224