[PR #1599] [CLOSED] fix(workers): improve video download reliability #1866

Closed
opened 2026-03-02 11:59:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/1599
Author: @irobot
Created: 6/12/2025
Status: Closed

Base: mainHead: fix/video-dl-reliability


📝 Commits (1)

  • a1214d3 fix(workers): improve video download reliability

📊 Changes

2 files changed (+11 additions, -2 deletions)

View changed files

📝 apps/workers/workers/videoWorker.ts (+7 -1)
📝 docker/Dockerfile (+4 -1)

📄 Description

Context

In some cases video downloads fail due to TLS challenge. In the log we can see that the download failed, but not why it failed. In a test environment yt-dlp outputs the error to stderr, but that doesn't get logged.

ERROR: [generic] Got HTTP Error 403 caused by Cloudflare anti-bot challenge; try again with  --extractor-args "generic:impersonate"

Adding the extractor arguments fails differently, indicating that the installed version of yt-dl is missing a dependency. Per https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#impersonation the suggested dependency is curl-cffi.

Fix

  • Replace the binary version of yt-dlp with a version that includes curl-cffi.
  • Include the actual yt-dlp error in the log. That detail is logged at the debug level.

Note: for the fix to take effect, manually including the extractor arguments in CRAWLER_YTDLP_ARGS is still required.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/1599 **Author:** [@irobot](https://github.com/irobot) **Created:** 6/12/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/video-dl-reliability` --- ### 📝 Commits (1) - [`a1214d3`](https://github.com/karakeep-app/karakeep/commit/a1214d35bfa2b9a1ed5332524a5c2266ca0af4ba) fix(workers): improve video download reliability ### 📊 Changes **2 files changed** (+11 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `apps/workers/workers/videoWorker.ts` (+7 -1) 📝 `docker/Dockerfile` (+4 -1) </details> ### 📄 Description #### Context In some cases video downloads fail due to TLS challenge. In the log we can see that the download failed, but not why it failed. In a test environment yt-dlp outputs the error to stderr, but that doesn't get logged. ``` ERROR: [generic] Got HTTP Error 403 caused by Cloudflare anti-bot challenge; try again with --extractor-args "generic:impersonate" ``` Adding the extractor arguments fails differently, indicating that the installed version of yt-dl is missing a dependency. Per https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#impersonation the suggested dependency is curl-cffi. #### Fix * Replace the binary version of yt-dlp with a version that includes curl-cffi. * Include the actual yt-dlp error in the log. That detail is logged at the debug level. **Note:** for the fix to take effect, manually including the extractor arguments in CRAWLER_YTDLP_ARGS is still required. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 11:59:32 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1866
No description provided.