-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Produce json output when a live content is upcoming or offline, communicating as such #9934
Comments
add |
@bashonly doesn't work. I'm still not getting any json output saying that the live stream is offline. Twitch:
Kick:
Twitcasting:
etc. |
It works when you pass a specific video's URL, e.g. |
There is no video to extract at Anyway, let me re-state my feature request again. When running yt-dlp on a content that can be either offline or live, e.g. a Twitch channel page like When such content is live, yt-dlp properly produces json output with
However, when a live stream is offline, yt-dlp doesn't produce any json output:
It correctly deducts that the channel is offline, but doesn't produce json saying that. I expect it to output at least: |
When you pass a channel URL to these extractors, e..g. youtube or twitch, if there is a known upcoming livestream, then said extractor has information (such as |
Could this be noted in the wiki/docs on the homepage for this option? This has been my 2nd biggest complaint about trying to capture live chat for upcoming streams. It would have been nice to know this sooner. |
I wish I could receive these errors, e.g. UserNotLive, in a machine-readable format like json. I'm writing a script for mpv in Lua that runs yt-dlp.exe on a URL and captures its json output. I want to detect if the URL is a live stream that is offline. Instead I have to resort to checking yt-dlp's stdout/stderr for patterns that look like "ERROR: [twitch:stream] vinesauce: The channel is not currently live", "ERROR: [youtube] rKMhl43RHo0: This live event will begin in 532 days.", etc.
Well, 'live_status': 'is_upcoming' was just an example. Like I said, just anything whatever is appropriate. It could be 'live_status': 'not_live', or an entirely new live_status that doesn't exist yet. Btw, this issue got re-labeled as a question, but it's actually a feature request. |
|
From docs
|
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Provide a description that is worded well enough to be understood
yt-dlp has an option to output json, which has
live_status
field. Yet, when running yt-dlp on a content that can be either live or offline, like an upcoming/scheduled YouTube live stream or an offline Twitch channel, and requesting json output -- no json output gets generated and instead the extractor prints an error that the live stream is upcoming in N days or that the channel is currently offline -- an error which is not meant to be machine-parsable. Would be great if this could be communicated via json by all the extractors, e.g. by outputting json with"live_status": "is_upcoming"
and"live_status": "not_live"
.Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
The text was updated successfully, but these errors were encountered: