Repository: yt-dlp/yt-dlp

Issue:
Broken site: radiko.jp: Invalid data found when processing input
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2023.01.06** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

Japan

### Provide a description that is worded well enough to be understood

Downloading the radiko.jp is broken.
Error message: `Invalid data found when processing input`
It's not specific program but any in radiko.jp.

Sample program: https://radiko.jp/#!/ts/IBS/20230125050000 (Available only for one week)

Following is the example of medialist (checked by Chrome developer tools):

```
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:5
#EXT-X-ALLOW-CACHE:NO
#EXT-X-MEDIA-SEQUENCE:4230442
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-START:TIME-OFFSET=0
#EXT-X-PROGRAM-DATE-TIME:2023-01-25T05:00:00.002+09:00
#EXTINF:5.035,
https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/segments/o/B/IBS/20230125/20230125_050000_ycnag.aac
#EXT-X-PROGRAM-DATE-TIME:2023-01-25T05:00:05.037+09:00
#EXTINF:5.035,
https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/segments/o/B/IBS/20230125/20230125_050005_t56hm.aac
#EXT-X-PROGRAM-DATE-TIME:2023-01-25T05:00:10.072+09:00
#EXTINF:5.035,
https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/segments/o/B/IBS/20230125/20230125_050010_l8ufg.aac
```

Each flagment aac is no problem to download and play:

```console
$ yt-dlp -vU https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/segments/o/B/IBS/20230125/20230125_050000_ycnag.aac
[debug] Command-line config: ['-vU', 'https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/segments/o/B/IBS/20230125/20230125_050000_ycnag.aac']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out utf-8, error utf-8, screen utf-8 
[debug] yt-dlp version 2023.01.06 [6becd25] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021) 
[debug] exe versions: ffmpeg 5.1.2-essentials_build-www.gyan.dev (setts), ffprobe 5.1.2-essentials_build-www.gyan.dev 
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4 
[debug] Proxy map: {} 
[debug] Loaded 1760 extractors 
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest 
Latest version: 2023.01.06, Current version: 2023.01.06 
yt-dlp is up to date (2023.01.06) 
[generic] Extracting URL: https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/segments/o/B/IBS/20230125/20230125_050000_ycnag.aac 
[generic] 20230125_050000_ycnag: Downloading webpage 
WARNING: [generic] Falling back on generic information extractor 
WARNING: [generic] URL could be a direct video link, returning it as such. 
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 20230125_050000_ycnag: Downloading 1 format(s): 0
[debug] Invoking http downloader on "https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/segments/o/B/IBS/20230125/20230125_050000_ycnag.aac"
[debug] File locking is not supported. Proceeding without locking 
[download] Destination: 20230125_050000_ycnag [20230125_050000_ycnag].aac 
[download] 100% of   30.53KiB in 00:00:00 at 337.67KiB/s
```


### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
$ yt-dlp -vU 'https://radiko.jp/#!/ts/IBS/20230125050000'
[debug] Command-line config: ['-vU', 'https://radiko.jp/#!/ts/IBS/20230125050000']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out utf-8, error utf-8, screen utf-8 
[debug] yt-dlp version 2023.01.06 [6becd25] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021) 
[debug] exe versions: ffmpeg 5.1.2-essentials_build-www.gyan.dev (setts), ffprobe 5.1.2-essentials_build-www.gyan.dev 
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4 
[debug] Proxy map: {}
[debug] Loaded 1760 extractors 
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest 
Latest version: 2023.01.06, Current version: 2023.01.06 
yt-dlp is up to date (2023.01.06) 
[Radiko] Extracting URL: https://radiko.jp/#!/ts/IBS/20230125050000 
[Radiko] 20230125050000: Downloading radio program for IBS station 
[debug] Loading radiko.auth_data from cache 
[Radiko] 20230125050000: Downloading stream information 
[Radiko] 20230125050000: Downloading m3u8 information from si-c-radiko.smartstream.ne.jp 
[Radiko] 20230125050000: Downloading m3u8 information from si-f-radiko.smartstream.ne.jp 
[Radiko] 20230125050000: Downloading m3u8 information from tf-f-rpaa-radiko.smartstream.ne.jp 
[Radiko] 20230125050000: Downloading m3u8 information from tf-c-rpaa-radiko.smartstream.ne.jp 
[Radiko] 20230125050000: Downloading m3u8 information from rd-wowza-radiko.radiko-cf.com 
[Radiko] 20230125050000: Downloading m3u8 information from rd-wowza-radiko.radiko-cf.com 
[Radiko] 20230125050000: Downloading m3u8 information from radiko.jp 
[Radiko] 20230125050000: Downloading m3u8 information from f-radiko.smartstream.ne.jp 
[Radiko] 20230125050000: Downloading m3u8 information from c-radiko.smartstream.ne.jp 
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id 
[debug] Default format spec: best/bestvideo+bestaudio 
[info] 20230125050000: Downloading 1 format(s): tf-f-rpaa-radiko.smartstream.ne.jp
[debug] Invoking ffmpeg downloader on "https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3B3ssFKL3TRfcEaqBrGEU4&station_id=IBS" 
[download] Destination: テスト音楽 2023-01-26 00_15 [20230125050000].m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 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
" -i "https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3B3ssFKL3TRfcEaqBrGEU4&station_id=IBS" -c copy -f mpegts "file:テスト音楽 2023-01-26 00_15 [20230125050000].m4a.part"
ffmpeg version 5.1.2-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[tcp @ 000002b18eeb1dc0] Starting connection attempt to 203.211.199.163 port 443
[tcp @ 000002b18eeb1dc0] Successfully connected to 203.211.199.163 port 443
[AVIOContext @ 000002b18f294cc0] Statistics: 6 bytes read, 0 seeks
https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3B3ssFKL3TRfcEaqBrGEU4&station_id=IBS: Invalid data found when processing input
 

ERROR: ffmpeg exited with code 1 
  File "yt_dlp\__main__.py", line 17, in <module>
  File "yt_dlp\__init__.py", line 970, in main
  File "yt_dlp\__init__.py", line 960, in _real_main
  File "yt_dlp\YoutubeDL.py", line 3358, in download
  File "yt_dlp\YoutubeDL.py", line 3333, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1491, in extract_info
  File "yt_dlp\YoutubeDL.py", line 1502, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1599, in __extract_info
  File "yt_dlp\YoutubeDL.py", line 1658, in process_ie_result
  File "yt_dlp\YoutubeDL.py", line 2772, in process_video_result
  File "yt_dlp\YoutubeDL.py", line 3236, in process_info
  File "yt_dlp\YoutubeDL.py", line 2959, in dl
  File "yt_dlp\downloader\common.py", line 444, in download
  File "yt_dlp\downloader\external.py", line 76, in real_download
  File "yt_dlp\YoutubeDL.py", line 1012, in report_error
  File "yt_dlp\YoutubeDL.py", line 941, in trouble
