Repository navigation
1.5.20: Take the speech-to-text audio from a format with sound when a platform has no audio-only format - #73
Merged
Merged
Conversation
…tform has no audio-only format TikTok offers no audio-only format, so the default selector made yt-dlp stop with "Requested format is not available", and the caller got "no subtitles". The default of YT_DLP_AUDIO_FORMAT now ends with best*[acodec!=none]. YouTube still gets the same format. The download is still one run. Closes #63 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
samson-art
marked this pull request as ready for review
October 6, 2026 18:43
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #63
What and why
Speech-to-text downloads the audio with
-f bestaudio[abr<=192]/bestaudio. TikTok offers no audio-only format: each format holds both video and sound. So yt-dlp stopped withRequested format is not available, and the caller got "no subtitles". Since 1.5.13 everyget_transcriptcall on TikTok withoutlanggoes to speech-to-text, so this was the usual answer for TikTok. Over the last 7 days it was the most common TikTok error ofget_transcript.The default of
YT_DLP_AUDIO_FORMATnow ends with/best*[acodec!=none]. When a platform has no audio-only format, yt-dlp takes the best format that has sound, and--extract-audiokeeps only the sound. Platforms with an audio-only format match the first part of the selector, so they get the same format as before.Plan
Files that change
src/youtube.ts: the default selector indownloadAudio.src/youtube.test.ts: a new test for the default-fvalue. The old default test now expects the new value..env.example,CHANGELOG.md: the new default. The README env table does not list this variable.Order of work
-fvalue and see it fail.Risks
YT_DLP_AUDIO_FORMATto the old default keeps the bug. The CHANGELOG says so.best*can be a larger download than an audio-only format. It is used only where no audio-only format exists.WHISPER_MAX_DURATION_SECONDS,YT_DLP_MAX_FILESIZEandYT_DLP_AUDIO_TIMEOUTstill apply.execFileAsync.Verified
Expected: "bestaudio[abr<=192]/bestaudio/best*[acodec!=none]",Received: "bestaudio[abr<=192]/bestaudio".make check-no-smoke: green, 17 suites, 488 tests.falls back to a format with sound when the platform has no audio-only format (#63)andshould pass format and audio-quality to yt-dlp and return path to audio filefail.Requested format is not available. The new selector picks a format withaacsound. A full run with--extract-audio --audio-format m4agives an m4a file with one audio stream of 10.5 s.Not verified
Not in scope
Unsupported URL).lang.After merge
get_transcripton a public TikTok video with speech, withoutlang: returns text.Requested format is not availablelines from the audio download.get_transcriptnot_founderrors on TikTok drop in the next weekly report.🤖 Generated with Claude Code