diff options
author | garret1317 <garret@airmail.cc> | 2025-08-26 00:37:05 +0100 |
---|---|---|
committer | garret1317 <garret@airmail.cc> | 2025-08-26 00:45:53 +0100 |
commit | 221cefe4810e0bcd5c6faf199ae2589f62edbb77 (patch) | |
tree | 2f42f14bac44708f4a94884df3f40e3d7b9bfcb0 | |
parent | eb16055bdec43684c7322795ee6f4bddc9ffc2c4 (diff) | |
download | yt-dlp-rajiko-221cefe4810e0bcd5c6faf199ae2589f62edbb77.tar.gz yt-dlp-rajiko-221cefe4810e0bcd5c6faf199ae2589f62edbb77.tar.bz2 yt-dlp-rajiko-221cefe4810e0bcd5c6faf199ae2589f62edbb77.zip |
Set ffmpeg args to not send Range header
github issue #29
-rw-r--r-- | yt_dlp_plugins/extractor/radiko.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index 9601c32..fb705dd 100644 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -317,7 +317,7 @@ class _RadikoBaseIE(InfoExtractor): self, playlist_url, start_at, end_at, domain, auth_headers ) - formats.append({ + m3u8_formats = [{ "format_id": join_nonempty(domain, "chunked"), "hls_media_playlist_data": chunks_playlist, "preference": preference, @@ -327,13 +327,20 @@ class _RadikoBaseIE(InfoExtractor): # fallback to live for ffmpeg etc "url": playlist_url, "http_headers": auth_headers, - }) + }] else: - formats += self._extract_m3u8_formats( + m3u8_formats = self._extract_m3u8_formats( playlist_url, station, m3u8_id=domain, fatal=False, headers=auth_headers, live=delivered_live, preference=preference, entry_protocol=entry_protocol, note=f"Downloading m3u8 information from {domain}") + + for f in m3u8_formats: + # ffmpeg sends a Range header which some streams reject. here we disable that (and also some icecast header as well) + f['downloader_options'] = {'ffmpeg_args': ['-seekable', '0', '-http_seekable', '0', '-icy', '0']} + f['format_note'] = ", ".join(format_note) + formats.append(f) + return formats |