Skip to content
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

Closed
9 tasks done
nurupo opened this issue May 16, 2024 · 9 comments
Closed
9 tasks done
Labels
question Question

Comments

@nurupo
Copy link

nurupo commented May 16, 2024

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

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

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU', '--no-config', '--dump-json', 'https://www.twitch.tv/vinesauce']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win32_dir)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[twitch:stream] Extracting URL: https://www.twitch.tv/vinesauce
[twitch:stream] vinesauce: Downloading stream GraphQL
ERROR: [twitch:stream] vinesauce: The channel is not currently live
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\twitch.py", line 1033, in _real_extract



[debug] Command-line config: ['-vU', '--no-config', '--dump-json', 'https://www.youtube.com/watch?v=rKMhl43RHo0']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win32_dir)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://www.youtube.com/watch?v=rKMhl43RHo0
[youtube] rKMhl43RHo0: Downloading webpage
[youtube] rKMhl43RHo0: Downloading ios player API JSON
[youtube] rKMhl43RHo0: Downloading android player API JSON
WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "rKMhl43RHo0")
ERROR: [youtube] rKMhl43RHo0: This live event will begin in 532 days.
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\youtube.py", line 4182, in _real_extract
  File "yt_dlp\extractor\common.py", line 1251, in raise_no_formats
@nurupo nurupo added enhancement New feature or request triage Untriaged issue labels May 16, 2024
@bashonly
Copy link
Member

add --ignore-no-formats-error to your command

@bashonly bashonly added question Question and removed enhancement New feature or request triage Untriaged issue labels May 16, 2024
@nurupo
Copy link
Author

nurupo commented May 16, 2024

@bashonly doesn't work. I'm still not getting any json output saying that the live stream is offline.

Twitch:

[debug] Command-line config: ['-vU', '--no-config', '--ignore-no-formats-error', '--dump-json', 'https://www.twitch.tv/vinesauce']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win32_dir)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[twitch:stream] Extracting URL: https://www.twitch.tv/vinesauce
[twitch:stream] vinesauce: Downloading stream GraphQL
ERROR: [twitch:stream] vinesauce: The channel is not currently live
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\twitch.py", line 1033, in _real_extract

Kick:

[debug] Command-line config: ['-vU', '--no-config', '--ignore-no-formats-error', '--dump-json', 'https://kick.com/xQc']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win32_dir)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[Kick] Setting up session
[Kick] Extracting URL: https://kick.com/xQc
[Kick] xQc: Downloading API JSON
ERROR: [Kick] xQc: The channel is not currently live
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\kick.py", line 61, in _real_extract

Twitcasting:

[debug] Command-line config: ['-vU', '--no-config', '--ignore-no-formats-error', '--dump-json', 'https://twitcasting.tv/c:nanamori']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win32_dir)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[TwitCastingLive] Extracting URL: https://twitcasting.tv/c:nanamori
[TwitCastingLive] Downloading live video of user c:nanamori. Pass "https://twitcasting.tv/c:nanamori/show" to download the history
[TwitCastingLive] c:nanamori: Checking live status
ERROR: [TwitCastingLive] c:nanamori: The channel is not currently live
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\twitcasting.py", line 254, in _real_extract

etc.

@bashonly
Copy link
Member

It works when you pass a specific video's URL, e.g. https://www.youtube.com/watch?v=rKMhl43RHo0, instead of the uploader URL. There is no video to extract when you only pass the uploader URL

@nurupo
Copy link
Author

nurupo commented May 16, 2024

There is no video to extract at https://www.youtube.com/watch?v=rKMhl43RHo0 either, it's an upcoming live stream, there is no video on there, at least not yet. Similarly, those are not "uploader URLs", those are URLs for upcoming Twitch, Kick, etc. live streams. They don't have specific pre-assigned video ids like YouTube does, they just have the channel page that goes live when the stream starts. But what difference does this make, why doesn't yt-dlp provide the same output as it does for an upcoming YouTube live stream with --ignore-no-formats-error?

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 https://www.twitch.tv/vinesauce, or a Kick channel page like https://kick.com/xQc, or Twitcasting user page like https://twitcasting.tv/c:nanamori, etc., and when asking yt-dlp for json output, I want the json to tell me if the content is live or offline.

When such content is live, yt-dlp properly produces json output with "live_status": "is_live" and "is_live": "true". For example, here is an output of a Twitch live stream https://www.twitch.tv/ferretsoftware that is currently live:

[debug] Command-line config: ['-vU', '--no-config', '--ignore-no-formats-error', '--dump-json', 'https://www.twitch.tv/ferretsoftware']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win32_dir)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[twitch:stream] Extracting URL: https://www.twitch.tv/ferretsoftware
[twitch:stream] ferretsoftware: Downloading stream GraphQL
[twitch:stream] ferretsoftware: Downloading stream access token GraphQL
[twitch:stream] ferretsoftware: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 51091397101: Downloading 1 format(s): 1080p60__source_
{"id": "51091397101", "display_id": "ferretsoftware", "title": "FerretSoftware (live) 2024-05-16 16:44", "description": "Ferret Time! \ud83d\udc9c @PirateSoftware \ud83d\udc9b  !Names !Music !Diet !Rescue", "thumbnails": [{"url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_ferretsoftware-1280x720.jpg", "id": "0"}, {"url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_ferretsoftware-0x0.jpg", "preference": 1, "id": "1"}], "uploader": "FerretSoftware", "uploader_id": "ferretsoftware", "timestamp": 1715710641, "view_count": null, "formats": [{"format_id": "audio_only", "format_index": null, "url": "https://video-weaver.mia05.hls.ttvnw.net/v1/playlist/CuME12ulB7kKr2ST_4sOHCUK6mNwZc-GApR_2fRYuhTUj8xmvD_qPI6J1Q-j41vPGU705HvHzR4TVJFfkuZCHp9CY8cv2hZP_6hS2HFD8qxlLNf0yyv6_YppC1VS9leqssYZplUryUh-m5X2Na0zZGDFqQp0xx-XgYDykR3GXNdALrcsk-N4dDSAJBEaRJ0yO1OIX_nEjBs7DBhuee2PFEOU6moC9MuQQRIMmPlQQXIhysTnLyCITw0CbY8GtybPkFFzAuLWu74ovgzug8JsnDTQmFdHcLiF0X6JpllwGdZ6NWaRSzbEpCGZwMdBHi2RAImBAjMjJ-9MiWS8tsd3OTMzfAwYSvOnjsQe_MS-P3cayAw9cw_iDnLjfUhGakELDN4BTEj7tUL8Yz3EQRFGqWFVkfqj4Q4X99x-aOSBx3mj0p4MRnuF48K2Be9nguW-54XobVNVvGpwoDA5PQNo6Htk6Ge1ocOzWHl7Soi-Fvi6mu4el09HqcDyb8alXSlWN_RXB1zb76YL5umdjznWN7Gw0faezH9C8QRfVZ74jlDzKrC5xm8z4gt44ToeigFoaXgZD1XTZng74O0F_w2MvmdUKYJmLd5IMUC0oh3jCLaP9qmam5BDmCVLxEdV2XrS7OEZGb8QeEhY9vTmVI4YB1Yi8KakkBWWyXq1ix_MnAORI94pw8Wd7G_HpX5kjk1pLA4cgEGiU-K6o87KLD48VIDYRvpjcJvVfXnHbMr73qKa_gz-aAKAQsQUJ_upUAdB5WNMIEJL4v-3EGE6RMHcKmdyHGh7iS9HMrmwB1CPV_47AwR-OpgaDM7_aPJtXvbFZ0sl4SABKgl1cy1lYXN0LTEw7Qc.m3u8", "manifest_url": "https://usher.ttvnw.net/api/channel/hls/ferretsoftware.m3u8?allow_source=true&allow_audio_only=true&allow_spectre=true&p=2619705&platform=web&player=twitchweb&supported_codecs=av1%2Ch265%2Ch264&playlist_include_framerate=true&sig=10345a9a9707dc4cbb2ddd673083727f5968e5af&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22ferretsoftware%22%2C%22channel_id%22%3A884338173%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1715879089%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Atrue%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%2297.100.15.50%22%2C%22version%22%3A2%7D", "tbr": 160.0, "ext": "mp4", "fps": null, "protocol": "m3u8_native", "preference": null, "quality": null, "has_drm": false, "vcodec": "none", "acodec": "mp4a.40.2", "dynamic_range": null, "resolution": "audio only", "aspect_ratio": null, "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}, "audio_ext": "mp4", "video_ext": "none", "vbr": 0, "abr": 160.0, "format": "audio_only - audio only"}, {"format_id": "160p", "format_index": null, "url": "https://video-weaver.mia05.hls.ttvnw.net/v1/playlist/CuEE0EcpfmPL6eEa4pSmiJNJAQ8glhbUV8urSRdrffNHQMmMgaH-UBO1jgepLI8mKKPjKIHHQDd8Axxr84TpEzZ5iUAy4w1bpU1sFxF2fqEKV-Obw-VlV13ZcIT4HI2eJ7-_QlCs1EPNaWuFkWesl1NB7wu1-WvvZRd2IrWtpLC26Pbd7KpdgCUIpSfA5Yk0yOd7oyIw_lJZOwHL3SoJa9Dgl7XXEb1NTUFhibuRGNMPhw9EFjMjidQw8RjHHbfXAHcRZ8L31r-hwhsJbPYONjz0Eyn2Z_t27NcEm2w6AzZNIbEhdlduHFLt5cDkDuRFmcnMWYcEcrQKLsebna2yPAvRsHtEzzk6cw8x_Q0rERR6NLxoWBnFXLkjilW0bvtkZsVF3ODRJCgxKZzy8gl5o-T2EGGHPMVd2UtJp8YfCfvDooaEs13-HKdCtQ3iJmlxa3cV5OF12KBZY7eM8dXi5u27LvIOAZtYLeSW1mpaFGUL02wghcNPbQ5jN5-5son-w9EG0Yd-58RIcIdEZfhd-HffKOVk3qts4irnPWYkk64OYC9BQH-7LZnvkNjI-Ti34_rX-IElQsPQlE6L2hDGLeSUXimtLjV9hNlyK6DZHpF_x2onys36U5mZy_ifkIJIBInKn3ypvRgvMRGoajz5R3y-PkdFq8o1DwLjXjd4mjyQN3hY-dwwN-u3ZtOuTIM2zYsDl-SmZlq4lIOIsO5F8MNO91P9eo1U_C13z6seOZ4NlQu4l_NO1Fa-iSfY3xXHm5prOtKGFC1PZdqW4XDhoiWRvcoE_sC5uxoBqW3x4GZFuN88GgzTN_hmWB6XS0ydJukgASoJdXMtZWFzdC0xMO0H.m3u8", "manifest_url": "https://usher.ttvnw.net/api/channel/hls/ferretsoftware.m3u8?allow_source=true&allow_audio_only=true&allow_spectre=true&p=2619705&platform=web&player=twitchweb&supported_codecs=av1%2Ch265%2Ch264&playlist_include_framerate=true&sig=10345a9a9707dc4cbb2ddd673083727f5968e5af&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22ferretsoftware%22%2C%22channel_id%22%3A884338173%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1715879089%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Atrue%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%2297.100.15.50%22%2C%22version%22%3A2%7D", "tbr": 230.0, "ext": "mp4", "fps": 30.0, "protocol": "m3u8_native", "preference": null, "quality": null, "has_drm": false, "width": 284, "height": 160, "vcodec": "avc1.4D401F", "acodec": "mp4a.40.2", "dynamic_range": "SDR", "resolution": "284x160", "aspect_ratio": 1.77, "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}, "video_ext": "mp4", "audio_ext": "none", "vbr": null, "abr": null, "format": "160p - 284x160"}, {"format_id": "360p", "format_index": null, "url": "https://video-weaver.mia05.hls.ttvnw.net/v1/playlist/CuEE1cjQVxbvAtg0nMqvM42Pk_KkONTt-ZSq-MQaHD3yZh8lcI6bM8tvh9ZjoXts5hxhtxcPGbwKfGpXcV35zf6xOfzVC7eCYyCuAmIZlpZ9nhqvlhVef5jYeHqBowzps5GbUB01CCEpiMMThMkfJjezqAJ2HyEiqLqG0ul-6l3mMourBIY6pDIrYNtJPXgeRZQDnGBnYTQjDOdfmH9v49C5TuZJTKXjfhahtEeI0HvsByvOnKfK5cE7OTXkFru7g2eqY_eXKlZ_4Y_cAGvq8t9RfDfH5gfWXWcRIfBlrMfYOqM81MX98PY0DTeFkRFcklwacySLOszL4x5195D5e1PfMfBKM0agSWoKknsd4SmsCE5nVtukALpq7Gc1iZxB7rMDvwAKOcgGokCSXKH4mX2QdxYAaiBBEkdXtq50vo1LtcEFQXgnhAVmq7eN31TVZtEe3NwRj4-5viXCrh5AU3gCzhvR4X2ix0BnaqcFlXrFl9TREg_k1thurzRBd6p7xgvnZhJk_HIjnY6YhUTYkI8tzVGMHBEx-T1zTL9WaUhKeh9mI0lCSnACklbRu4n8wQgVaKT_ZROBISntJeKFDU-wcGTcxfwYWg-hM0TdUTjI3R2cYSvsqGBGArc_6jJA0PA3aooazRu_c72-_-IPTGCgc1WlXJ8GfwphcF_SKAdEOTbuxgX1GChYsEnE1sPHJtYFFLratSNLmS3J2UA06hZBpSAn-GGC5SS0CU6bMIxtSY12-mnCPitYQghKL_V_6rKyPFGpSjPw5ce77i-AiQsfBoc2LrSYDHki06Wh_-CyqPxpGgyAH1YXVZPOIT5QNm0gASoJdXMtZWFzdC0xMO0H.m3u8", "manifest_url": "https://usher.ttvnw.net/api/channel/hls/ferretsoftware.m3u8?allow_source=true&allow_audio_only=true&allow_spectre=true&p=2619705&platform=web&player=twitchweb&supported_codecs=av1%2Ch265%2Ch264&playlist_include_framerate=true&sig=10345a9a9707dc4cbb2ddd673083727f5968e5af&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22ferretsoftware%22%2C%22channel_id%22%3A884338173%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1715879089%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Atrue%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%2297.100.15.50%22%2C%22version%22%3A2%7D", "tbr": 630.0, "ext": "mp4", "fps": 30.0, "protocol": "m3u8_native", "preference": null, "quality": null, "has_drm": false, "width": 640, "height": 360, "vcodec": "avc1.4D401F", "acodec": "mp4a.40.2", "dynamic_range": "SDR", "resolution": "640x360", "aspect_ratio": 1.78, "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}, "video_ext": "mp4", "audio_ext": "none", "vbr": null, "abr": null, "format": "360p - 640x360"}, {"format_id": "480p", "format_index": null, "url": "https://video-weaver.mia05.hls.ttvnw.net/v1/playlist/CuEEqBPM9FuaktXpYO3AXyeHT3lkt41pV5VHZ1y72lua2ekH9iRDSVvQGpQSwGVcbzfhPVz-oNtHLou7Cr0vvj5ZD_M1P2dqv-PmuObGusk74MxNAMZhfV6AXmoofd89s8OImr95jj6V8fagIXZt0Q0Qcwu4MHXhzwHr-d6clbThBuJk0aTfiupCDQ9rANKH0v1R-AQwChji5rv4j33fPdBdWU5YpUQFpjwuXwfSSxIEJgdfq_X1oZ-WBi3YurrypwLFxcqNnpSOcOeHx_fg-HU0zi1awznzD9TG6yaiCFi4vNYQfmsKpLAGFwQXH-yp_dq5qZn-TxqYK-ZbEm7SkgbSyDGcv1pag0sNSs9N2mdpRysqIsXWh4fDZxIM0j01riFva8scdw7vpa5_yt5dhSi9ckWewdxehNogQAlH2ESB5cay8ZJj6mDSqfpoy-YBXVeDfjuCzuH1dE4TA1af5ZpzYiTndMr-JMw1mxTTMczHMSuWcxLGLWl8W9tWwnJ27-9wtMYfJOORqiUwI7LWs1UCw8pom_4xmliaTSdZT94XitsEHPU2Eb_IcxcZvgzuwk0iCJJWyLHn5BIiYCE7ivS957ZPTEVVRUwKsQ5NYUHdlHOoK7lxGCvyo6Mzj2YSm8igLvk9ribDEnaD_mmjYjT4aFk446ua93jlA20CJ8YLTgS1tlumhZW-_Y9g4Eu4txnBHzodSTAB-z2smBSCZNtdas7Df0EBf7P1tBiOl6L7okm9FIYyuBjdWhNMXDHPe4Mwr59GhFeJOEGS0DuUb8keG2P0icTDtmKdcg4mziGGU1oYGgzifDKSOBeXDD1Zh04gASoJdXMtZWFzdC0xMO0H.m3u8", "manifest_url": "https://usher.ttvnw.net/api/channel/hls/ferretsoftware.m3u8?allow_source=true&allow_audio_only=true&allow_spectre=true&p=2619705&platform=web&player=twitchweb&supported_codecs=av1%2Ch265%2Ch264&playlist_include_framerate=true&sig=10345a9a9707dc4cbb2ddd673083727f5968e5af&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22ferretsoftware%22%2C%22channel_id%22%3A884338173%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1715879089%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Atrue%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%2297.100.15.50%22%2C%22version%22%3A2%7D", "tbr": 1427.999, "ext": "mp4", "fps": 30.0, "protocol": "m3u8_native", "preference": null, "quality": null, "has_drm": false, "width": 852, "height": 480, "vcodec": "avc1.4D401F", "acodec": "mp4a.40.2", "dynamic_range": "SDR", "resolution": "852x480", "aspect_ratio": 1.77, "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}, "video_ext": "mp4", "audio_ext": "none", "vbr": null, "abr": null, "format": "480p - 852x480"}, {"format_id": "720p60", "format_index": null, "url": "https://video-weaver.mia05.hls.ttvnw.net/v1/playlist/CuEEAIP44b6sRoZ9243j6A4wXccrzLuxumU1WxK-YnsnUoZrOLaNSNGAHC5heDgVk2ESnesMn1_ArFFGxTUP-QmVR6Xtj5UfseoVSSZ_-DbM8PYXH8bpr_0LTHP3h8qKhfNQkiwRfF3wbLx9iSpHCCTJbYgF33TrHSTixnEerobv-FEduu7NiqLe8rWoVJHlx97JqSn-4H5CspEw8ItFKfrM31AgJGMEKWffREBY0UFXe9pixiIKYjuMBjrQl-UQYz6Wv3Mnv4L2HMAKoY0hV4EP_uVtqxtdxckJTs_YkPZIEeHGh84joCzI6sFxp_8hadwTMeVfpi4o3841W7yyMzXVM-EftXfLQCqv9PpRrjgp-HRB7xTMqnWsNj2aULEDuKjyqoFRCSdw0VyHoU_IRkcbuJw3s7yRpodDdRljBxqk4awGmkb74Nzgmwci04lzfp9QtTMhpdVvxmbNly9jixCioauLNGEp2lxMG6CNhQzkdS5lT0bgQuM0Z7DlX_le8PHYXJe26aIOrHuFwWFaMME8j9gtBqyvHz3nTy9M8m0K-3ecsteLUUsCbzACTs7ePLUi7p7RZc8zx7wCuGoE3ZyE-Bsfxl-aTZEnnUPedeIV-E5oNVAZ5ujZSgwYzIeswGMubvPXtyEctxFt1AEkAlHFjVQxxEfpdR3vi4RLKkrCSZu71c4MBSOBleEYQQAm7XKl0xoJ2Re7KN7wmu4dzVrZmOvLvmPlVyeza6Ky6Fs2jwVVsil-vSVD06QCNFBkaQCjt4WftjAlDgYu7wjmvA2Gk23S9wbhN1goyVPJPJ7R3Yc4GgxoTrEfDXGpeQhSUr0gASoJdXMtZWFzdC0xMO0H.m3u8", "manifest_url": "https://usher.ttvnw.net/api/channel/hls/ferretsoftware.m3u8?allow_source=true&allow_audio_only=true&allow_spectre=true&p=2619705&platform=web&player=twitchweb&supported_codecs=av1%2Ch265%2Ch264&playlist_include_framerate=true&sig=10345a9a9707dc4cbb2ddd673083727f5968e5af&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22ferretsoftware%22%2C%22channel_id%22%3A884338173%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1715879089%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Atrue%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%2297.100.15.50%22%2C%22version%22%3A2%7D", "tbr": 3422.999, "ext": "mp4", "fps": 60.0, "protocol": "m3u8_native", "preference": null, "quality": null, "has_drm": false, "width": 1280, "height": 720, "vcodec": "avc1.4D401F", "acodec": "mp4a.40.2", "dynamic_range": "SDR", "resolution": "1280x720", "aspect_ratio": 1.78, "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}, "video_ext": "mp4", "audio_ext": "none", "vbr": null, "abr": null, "format": "720p60 - 1280x720"}, {"format_id": "1080p60__source_", "format_index": null, "url": "https://video-weaver.mia05.hls.ttvnw.net/v1/playlist/CuMEfaSWXzph2ZK1pPalelgc_OUzUy9Ld1B_noV0aHI0ctjh_aTLGn9DVSwlruKwi4MxP-9mRdWZpjPzlE451nBkWTsbLkUgz24gt0RoKob2CPatQzIEkzqON7SW18G2BEbUxHPl683jaUSTun1iVDDxjmLE6jhdctqid3Vt-nnYyshMoDU6EOVDGkGZBN2aC7bhjM7-xEsAlu0eue76o_Ll3DZmfxNQLLQ2mgBVf6-bryBxyNKL_PVsImgc361PutZEYTpSsI6Ea1yyYt0iTKtPpzsmLzWkFeMgXsaXqkupwUol8uVJwSdWW10yiHt0DWyo1tlTnOwKhI2NQZWejT5BK4Dc8lsPqdLO-tAl3X_FHomudqKQ_WvhyjoJLGuCSUxv6vFnIbHau-ztgH4Ux0GCwSeWnjRyfKQmAwZsNwAbUdHFI4VJr13rGIaNUshbWT9NaheF49wp7pcQ1G99aLk_x6e0T-dSO6eiFtjIOQNeb9j8wmbIPyBTJxjFUbffP5ycimWk6ovWCEQv0VoczpZeXdseSblneucHmZDk-Dw3iXKBG0mZ1owQ1osiMt9P1Rr-I3pNa5JDsweOKA4zJF7U4kpNMVqQ2MWvt030r2Cu0-tNjUSl_A-Ex6SmwotrEP11jg1uvFlABsHqFbp8EWh44ZgnHagKEEo00NGEoP8a2_bPlMazi81RK3wFEikWj7nAe1NbF1zroZYuAqaTQKOC4dcN_V5d_7rJOjGyw811DNHSSNMa6Sv3z0laupMBle6dnVJI6BFRnPDTLPYofxIYVvtGNd46KrgkHqlAazo8of-YsrUaDMJC94xAUz6NDh3b4iABKgl1cy1lYXN0LTEw7Qc.m3u8", "manifest_url": "https://usher.ttvnw.net/api/channel/hls/ferretsoftware.m3u8?allow_source=true&allow_audio_only=true&allow_spectre=true&p=2619705&platform=web&player=twitchweb&supported_codecs=av1%2Ch265%2Ch264&playlist_include_framerate=true&sig=10345a9a9707dc4cbb2ddd673083727f5968e5af&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22ferretsoftware%22%2C%22channel_id%22%3A884338173%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1715879089%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Atrue%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%2297.100.15.50%22%2C%22version%22%3A2%7D", "tbr": 6891.443, "ext": "mp4", "fps": 60.0, "protocol": "m3u8_native", "preference": null, "quality": null, "has_drm": false, "width": 1920, "height": 1080, "vcodec": "avc1.64002A", "acodec": "mp4a.40.2", "dynamic_range": "SDR", "resolution": "1920x1080", "aspect_ratio": 1.78, "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}, "video_ext": "mp4", "audio_ext": "none", "vbr": null, "abr": null, "format": "1080p60__source_ - 1920x1080"}], "is_live": true, "webpage_url": "https://www.twitch.tv/ferretsoftware", "original_url": "https://www.twitch.tv/ferretsoftware", "webpage_url_basename": "ferretsoftware", "webpage_url_domain": "twitch.tv", "extractor": "twitch:stream", "extractor_key": "TwitchStream", "playlist": null, "playlist_index": null, "thumbnail": "https://static-cdn.jtvnw.net/previews-ttv/live_user_ferretsoftware-0x0.jpg", "fulltitle": "FerretSoftware (live)", "upload_date": "20240514", "release_year": null, "live_status": "is_live", "was_live": false, "requested_subtitles": null, "_has_drm": null, "epoch": 1715877887, "format_id": "1080p60__source_", "format_index": null, "url": "https://video-weaver.mia05.hls.ttvnw.net/v1/playlist/CuMEfaSWXzph2ZK1pPalelgc_OUzUy9Ld1B_noV0aHI0ctjh_aTLGn9DVSwlruKwi4MxP-9mRdWZpjPzlE451nBkWTsbLkUgz24gt0RoKob2CPatQzIEkzqON7SW18G2BEbUxHPl683jaUSTun1iVDDxjmLE6jhdctqid3Vt-nnYyshMoDU6EOVDGkGZBN2aC7bhjM7-xEsAlu0eue76o_Ll3DZmfxNQLLQ2mgBVf6-bryBxyNKL_PVsImgc361PutZEYTpSsI6Ea1yyYt0iTKtPpzsmLzWkFeMgXsaXqkupwUol8uVJwSdWW10yiHt0DWyo1tlTnOwKhI2NQZWejT5BK4Dc8lsPqdLO-tAl3X_FHomudqKQ_WvhyjoJLGuCSUxv6vFnIbHau-ztgH4Ux0GCwSeWnjRyfKQmAwZsNwAbUdHFI4VJr13rGIaNUshbWT9NaheF49wp7pcQ1G99aLk_x6e0T-dSO6eiFtjIOQNeb9j8wmbIPyBTJxjFUbffP5ycimWk6ovWCEQv0VoczpZeXdseSblneucHmZDk-Dw3iXKBG0mZ1owQ1osiMt9P1Rr-I3pNa5JDsweOKA4zJF7U4kpNMVqQ2MWvt030r2Cu0-tNjUSl_A-Ex6SmwotrEP11jg1uvFlABsHqFbp8EWh44ZgnHagKEEo00NGEoP8a2_bPlMazi81RK3wFEikWj7nAe1NbF1zroZYuAqaTQKOC4dcN_V5d_7rJOjGyw811DNHSSNMa6Sv3z0laupMBle6dnVJI6BFRnPDTLPYofxIYVvtGNd46KrgkHqlAazo8of-YsrUaDMJC94xAUz6NDh3b4iABKgl1cy1lYXN0LTEw7Qc.m3u8", "manifest_url": "https://usher.ttvnw.net/api/channel/hls/ferretsoftware.m3u8?allow_source=true&allow_audio_only=true&allow_spectre=true&p=2619705&platform=web&player=twitchweb&supported_codecs=av1%2Ch265%2Ch264&playlist_include_framerate=true&sig=10345a9a9707dc4cbb2ddd673083727f5968e5af&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22ferretsoftware%22%2C%22channel_id%22%3A884338173%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1715879089%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Atrue%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%2297.100.15.50%22%2C%22version%22%3A2%7D", "tbr": 6891.443, "ext": "mp4", "fps": 60.0, "protocol": "m3u8_native", "preference": null, "quality": null, "has_drm": false, "width": 1920, "height": 1080, "vcodec": "avc1.64002A", "acodec": "mp4a.40.2", "dynamic_range": "SDR", "resolution": "1920x1080", "aspect_ratio": 1.78, "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}, "video_ext": "mp4", "audio_ext": "none", "vbr": null, "abr": null, "format": "1080p60__source_ - 1920x1080", "_filename": "FerretSoftware (live) 2024-05-16 16_44 [51091397101].mp4", "filename": "FerretSoftware (live) 2024-05-16 16_44 [51091397101].mp4", "_type": "video", "_version": {"version": "2024.04.09", "current_git_head": null, "release_git_head": "ff07792676f404ffff6ee61b5638c9dc1a33a37a", "repository": "yt-dlp/yt-dlp"}}

However, when a live stream is offline, yt-dlp doesn't produce any json output:

[debug] Command-line config: ['-vU', '--no-config', '--ignore-no-formats-error', '--dump-json', 'https://www.twitch.tv/vinesauce']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win32_dir)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[twitch:stream] Extracting URL: https://www.twitch.tv/vinesauce
[twitch:stream] vinesauce: Downloading stream GraphQL
ERROR: [twitch:stream] vinesauce: The channel is not currently live
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\twitch.py", line 1033, in _real_extract

It correctly deducts that the channel is offline, but doesn't produce json saying that. I expect it to output at least: { "live_status": "is_upcoming", "is_live": false } or { "live_status": "not_live", "is_live": false }, whichever is more appropriate here (perhaps with some other details, like the channel id, etc.).

@bashonly
Copy link
Member

bashonly commented May 16, 2024

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 id and live_status) to extract. If there is no specific upcoming livestream, the extractor has no information to work with and it raises an error (UserNotLive). It would be incorrect for yt-dlp to return infojson with 'live_status': 'is_upcoming', because that is not actually known. yt-dlp core code just handles the URL as such so that --wait-for-video has an effect.

@WillFa
Copy link

WillFa commented May 17, 2024

add --ignore-no-formats-error to your command

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.

@nurupo
Copy link
Author

nurupo commented May 17, 2024

If there is no specific upcoming livestream, the extractor has no information to work with and it raises an error (UserNotLive)

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.

It would be incorrect for yt-dlp to return infojson with 'live_status': 'is_upcoming', because that is not actually known.

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.

@pukkandan
Copy link
Member

I wish I could receive these errors, e.g. UserNotLive, in a machine-readable format like json.

#1659

@pukkandan
Copy link
Member

add --ignore-no-formats-error to your command

Could this be noted in the wiki/docs on the homepage for this option?

From docs

--ignore-no-formats-error       Ignore "No video formats" error. Useful for
                                extracting metadata even if the videos are
                                not actually available for download
                                (experimental)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

4 participants