Repository: yt-dlp
Issue: Using --load-info-json downloads the same download sections from the previous download
Labels: external issue

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [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 [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and 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)

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

Hello. Im Denis, developer of YTDLnis. I have recently implemented the feature to use write info json to prevent extra calls to servers when retrying a download but there are huge issues.
Example workflow:
- First download, no info json, writes info json and downloads a certain section of the video, its ok
- Second download, loads info json, configures to download another section of the video, it downloads the first configured section

In cases if the first download had no cuts configured, then the 2nd download that loads the info json that has cuts wont cut anything and instead generate a 1KB file that is unplayable.

Running sample command in pc:
one from 0:00-0:20
one from 1:00-1:50

In this example, the 2nd file didnt even download the same portion but generated a small unplayable video file.

-a----       29 Dec 2024  09:30 PM         509706 THAT GUY [M0qiZHV4E3U].info.json (1st video)
-a----       29 Dec 2024  09:31 PM       11881699 THAT GUY [M0qiZHV4E3U].webm
-a----       29 Dec 2024  09:35 PM            812 2ndfile.webm (2nd video)

### Provide verbose output that clearly demonstrates the problem

- [X] 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
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
FIRST DOWNLOAD:


[debug] Command-line config: ['-vU', '--write-info-json', '--download-sections', '*0:00-0:20', 'https://www.youtube.com/watch?v=M0qiZHV4E3U']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.12.26.232815 from yt-dlp/yt-dlp-nightly-builds [0b6b7742c] (win_exe)
[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1t  7 Feb 2023)
[debug] exe versions: ffmpeg 7.1-essentials_build-www.gyan.dev (setts), ffprobe 7.1-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.12.14, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.3.0, websockets-14.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.12.26.232815 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.12.26.232815 from yt-dlp/yt-dlp-nightly-builds)
[youtube] Extracting URL: https://www.youtube.com/watch?v=M0qiZHV4E3U
[youtube] M0qiZHV4E3U: Downloading webpage
[youtube] M0qiZHV4E3U: Downloading ios player API JSON
[youtube] M0qiZHV4E3U: Downloading mweb player API JSON
[debug] [youtube] M0qiZHV4E3U: ios client https formats require a PO Token which was not provided. They will be skipped as they may yield HTTP Error 403. You can manually pass a PO Token for this client with --extractor-args "youtube:po_token=ios+XXX". For more information, refer to  https://github.com/yt-dlp/yt-dlp/wiki/Extractors#po-token-guide . To enable these broken formats anyway, pass --extractor-args "youtube:formats=missing_pot"
[debug] Loading youtube-nsig.03dbdfab from cache
[debug] [youtube] Decrypted nsig omqByjRThi5OmaqEa => nWk1ldNNS6vRmQ
[debug] Loading youtube-nsig.03dbdfab from cache
[debug] [youtube] Decrypted nsig TlnwC444M8pfkV6Hh => ELLbtC5BDnaTkQ
[youtube] M0qiZHV4E3U: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] M0qiZHV4E3U: Downloading 1 format(s): 616+251
[info] M0qiZHV4E3U: Downloading 1 time ranges: 0.0-20.0
[info] Writing video metadata as JSON to: THAT GUY [M0qiZHV4E3U].info.json
[debug] Invoking ffmpeg downloader on "https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1735525849/ei/ebFxZ_X0J6_Ni9oPzLz50Aw/ip/37.26.83.206/id/334aa26475781375/itag/616/source/youtube/requiressl/yes/ratebypass/yes/pfa/1/wft/1/sgovp/clen%3D87098372%3Bdur%3D173.874%3Bgir%3Dyes%3Bitag%3D356%3Blmt%3D1735184558385124/rqh/1/hls_chunk_host/rr1---sn-5u05a-up5s.googlevideo.com/xpc/EgVo2aDSNQ%3D%3D/met/1735504249,/mh/VH/mm/31,29/mn/sn-5u05a-up5s,sn-nv47lnsy/ms/au,rdu/mv/m/mvi/1/pl/24/rms/au,au/initcwndbps/1950000/spc/x-caUKyM_fDO4fUBpVaSkmGWQBHgu8CJIaNYOkpGf6tHtLHc6LrFQnE/vprv/1/playlist_type/DVR/dover/13/txp/5532434/mt/1735504146/fvip/5/short_key/1/keepalive/yes/fexp/51326932,51335594,51371294/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,pfa,wft,sgovp,rqh,xpc,spc,vprv,playlist_type/sig/AJfQdSswRgIhAPgq0xd0LnerVZGnPJfBl4jdvxJEFmCNoPA62vhTiVQcAiEApGrj09mnyI1CCilf1y6E9JFAurnJwY7RlpUdTdUjSuQ%3D/lsparams/hls_chunk_host,met,mh,mm,mn,ms,mv,mvi,pl,rms,initcwndbps/lsig/AGluJ3MwRQIhAOMO-j3fPTAm2oze8IwyndQquijtauri1MLlS3Jiu8ocAiBVwWtQpqXNtEMG6cg21AgevGkIITA06H6dmffb4x_Lmg%3D%3D/playlist/index.m3u8", "https://rr1---sn-5u05a-up5s.googlevideo.com/videoplayback?expire=1735525849&ei=ebFxZ6ffL_Ogi9oPyanBsQM&ip=37.26.83.206&id=o-ALYJ3ghB-T5VCCpva8lnT_hlAv_zlpr8wRWnX--EC7oW&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1735504249%2C&mh=VH&mm=31%2C29&mn=sn-5u05a-up5s%2Csn-nv47lnsy&ms=au%2Crdu&mv=m&mvi=1&pl=24&rms=au%2Cau&initcwndbps=1733750&bui=AfMhrI8REYMcwUckbw_vSgejax7Rf3ecdwzo8PHNrXuqDbQ0t6BzyKSJtVmiRJhlr6HbcB0tt0tBKQ-F&vprv=1&svpuc=1&mime=audio%2Fwebm&ns=wDbYki7KcVDVOts3dyS63fgQ&rqh=1&gir=yes&clen=2858164&dur=173.901&lmt=1735180838659763&mt=1735503910&fvip=5&keepalive=yes&fexp=51326932%2C51331020%2C51335594%2C51371294&c=MWEB&sefc=1&txp=5532434&n=ELLbtC5BDnaTkQ&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAMm96XdJ2Ujpp3U4UtnuxdeX8lwEoPJwzA3cWVO8P37CAiBefWqp4pDmJjEN5xSWA0knqggJxeLBPcPtoYk_FpXTBg%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRQIhANYpKsDgQK3rZp0LY-P6HrDzicAIxvgjvF0BA7CnC2hbAiApwHbng6ABn8h1oyhiWG020UWv7I8mbvJa-3beoZblCw%3D%3D"
[download] Destination: THAT GUY [M0qiZHV4E3U].webm
[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/90.0.4430.212 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
" -t 20.0 -i
....

....
....
[in#1/matroska,webm @ 0000020290cefd00]   Input stream #1:0 (audio): 1001 packets read (317734 bytes);
[in#1/matroska,webm @ 0000020290cefd00]   Total: 1001 packets (317734 bytes) demuxed
[AVIOContext @ 0000020290cbbec0] Statistics: 327680 bytes read, 0 seeks
[download] 100% of   11.33MiB in 00:00:12 at 933.53KiB/s


-------------------------------------------------------------
SECOND DOWNLOAD

[debug] Command-line config: ['-vU', '--load-info-json', '.\\THAT GUY [M0qiZHV4E3U].info.json', '--download-sections', '*1:00-1:50', 'https://www.youtube.com/watch?v=M0qiZHV4E3U', '-o', '2ndfile.%(ext)s']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.12.26.232815 from yt-dlp/yt-dlp-nightly-builds [0b6b7742c] (win_exe)
[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1t  7 Feb 2023)
[debug] exe versions: ffmpeg 7.1-essentials_build-www.gyan.dev (setts), ffprobe 7.1-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.12.14, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.3.0, websockets-14.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.12.26.232815 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.12.26.232815 from yt-dlp/yt-dlp-nightly-builds)
WARNING: URLs are ignored due to --load-info-json
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] M0qiZHV4E3U: Downloading 1 format(s): 616+251
[info] M0qiZHV4E3U: Downloading 1 time ranges: 60.0-110.0
[debug] Invoking ffmpeg downloader on "https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1735525849/ei/ebFxZ_X0J6_Ni9oPzLz50Aw/ip/37.26.83.206/id/334aa26475781375/itag/616/source/youtube/requiressl/yes/ratebypass/yes/pfa/1/wft/1/sgovp/clen%3D87098372%3Bdur%3D173.874%3Bgir%3Dyes%3Bitag%3D356%3Blmt%3D1735184558385124/rqh/1/hls_chunk_host/rr1---sn-5u05a-up5s.googlevideo.com/xpc/EgVo2aDSNQ%3D%3D/met/1735504249,/mh/VH/mm/31,29/mn/sn-5u05a-up5s,sn-nv47lnsy/ms/au,rdu/mv/m/mvi/1/pl/24/rms/au,au/initcwndbps/1950000/spc/x-caUKyM_fDO4fUBpVaSkmGWQBHgu8CJIaNYOkpGf6tHtLHc6LrFQnE/vprv/1/playlist_type/DVR/dover/13/txp/5532434/mt/1735504146/fvip/5/short_key/1/keepalive/yes/fexp/51326932,51335594,51371294/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,pfa,wft,sgovp,rqh,xpc,spc,vprv,playlist_type/sig/AJfQdSswRgIhAPgq0xd0LnerVZGnPJfBl4jdvxJEFmCNoPA62vhTiVQcAiEApGrj09mnyI1CCilf1y6E9JFAurnJwY7RlpUdTdUjSuQ%3D/lsparams/hls_chunk_host,met,mh,mm,mn,ms,mv,mvi,pl,rms,initcwndbps/lsig/AGluJ3MwRQIhAOMO-j3fPTAm2oze8IwyndQquijtauri1MLlS3Jiu8ocAiBVwWtQpqXNtEMG6cg21AgevGkIITA06H6dmffb4x_Lmg%3D%3D/playlist/index.m3u8", "https://rr1---sn-5u05a-up5s.googlevideo.com/videoplayback?expire=1735525849&ei=ebFxZ6ffL_Ogi9oPyanBsQM&ip=37.26.83.206&id=o-ALYJ3ghB-T5VCCpva8lnT_hlAv_zlpr8wRWnX--....
...
.....
......
nv47lnsy&ms=au%2Crdu&mv=m&mvi=1&pl=24&rms=au%2Cau&initcwndbps=1733750&bui=AfMhrI8REYMcwUckbw_vSgejax7Rf3ecdwzo8PHNrXuqDbQ0t6BzyKSJtVmiRJhlr6HbcB0tt0tBKQ-F&vprv=1&svpuc=1&mime=audio%2Fwebm&ns=wDbYki7KcVDVOts3dyS63fgQ&rqh=1&gir=yes&clen=2858164&dur=173.901&lmt=1735180838659763&mt=1735503910&fvip=5&keepalive=yes&fexp=51326932%2C51331020%2C51335594%2C51371294&c=MWEB&sefc=1&txp=5532434&n=ELLbtC5BDnaTkQ&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAMm96XdJ2Ujpp3U4UtnuxdeX8lwEoPJwzA3cWVO8P37CAiBefWqp4pDmJjEN5xSWA0knqggJxeLBPcPtoYk_FpXTBg%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRQIhANYpKsDgQK3rZp0LY-P6HrDzicAIxvgjvF0BA7CnC2hbAiApwHbng6ABn8h1oyhiWG020UWv7I8mbvJa-3beoZblCw%3D%3D):
[in#1/matroska,webm @ 00000218582a9d80]   Input stream #1:0 (audio): 1 packets read (239 bytes);
[in#1/matroska,webm @ 00000218582a9d80]   Total: 1 packets (239 bytes) demuxed
[AVIOContext @ 0000021857c88480] Statistics: 32768 bytes read, 1 seeks
[download] 100% of    812.00B in 00:01:02 at 12.92B/s
```