Skip to content

Conversation

@tonymet
Copy link
Contributor

@tonymet tonymet commented Oct 28, 2025

What this Pull Request (PR) does

Improve yt-dlp stability & debugging to address #1787 & #1785

  • simplify retry / no-lang routine to preserve --yt-dlp-args and other args
  • output yt-dlp args, stdout & stderr when --debug=3 is passed
  • fix bug with --sub-langs redundant lang (red herring)

Related issues

#1787 -- fixed by reducing side-effects with args & --yt-dlp-args
#1785 -- partially fixed by improving debugging and passthrough of --yt-dlp-args=--sleep-requests 1"

Screenshots

example debug output showing args , stdout + stderr from yt-dlp

DEBUG: yt-dlp [yt-dlp --write-auto-subs --skip-download --sub-format vtt -o C:\Users\tonymet\AppData\Local\Temp\fabric-youtube-LGd6GXq7L2Y\%(title)s.%(ext)s --sub-langs en,en.* --sleep-requests 1 https://www.youtube.com/watch?v=LGd6GXq7L2Y]
DEBUG: [youtube] Extracting URL: https://www.youtube.com/watch?v=LGd6GXq7L2Y
DEBUG: [youtube] LGd6GXq7L2Y: Downloading webpage
DEBUG: [youtube] Sleeping 1.0 seconds ...
DEBUG: [youtube] LGd6GXq7L2Y: Downloading tv client config
DEBUG: [youtube] Sleeping 1.0 seconds ...
DEBUG: [youtube] LGd6GXq7L2Y: Downloading tv player API JSON
DEBUG: [youtube] Sleeping 1.0 seconds ...
DEBUG: [youtube] LGd6GXq7L2Y: Downloading web safari player API JSON
DEBUG: [youtube] Sleeping 1.0 seconds ...
DEBUG: [youtube] LGd6GXq7L2Y: Downloading m3u8 information
DEBUG: [info] LGd6GXq7L2Y: Downloading subtitles: en, en-orig
DEBUG: [info] LGd6GXq7L2Y: Downloading 1 format(s): 315+251
DEBUG: [info] Writing video subtitles to: C:\Users\tonymet\AppData\Local\Temp\fabric-youtube-LGd6GXq7L2Y\Finding the Best 1 Gallon Keg for Homebrewing & Giving It Away!.en.vtt
DEBUG: [download] Destination: C:\Users\tonymet\AppData\Local\Temp\fabric-youtube-LGd6GXq7L2Y\Finding the Best 1 Gallon Keg for Homebrewing & Giving It Away!.en.vtt
[download] 100% of  153.21KiB in 00:00:00 at 708.00KiB/s
DEBUG: [info] Writing video subtitles to: C:\Users\tonymet\AppData\Local\Temp\fabric-youtube-LGd6GXq7L2Y\Finding the Best 1 Gallon Keg for Homebrewing & Giving It Away!.en-orig.vtt
DEBUG: [download] Destination: C:\Users\tonymet\AppData\Local\Temp\fabric-youtube-LGd6GXq7L2Y\Finding the Best 1 Gallon Keg for Homebrewing & Giving It Away!.en-orig.vtt
[download] 100% of  153.21KiB in 00:00:00 at 941.82KiB/s

Retry Example

DEBUG: yt-dlp [yt-dlp --write-auto-subs --skip-download --sub-format vtt -o C:\Users\tonymet\AppData\Local\Temp\fabric-youtube-LGd6GXq7L2Y\%(title)s.%(ext)s --sub-langs zzz,zz.*,zz --sleep-requests 1 https://www.youtube.com/watch?v=LGd6GXq7L2Y]
[TRUNCATED]
DEBUG: yt-dlp [yt-dlp --write-auto-subs --skip-download --sub-format vtt -o C:\Users\tonymet\AppData\Local\Temp\fabric-youtube-LGd6GXq7L2Y\%(title)s.%(ext)s --sleep-requests 1 https://www.youtube.com/watch?v=LGd6GXq7L2Y]      
[TRUNCATED]
DEBUG: Starting template processing
DEBUG: Starting template processing

Testing

Test the retry with these args

# set lang to zzz to force retry
 ["-g", "zzz", "--debug=3", "-y", "https://www.youtube.com/watch?v=LGd6GXq7L2Y", "-p", "extract_wisdom", "--yt-dlp-args=--sleep-requests 1"],

@tonymet tonymet force-pushed the subtitle-error-handling branch from 3627b68 to 3211f6f Compare October 28, 2025 04:54
@ksylvan ksylvan force-pushed the subtitle-error-handling branch from a0cadc1 to c49acaa Compare October 28, 2025 14:21
@ksylvan ksylvan force-pushed the subtitle-error-handling branch from c49acaa to 4f20f7a Compare October 28, 2025 14:29
Copy link
Collaborator

@ksylvan ksylvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaned some stuff up, and approved.

@ksylvan ksylvan merged commit ba67045 into danielmiessler:main Oct 28, 2025
1 check passed
@tonymet
Copy link
Contributor Author

tonymet commented Oct 28, 2025

great partnership as always. thanks @ksylvan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants