Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

fix(yt-dlp): use video-only fallback for DASH sites without ffmpeg

InstaZDLLa3ef745db024
diff --git a/src-tauri/src/core/ytdlp.rs b/src-tauri/src/core/ytdlp.rs
index f2f636a3..1e15bfe5 100644
--- a/src-tauri/src/core/ytdlp.rs
+++ b/src-tauri/src/core/ytdlp.rs
@@ -848,13 +848,13 @@ pub async fn download_video(
_ => "bv*+ba[ext=m4a]/bv*+ba/b".to_string(),
}
} else {
- tracing::warn!("[yt-dlp] ffmpeg not available, using single-stream format");
+ tracing::warn!("[yt-dlp] ffmpeg not available, using fallback format selector");
match quality_height {
Some(h) if h > 0 => format!(
- "b[height<={}]/bv*[height<={}]+ba/b",
+ "b[height<={}]/bv*[height<={}]/b",
h, h
),
- _ => "b/bv*+ba".to_string(),
+ _ => "b/bv*".to_string(),
}
}
}
@@ -1361,9 +1361,12 @@ pub async fn download_video(
tracing::warn!("[yt-dlp] login required, enabling cookies-from-browser");
}
- if stderr_lower.contains("requested format") && stderr_lower.contains("not available") {
+ if stderr_lower.contains("requested format") && stderr_lower.contains("not available")
+ || stderr_lower.contains("ffmpeg") && stderr_lower.contains("not found")
+ || stderr_lower.contains("postprocessing")
+ {
if format_already_simplified {
- tracing::warn!("[yt-dlp] format not available after simplification, giving up");
+ tracing::warn!("[yt-dlp] format/postprocessing error after simplification, giving up");
break;
}
@@ -1375,7 +1378,7 @@ pub async fn download_video(
base_args.remove(pos + 1);
base_args.remove(pos);
}
- tracing::warn!("[yt-dlp] format not available on attempt {}, removed -f and player_client to use yt-dlp defaults", attempt + 1);
+ tracing::warn!("[yt-dlp] format/postprocessing error on attempt {}, removed -f and player_client to use yt-dlp defaults", attempt + 1);
format_already_simplified = true;
}