diff --git a/src/sources/ytdlp.ts b/src/sources/ytdlp.ts index a7eae19..46dc9b4 100644 --- a/src/sources/ytdlp.ts +++ b/src/sources/ytdlp.ts @@ -363,9 +363,17 @@ export async function hasProgressiveVideo(pageUrl: string, maxHeight: number): P "%(format_id)s", pageUrl, ]); - return stdout.trim().length > 0; + const formatId = stdout.trim(); + if (!formatId) { + log.warn({ pageUrl }, "no progressive format offered, playing audio only"); + return false; + } + log.info({ pageUrl, formatId }, "progressive format for video playback"); + return true; } catch (err) { - log.debug({ err, pageUrl }, "no progressive format for video playback"); + // Worth seeing: this is the difference between "clip plays" and "sound only". + const reason = err instanceof Error ? err.message : String(err); + log.warn({ pageUrl, reason }, "format lookup failed, playing audio only"); return false; } }