```



Discussion:
cc @Lesmiscore 
I've got the same issue on pure ffmpeg since Jan 23.
Could you please test with some more older ffmpeg, say 4.2.1? I'm now busy <sup>despite what I did yesterday</sup> so I can't take a look into it
@Lesmiscore I tested by using this Docker image:
[jrottenberg/ffmpeg - Docker Image | Docker Hub](https://hub.docker.com/r/jrottenberg/ffmpeg)

Unfortunately, 4.2.1 was not available, for now, I tested with 4.2.3 and 4.1.10 instead.
Both of them failed with same error.

<details>
  <summary>4.2.3</summary>
  
```console
# yt-dlp --ffmpeg-location=/usr/local/bin/ffmpeg -vU 'https://radiko.jp/#!/ts/IBS/20230125050000'
[debug] Command-line config: ['--ffmpeg-location=/usr/local/bin/ffmpeg', '-vU', 'https://radiko.jp/#!/ts/IBS/20230125050000']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [6becd25] (pip)
[debug] Python 3.10.9 (CPython x86_64 64bit) - Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.27 (OpenSSL 1.1.1  11 Sep 2018, glibc 2.27)
[debug] exe versions: ffmpeg 4.2.3, ffprobe 4.2.3
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1760 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.01.06, Current version: 2023.01.06
yt-dlp is up to date (2023.01.06)
[Radiko] Extracting URL: https://radiko.jp/#!/ts/IBS/20230125050000
[Radiko] 20230125050000: Downloading radio program for IBS station
[debug] Loading radiko.auth_data from cache
[Radiko] 20230125050000: Downloading stream information
[Radiko] 20230125050000: Downloading m3u8 information from si-c-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from si-f-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from tf-f-rpaa-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from tf-c-rpaa-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from rd-wowza-radiko.radiko-cf.com
[Radiko] 20230125050000: Downloading m3u8 information from rd-wowza-radiko.radiko-cf.com
[Radiko] 20230125050000: Downloading m3u8 information from radiko.jp
[Radiko] 20230125050000: Downloading m3u8 information from f-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from c-radiko.smartstream.ne.jp
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: best/bestvideo+bestaudio
[info] 20230125050000: Downloading 1 format(s): tf-f-rpaa-radiko.smartstream.ne.jp
[debug] Invoking ffmpeg downloader on "https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3mybeEcD3SvskSqLCq64jL&station_id=IBS"
[download] Destination: テスト音楽 2023-01-26 15_53 [20230125050000].m4a
[debug] ffmpeg command line: /usr/local/bin/ffmpeg -y -loglevel verbose -headers 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 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
' -i 'https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3mybeEcD3SvskSqLCq64jL&station_id=IBS' -c copy -f mpegts 'file:テスト音楽 2023-01-26 15_53 [20230125050000].m4a.part'
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[tcp @ 0x560922509640] Starting connection attempt to 203.211.199.163 port 443
[tcp @ 0x560922509640] Successfully connected to 203.211.199.163 port 443
[AVIOContext @ 0x560922525b00] Statistics: 6 bytes read, 0 seeks
https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3mybeEcD3SvskSqLCq64jL&station_id=IBS: Invalid data found when processing input


