Repository: yt-dlp
Issue: [Hotstar] HTTP Error 403 when downloading with ffmpeg
Labels: account-needed,geo-blocked,site-bug,can-share-account

### 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 that yt-dlp is broken on a **supported** site
- [X] I've verified that I'm running yt-dlp version **2023.07.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 [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)
- [X] 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

India

### Provide a description that is worded well enough to be understood

The following download of video has been carried out using the following versions:
- `nightly@2023.08.30.234958`
- `nightly@2023.09.15.171906 `
- `stable@2023.07.06`

If the action is carried out without `'--downloader "m3u8:ffmpeg"` or `--downloader "m3u8:native"`, then the video downloads successfully but with filename not matching the given template as stated in the debug log. Instead it saves the file as `SNA ENA - NA - NA.mp4`, which means that `ffmpeg` is failing to map the coprresponding metadata in this case/scenario.

### 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
[debug] Command-line config: ['-v', '-f', '847-0+ba', '-P', 'D:\\Entertainment - TV Shows\\NEXT', '-o', 'S%(season_number)s E%(episode_number)s - %(upload_date>%#d %B %Y)s - %(episode)s.%(ext)s', '--parse-metadata', 'description:(?s)(?P<meta_comment>.+)', '--parse-metadata', 'episode:(?s)(?P<meta_title>.+)', '--cookies-from-browser', 'chrome', 'https://www.hotstar.com/in/shows/yeh-hai-chahatein/1260015192/kaashvi-condemns-arjun/1000285285']
[debug] User config "C:\Users\SWMOHAN\yt-dlp.conf": ['--config-location', 'C:\\Users\\SWMOHAN\\yt-dlp.conf', '--embed-metadata', '--xattrs', '--netrc', '--merge-output-format', 'mp4', '--progress', '--console-title', '--no-cache-dir', '--no-part', '--continue', '--no-windows-filenames', '--hls-use-mpegts', '--hls-prefer-ffmpeg', '--downloader', 'm3u8:ffmpeg', '--geo-bypass', '--ignore-errors', '--no-warnings', '--ffmpeg-location', 'C:\\Applications\\FFmpeg\\ffmpeg-6.0-full_build-shared\\bin', '--postprocessor-args', 'FFmpeg:-v quiet', '--ignore-no-formats-error', '--compat-options', 'multistreams', '--compat-options', 'no-live-chat', '--compat-options', 'no-youtube-prefer-utc-upload-date', '--allow-dynamic-mpd', '--color', 'always', '--embed-chapters']
Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\SWMOHAN\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\SWMOHAN\AppData\Local\Google\Chrome\User Data\Local State"
Extracted 127 cookies from chrome
[debug] cookie version breakdown: {'v10': 126, 'other': 0, 'unencrypted': 1}
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.09.15.171906 [7b71643cc] (win_exe)
[debug] Compatibility options: multistreams, no-youtube-prefer-utc-upload-date, no-live-chat
[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 6.0-full_build-www.gyan.dev (setts), ffprobe 6.0-full_build-www.gyan.dev, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.1.0, certifi-2023.07.22, mutagen-1.47.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1865 extractors
[hotstar] Extracting URL: https://www.hotstar.com/in/shows/yeh-hai-chahatein/1260015192/kaashvi-condemns-arjun/1000285285
[hotstar] 1000285285: Downloading JSON metadata
[hotstar] 1000285285: Downloading webpage
[hotstar] 1000285285: Downloading JSON metadata
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading m3u8 information
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: Downloading MPD manifest
[hotstar] 1000285285: 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] Searching for '(?s)(?P<meta_comment>.+)' in '%(description)s'
[MetadataParser] Parsed meta_comment from '%(description)s': 'Kaashvi gets furious at Arjun for buying a company to protect her from false accusations. Meanwhile, Dadima plans to celebrate Janmashtami with a special plan.'
[debug] Searching for '(?s)(?P<meta_title>.+)' in '%(episode)s'
[MetadataParser] Parsed meta_title from '%(episode)s': 'Kaashvi Condemns Arjun'
[info] 1000285285: Downloading 1 format(s): 847-0+audio_mp4a_65-Unknown-1
[debug] Invoking ffmpeg downloader on "https://hses6.hotstar.com/videos/plus/yhchsp/1116_30cbf11dff/1260015192/1000285285/v3/1694455338414/651e1040045f6dee8363ad81f53de239/video_fhd_h265_sdr_1694459648649/hvc1/6/index.m3u8", "https://hses6.hotstar.com/videos/plus/yhchsp/1116_30cbf11dff/1260015192/1000285285/v3/1694455338414/651e1040045f6dee8363ad81f53de239/audio_aac_1694455338414/und/mp4a/2/index.m3u8"
[download] Destination: D:\Entertainment - TV Shows\NEXT\S3 E267 - 12 September 2023 - Kaashvi Condemns Arjun.mp4
[debug] ffmpeg command line: "C:\Applications\FFmpeg\ffmpeg-6.0-full_build-shared\bin\ffmpeg" -y -loglevel verbose -cookies "AKA_A2=A; path=/; domain=.hotstar.com;
_ga=GA1.1.1561195568.1694871159; path=/; domain=.hotstar.com;
_ga_2PV8LWETCX=GS1.1.1694874302.2.1.1694874690.60.0.0; path=/; domain=.hotstar.com;
_ga_EPJ8DYH89Z=GS1.1.1694874302.2.1.1694874690.60.0.0; path=/; domain=.hotstar.com;
_ga_QV5FD29XJC=GS1.1.1694874302.2.1.1694874690.60.0.0; path=/; domain=.hotstar.com;
_gcl_au=1.1.1800932622.1694871159; path=/; domain=.hotstar.com;
ajs_anonymous_id=%22aa5cbc3e-2603-42b8-bb9f-e0d2121cf17d%22; path=/; domain=.hotstar.com;
ajs_group_id=null; path=/; domain=.hotstar.com;
ajs_user_id=null; path=/; domain=.hotstar.com;
hdntl=exp=1694963998~acl=%2f*~data=ip%3dmAwRZsEI0hbLeMBvs2qPFHX5yXJeL3oO4qcBAFqeIsI2GoqXNDXJniw-userid%3d0sMS2dkSGZ6KmTGNK0g3HSSpo7qYZ0bkuNeU6BvqhRv6-did%3dBaGwfEZBOtVphoBT7EfrRVIEGmFSgdlNfLy6RpxYRoaL-cc%3din-~hmac=251d89cb60d12cb01f616ee495fa943a667d5398a896117dee583e8c714b335d; path=/; domain=.hses6.hotstar.com;
" -headers "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 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
Referer: https://www.hotstar.com/in
" -i "https://hses6.hotstar.com/videos/plus/yhchsp/1116_30cbf11dff/1260015192/1000285285/v3/1694455338414/651e1040045f6dee8363ad81f53de239/video_fhd_h265_sdr_1694459648649/hvc1/6/index.m3u8" -cookies "AKA_A2=A; path=/; domain=.hotstar.com;
_ga=GA1.1.1561195568.1694871159; path=/; domain=.hotstar.com;
_ga_2PV8LWETCX=GS1.1.1694874302.2.1.1694874690.60.0.0; path=/; domain=.hotstar.com;
_ga_EPJ8DYH89Z=GS1.1.1694874302.2.1.1694874690.60.0.0; path=/; domain=.hotstar.com;
_ga_QV5FD29XJC=GS1.1.1694874302.2.1.1694874690.60.0.0; path=/; domain=.hotstar.com;
_gcl_au=1.1.1800932622.1694871159; path=/; domain=.hotstar.com;
ajs_anonymous_id=%22aa5cbc3e-2603-42b8-bb9f-e0d2121cf17d%22; path=/; domain=.hotstar.com;
ajs_group_id=null; path=/; domain=.hotstar.com;
ajs_user_id=null; path=/; domain=.hotstar.com;
hdntl=exp=1694963998~acl=%2f*~data=ip%3dmAwRZsEI0hbLeMBvs2qPFHX5yXJeL3oO4qcBAFqeIsI2GoqXNDXJniw-userid%3d0sMS2dkSGZ6KmTGNK0g3HSSpo7qYZ0bkuNeU6BvqhRv6-did%3dBaGwfEZBOtVphoBT7EfrRVIEGmFSgdlNfLy6RpxYRoaL-cc%3din-~hmac=251d89cb60d12cb01f616ee495fa943a667d5398a896117dee583e8c714b335d; path=/; domain=.hses6.hotstar.com;
" -headers "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 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
Referer: https://www.hotstar.com/in
" -i "https://hses6.hotstar.com/videos/plus/yhchsp/1116_30cbf11dff/1260015192/1000285285/v3/1694455338414/651e1040045f6dee8363ad81f53de239/audio_aac_1694455338414/und/mp4a/2/index.m3u8" -c copy -map "0:0" -map "1:0" -f mp4 "file:D:\Entertainment - TV Shows\NEXT\S3 E267 - 12 September 2023 - Kaashvi Condemns Arjun.mp4"
ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-shared --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
[tcp @ 000002769791e400] Starting connection attempt to 2405:200:1606:1731::312c:b0ee port 443
[tcp @ 000002769791e400] Successfully connected to 2405:200:1606:1731::312c:b0ee port 443
[https @ 000002769791dc40] HTTP error 403 Forbidden
https://hses6.hotstar.com/videos/plus/yhchsp/1116_30cbf11dff/1260015192/1000285285/v3/1694455338414/651e1040045f6dee8363ad81f53de239/video_fhd_h265_sdr_1694459648649/hvc1/6/index.m3u8: Server returned 403 Forbidden (access denied)


ERROR: ffmpeg exited with code 1
  File "yt_dlp\__main__.py", line 17, in <module>
  File "yt_dlp\__init__.py", line 1008, in main
  File "yt_dlp\__init__.py", line 998, in _real_main
  File "yt_dlp\YoutubeDL.py", line 3518, in download
  File "yt_dlp\YoutubeDL.py", line 3493, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1564, in extract_info
  File "yt_dlp\YoutubeDL.py", line 1575, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1731, in __extract_info
  File "yt_dlp\YoutubeDL.py", line 1790, in process_ie_result
  File "yt_dlp\YoutubeDL.py", line 2929, in process_video_result
  File "yt_dlp\YoutubeDL.py", line 3342, in process_info
  File "yt_dlp\YoutubeDL.py", line 3116, in dl
  File "yt_dlp\downloader\common.py", line 455, in download
  File "yt_dlp\downloader\external.py", line 80, in real_download
  File "yt_dlp\YoutubeDL.py", line 1053, in report_error
  File "yt_dlp\YoutubeDL.py", line 981, in trouble
```