ERROR: ffmpeg exited with code 1
  File "/usr/local/bin/yt-dlp", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/__init__.py", line 970, in main
    _exit(*variadic(_real_main(argv)))
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/__init__.py", line 960, in _real_main
    return ydl.download(all_urls)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3358, in download
    self.__download_wrapper(self.extract_info)(
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3333, in wrapper
    res = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1491, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1502, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1599, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1658, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 2772, in process_video_result
    self.process_info(new_info)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3236, in process_info
    success, real_download = self.dl(temp_filename, info_dict)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 2959, in dl
    return fd.download(name, new_info, subtitle)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/downloader/common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/downloader/external.py", line 76, in real_download
    self.report_error('%s exited with code %d' % (
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1012, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 941, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())
```

</details>

<details>
  <summary>4.1.10</summary>
  
```console
# yt-dlp --ffmpeg-location=/usr/local/bin/ffmpeg -vU 'https://radiko.jp/#!/ts/IBS/20230125050000'
[debug] Command-line config: ['--ffmpeg-location=/usr/local/bin/ffmpeg', '-vU', 'https://radiko.jp/#!/ts/IBS/20230125050000']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [6becd25] (pip)
[debug] Python 3.10.9 (CPython x86_64 64bit) - Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 (OpenSSL 1.1.1f  31 Mar 2020, glibc 2.31)
[debug] exe versions: ffmpeg 4.1.10, ffprobe 4.1.10
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2019.11.28, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1760 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.01.06, Current version: 2023.01.06
yt-dlp is up to date (2023.01.06)
[Radiko] Extracting URL: https://radiko.jp/#!/ts/IBS/20230125050000
[Radiko] 20230125050000: Downloading radio program for IBS station
[Radiko] Downloading authentication page
[Radiko] Downloading player js code
[Radiko] Authenticating
[debug] Saving radiko.auth_data to cache
[Radiko] 20230125050000: Downloading stream information
[Radiko] 20230125050000: Downloading m3u8 information from si-c-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from si-f-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from tf-f-rpaa-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from tf-c-rpaa-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from rd-wowza-radiko.radiko-cf.com
[Radiko] 20230125050000: Downloading m3u8 information from rd-wowza-radiko.radiko-cf.com
[Radiko] 20230125050000: Downloading m3u8 information from radiko.jp
[Radiko] 20230125050000: Downloading m3u8 information from f-radiko.smartstream.ne.jp
[Radiko] 20230125050000: Downloading m3u8 information from c-radiko.smartstream.ne.jp
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: best/bestvideo+bestaudio
[info] 20230125050000: Downloading 1 format(s): tf-f-rpaa-radiko.smartstream.ne.jp
[debug] Invoking ffmpeg downloader on "https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3ev7FbTtfUXBNnReRKhgz8&station_id=IBS"
[download] Destination: テスト音楽 2023-01-26 15_59 [20230125050000].m4a
[debug] ffmpeg command line: /usr/local/bin/ffmpeg -y -loglevel verbose -headers 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.18 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
' -i 'https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3ev7FbTtfUXBNnReRKhgz8&station_id=IBS' -c copy -f mpegts 'file:テスト音楽 2023-01-26 15_59 [20230125050000].m4a.part'
ffmpeg version 4.1.10 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-avresample --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libfdk_aac --enable-libfreetype --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libsrt --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-libzmq --enable-nonfree --enable-openssl --enable-postproc --enable-shared --enable-small --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --extra-libs=-lpthread --prefix=/opt/ffmpeg
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[tcp @ 0x55fc22f4c880] Starting connection attempt to 203.211.199.163 port 443
[tcp @ 0x55fc22f4c880] Successfully connected to 203.211.199.163 port 443
[AVIOContext @ 0x55fc22f62400] Statistics: 6 bytes read, 0 seeks
https://tf-f-rpaa-radiko.smartstream.ne.jp/tf/medialist?session=1.3ev7FbTtfUXBNnReRKhgz8&station_id=IBS: Invalid data found when processing input


ERROR: ffmpeg exited with code 1
  File "/usr/local/bin/yt-dlp", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/__init__.py", line 970, in main
    _exit(*variadic(_real_main(argv)))
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/__init__.py", line 960, in _real_main
    return ydl.download(all_urls)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3358, in download
    self.__download_wrapper(self.extract_info)(
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3333, in wrapper
    res = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1491, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1502, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1599, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1658, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 2772, in process_video_result
    self.process_info(new_info)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3236, in process_info
    success, real_download = self.dl(temp_filename, info_dict)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 2959, in dl
    return fd.download(name, new_info, subtitle)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/downloader/common.py", line 444, in download
    ret = self.real_download(filename, info_dict)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/downloader/external.py", line 76, in real_download
    self.report_error('%s exited with code %d' % (
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1012, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 941, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())```

</details>
Thanks, that's enough. I'll take a look soon
I investigated a bit more, and it looks like segment playlists expire too fast before yt-dlp calls ffmpeg
This looks to be hard to fix...

Resolving patch:
diff --git a/yt_dlp/extractor/radiko.py b/yt_dlp/extractor/radiko.py
--- a/yt_dlp/extractor/radiko.py
+++ b/yt_dlp/extractor/radiko.py
@@ -1,4 +1,5 @@
 import base64
+import random
 import urllib.parse
 
 from .common import InfoExtractor
@@ -13,6 +14,7 @@
 
 
 class RadikoBaseIE(InfoExtractor):
+    _GEO_BYPASS = False
     _FULL_KEY = None
     _HOSTS_FOR_TIME_FREE_FFMPEG_UNSUPPORTED = (
         'https://c-rpaa.smartstream.ne.jp',
@@ -32,7 +34,7 @@ class RadikoBaseIE(InfoExtractor):
         'https://c-radiko.smartstream.ne.jp',
     )
 
-    def _auth_client(self):
+    def _negotiate_token(self):
         _, auth1_handle = self._download_webpage_handle(
             'https://radiko.jp/v2/api/auth1', None, 'Downloading authentication page',
             headers={
@@ -58,10 +60,23 @@ def _auth_client(self):
                 'x-radiko-partialkey': partial_key,
             }).split(',')[0]
 
+        if area_id == 'OUT':
+            self.raise_geo_restricted(countries=['JP'])
+
         auth_data = (auth_token, area_id)
         self.cache.store('radiko', 'auth_data', auth_data)
         return auth_data
 
+    def _auth_client(self):
+        cachedata = self.cache.load('radiko', 'auth_data')
+        if cachedata is not None:
+            response = self._download_webpage(
+                'https://radiko.jp/v2/api/auth_check', None, 'Checking cached token', expected_status=401,
+                headers={'X-Radiko-AuthToken': cachedata[0], 'X-Radiko-AreaId': cachedata[1]})
+            if response == 'OK':
+                return cachedata
+        return self._negotiate_token()
+
     def _extract_full_key(self):
         if self._FULL_KEY:
             return self._FULL_KEY
@@ -75,7 +90,7 @@ def _extract_full_key(self):
 
         if full_key:
             full_key = full_key.encode()
-        else:  # use full key ever known
+        else:  # use only full key ever known
             full_key = b'bcd151073c03b352e1ef2fd66c32209da9ca0afa'
 
         self._FULL_KEY = full_key
@@ -103,24 +118,24 @@ def _extract_formats(self, video_id, station, is_onair, ft, cursor, auth_token,
         m3u8_playlist_data = self._download_xml(
             f'https://radiko.jp/v3/station/stream/pc_html5/{station}.xml', video_id,
             note='Downloading stream information')
-        m3u8_urls = m3u8_playlist_data.findall('.//url')
 
         formats = []
         found = set()
-        for url_tag in m3u8_urls:
-            pcu = url_tag.find('playlist_create_url').text
-            url_attrib = url_tag.attrib
+
+        timefree_int = 0 if is_onair else 1
+
+        for element in m3u8_playlist_data.findall(f'.//url[@timefree="{timefree_int}"]/playlist_create_url'):
+            pcu = element.text
+            if pcu in found:
+                continue
+            found.add(pcu)
             playlist_url = update_url_query(pcu, {
                 'station_id': station,
                 **query,
                 'l': '15',
-                'lsid': '88ecea37e968c1f17d5413312d9f8003',
+                'lsid': ''.join(random.choices('0123456789abcdef', k=32)),
                 'type': 'b',
             })
-            if playlist_url in found:
-                continue
-            else:
-                found.add(playlist_url)
 
             time_to_skip = None if is_onair else cursor - ft
 
@@ -138,7 +153,7 @@ def _extract_formats(self, video_id, station, is_onair, ft, cursor, auth_token,
                         not is_onair and pcu.startswith(self._HOSTS_FOR_TIME_FREE_FFMPEG_UNSUPPORTED)):
                     sf['preference'] = -100
                     sf['format_note'] = 'not preferred'
-                if not is_onair and url_attrib['timefree'] == '1' and time_to_skip:
+                if not is_onair and timefree_int == 1 and time_to_skip:
                     sf['downloader_options'] = {'ffmpeg_args': ['-ss', time_to_skip]}
             formats.extend(subformats)
 
@@ -166,21 +181,7 @@ def _real_extract(self, url):
         vid_int = unified_timestamp(video_id, False)
         prog, station_program, ft, radio_begin, radio_end = self._find_program(video_id, station, vid_int)
 
-        auth_cache = self.cache.load('radiko', 'auth_data')
-        for attempt in range(2):
-            auth_token, area_id = (not attempt and auth_cache) or self._auth_client()
-            formats = self._extract_formats(
-                video_id=video_id, station=station, is_onair=False,
-                ft=ft, cursor=vid_int, auth_token=auth_token, area_id=area_id,
-                query={
-                    'start_at': radio_begin,
-                    'ft': radio_begin,
-                    'end_at': radio_end,
-                    'to': radio_end,
-                    'seek': video_id,
-                })
-            if formats:
-                break
+        auth_token, area_id = self._auth_client()
 
         return {
             'id': video_id,
@@ -189,8 +190,18 @@ def _real_extract(self, url):
             'uploader': try_call(lambda: station_program.find('.//name').text),
             'uploader_id': station,
             'timestamp': vid_int,
-            'formats': formats,
             'is_live': True,
+            'formats': self._extract_formats(
+                video_id=video_id, station=station, is_onair=False,
+                ft=ft, cursor=vid_int, auth_token=auth_token, area_id=area_id,
+                query={
+                    'start_at': radio_begin,
+                    'ft': radio_begin,
+                    'end_at': radio_end,
+                    'to': radio_end,
+                    'seek': video_id
+                }
+            ),
         }
 
 


Test patch: