question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

with "-o -" you get a 403 forbidden error

See original GitHub issue

Checklist

Region

France

Example URLs

https://www.france.tv/sport/les-jeux-olympiques/3103093-big-air-f-le-podium-de-tess-ledeux-medaillee-d-argent-a-20-ans.html

Description

With some urls I can’t use the “-o -” option to pipe to ffmpeg.

It starts and then there is this error :

[https @ 0x96f440] HTTP error 403 Forbidden
https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzQyNzN+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NTlkY2EzMDBjMTQ2ZDZhZDc3ZTU4ZmViNTIwYTc0YWQ1MjhlOTEyMWY5ZTQ1NThiNGNmMzgwMTExNDNkMDk1ZA==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-audio_fre=96000.m3u8: Server returned 403 Forbidden (access denied)

ERROR: ffmpeg exited with code 1

As end-user it is surprinsing to have different results for the same url by only changing the output. The code for the “-o -” option does not work as well as for the file output.

!!! NB : I use the site without account. So I can’t play the videos in my browser. But it works with yt-dlp ! The question is why not with “-o -” !!!

It is probably the same with all videos here : https://www.france.tv/sport/

Verbose log

bash-5.1$ ./yt-dlp https://www.france.tv/sport/les-jeux-olympiques/3103093-big-air-f-le-podium-de-tess-ledeux-medaillee-d-argent-a-20-ans.html -o - -vU
[debug] Command-line config: ['https://www.france.tv/sport/les-jeux-olympiques/3103093-big-air-f-le-podium-de-tess-ledeux-medaillee-d-argent-a-20-ans.html', '-o', '-', '-vU']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.02.04 [c1653e9ef] (zip)
[debug] Python version 3.9.10 (CPython 64bit) - Linux-5.16.3-x86_64-Intel-R-_Core-TM-_i3-6100H_CPU_@_2.70GHz-with-glibc2.33
[debug] exe versions: ffmpeg 4.4.1 (setts), ffprobe 4.4.1
[debug] Optional libraries: sqlite
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [FranceTVSite] Extracting URL: https://www.france.tv/sport/les-jeux-olympiques/3103093-big-air-f-le-podium-de-tess-ledeux-medaillee-d-argent-a-20-ans.html
[FranceTVSite] 3103093-big-air-f-le-podium-de-tess-ledeux-medaillee-d-argent-a-20-ans: Downloading webpage
[debug] [FranceTV] Extracting URL: francetv:908f0d00-fce6-4895-9d33-4a44ccaf4fd3
[FranceTV] 908f0d00-fce6-4895-9d33-4a44ccaf4fd3: Downloading desktop video JSON
[FranceTV] 908f0d00-fce6-4895-9d33-4a44ccaf4fd3: Downloading mobile video JSON
[FranceTV] 908f0d00-fce6-4895-9d33-4a44ccaf4fd3: Downloading signed hls manifest URL
[FranceTV] 908f0d00-fce6-4895-9d33-4a44ccaf4fd3: Downloading m3u8 information
[FranceTV] 908f0d00-fce6-4895-9d33-4a44ccaf4fd3: Downloading signed hls manifest URL
[FranceTV] 908f0d00-fce6-4895-9d33-4a44ccaf4fd3: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: best/bestvideo+bestaudio
[info] 908f0d00-fce6-4895-9d33-4a44ccaf4fd3: Downloading 1 format(s): hls-2217-1+hls-audio-aacl-96-Audio_Français-1
[debug] Invoking downloader on "https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzU0Nzh+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NzllMDE5YWQyMWEwZmIxN2UzMTA3ZTljNTZhYTZiNzc2ZjMxYTcxMTc4N2I2YzA2N2UxN2E3OWE4YTA5YjI5Yw==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-video=2000000.m3u8", "https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzU0Nzh+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NzllMDE5YWQyMWEwZmIxN2UzMTA3ZTljNTZhYTZiNzc2ZjMxYTcxMTc4N2I2YzA2N2UxN2E3OWE4YTA5YjI5Yw==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-audio_fre=96000.m3u8"
[download] Destination: -
[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.17 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Sec-Fetch-Mode: navigate
' -i https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzU0Nzh+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NzllMDE5YWQyMWEwZmIxN2UzMTA3ZTljNTZhYTZiNzc2ZjMxYTcxMTc4N2I2YzA2N2UxN2E3OWE4YTA5YjI5Yw==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-video=2000000.m3u8 -i https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzU0Nzh+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NzllMDE5YWQyMWEwZmIxN2UzMTA3ZTljNTZhYTZiNzc2ZjMxYTcxMTc4N2I2YzA2N2UxN2E3OWE4YTA5YjI5Yw==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-audio_fre=96000.m3u8 -c copy -map 0:0 -map 1:0 -f mpegts -
ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-4.4.1 --mandir=/usr/man --enable-gpl --enable-version3 --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libass --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librsvg --enable-libsmbclient --enable-libssh --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-postproc --enable-runtime-cpudetect --enable-sdl2 --enable-vaapi --enable-vdpau --enable-pthreads --enable-bzlib --enable-zlib --enable-shared --enable-static --disable-debug --enable-libbluray --enable-frei0r --enable-openal --enable-opencl --enable-libpulse --enable-libvidstab --enable-libwebp --enable-gnutls --arch=x86_64 --enable-pic --extra-cflags='-I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include -I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include/SDL2 -DRUNTIME_CPUDETECT' --extra-ldflags='-L/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/lib64 -lpthread -ldl -lssl -lcrypto -lz -lusb -ldrm' --pkg-config-flags=--static
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[tcp @ 0x1e69fc0] Starting connection attempt to 23.77.197.169 port 443
[tcp @ 0x1e69fc0] Successfully connected to 23.77.197.169 port 443
[hls @ 0x1e65900] Skip ('#EXT-X-VERSION:5')
[hls @ 0x1e65900] Skip ('## Created with Unified Streaming Platform(version=1.8.3)')
[hls @ 0x1e65900] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0x1e65900] Skip ('#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z')
[hls @ 0x1e65900] HLS request for url 'https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzU0Nzh+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NzllMDE5YWQyMWEwZmIxN2UzMTA3ZTljNTZhYTZiNzc2ZjMxYTcxMTc4N2I2YzA2N2UxN2E3OWE4YTA5YjI5Yw==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-video=2000000-1.ts', offset 0, playlist 0
[hls @ 0x1e65900] Opening 'https://cloudingest.ftven.fr/keys/bfd3.key' for reading
[tcp @ 0x1e78600] Starting connection attempt to 23.77.197.169 port 443
[tcp @ 0x1e78600] Successfully connected to 23.77.197.169 port 443
[AVIOContext @ 0x1e84280] Statistics: 16 bytes read, 0 seeks
[hls @ 0x1e65900] Opening 'crypto+https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzU0Nzh+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NzllMDE5YWQyMWEwZmIxN2UzMTA3ZTljNTZhYTZiNzc2ZjMxYTcxMTc4N2I2YzA2N2UxN2E3OWE4YTA5YjI5Yw==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-video=2000000-1.ts' for reading
[tcp @ 0x1e7b4c0] Starting connection attempt to 23.77.197.169 port 443
[tcp @ 0x1e7b4c0] Successfully connected to 23.77.197.169 port 443
[h264 @ 0x2253d80] Reinit context to 1280x720, pix_fmt: yuv420p
[hls @ 0x1e65900] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
Input #0, hls, from 'https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzU0Nzh+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NzllMDE5YWQyMWEwZmIxN2UzMTA3ZTljNTZhYTZiNzc2ZjMxYTcxMTc4N2I2YzA2N2UxN2E3OWE4YTA5YjI5Yw==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-video=2000000.m3u8':
  Duration: 00:00:33.88, start: 10.000000, bitrate: 0 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
  Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 0
[tcp @ 0x2250100] Starting connection attempt to 23.77.197.169 port 443
[tcp @ 0x2250100] Successfully connected to 23.77.197.169 port 443
[https @ 0x29a0dc0] HTTP error 403 Forbidden
https://cloudingest.ftven.fr/380e682b62026/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA.ism/ZXhwPTE2NDQzNzU0Nzh+YWNsPSUyZjM4MGU2ODJiNjIwMjYlMmY5MDhmMGQwMC1mY2U2LTQ4OTUtOWQzMy00YTQ0Y2NhZjRmZDNfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9NzllMDE5YWQyMWEwZmIxN2UzMTA3ZTljNTZhYTZiNzc2ZjMxYTcxMTc4N2I2YzA2N2UxN2E3OWE4YTA5YjI5Yw==/908f0d00-fce6-4895-9d33-4a44ccaf4fd3_france-domtom_TA-audio_fre=96000.m3u8: Server returned 403 Forbidden (access denied)
[AVIOContext @ 0x24874c0] Statistics: 1280544 bytes read, 0 seeks
[AVIOContext @ 0x1e7a580] Statistics: 799 bytes read, 0 seeks


ERROR: ffmpeg exited with code 1
  File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/__main__.py", line 19, in <module>
    yt_dlp.main()
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/__init__.py", line 857, in main
    _real_main(argv)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/__init__.py", line 847, in _real_main
    retcode = ydl.download(all_urls)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 3212, in download
    self.__download_wrapper(self.extract_info)(
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 3185, in wrapper
    res = func(*args, **kwargs)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 1372, in extract_info
    return self.__extract_info(url, self.get_info_extractor(ie_key), download, extra_info, process)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 1381, in wrapper
    return func(self, *args, **kwargs)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 1465, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 1536, in process_ie_result
    return self.extract_info(
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 1372, in extract_info
    return self.__extract_info(url, self.get_info_extractor(ie_key), download, extra_info, process)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 1381, in wrapper
    return func(self, *args, **kwargs)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 1465, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 1517, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 2607, in process_video_result
    self.process_info(new_info)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 3035, in process_info
    success, real_download = self.dl(temp_filename, info_dict)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 2801, in dl
    return fd.download(name, new_info, subtitle)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/downloader/common.py", line 440, in download
    ret = self.real_download(filename, info_dict)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/downloader/external.py", line 68, in real_download
    self.report_error('%s exited with code %d' % (
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/downloader/common.py", line 177, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 930, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "/LinuxData/Softs/Youtube/Yt/./yt-dlp/yt_dlp/YoutubeDL.py", line 860, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
pukkandancommented, Apr 24, 2022

youtube-dl never had the ability to stream separate video+audio to stdout. I had added the ability to do this in yt-dlp by passing both URLs to ffmpeg at once like ffmpeg -i URL1 -i URL2 ... (which is reverted by this compat option)

When downloading the 2 streams at once for this website, ffmpeg seems to mess up the UA. I am not sure about the exact reason. Could you try opening an issue on ffmpeg?

0reactions
elyse0commented, Apr 27, 2022

I have found the issue 🐞

The problem is that we are being redirected to another url when we get our manifest.mpd, but we still use the original url instead of the redirected.

image

Opening PR (:

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is a 403 Forbidden Error (and How Can I Fix It)?
A 403 Forbidden Error occurs when you do not have permission to access a web page or something else on a web server....
Read more >
403 Forbidden error: What it is and how to fix it - Allconnect.com
A 403 error is an HTTP status code that means “access denied.” If you ever had a treehouse as a kid, you may...
Read more >
What Does a 403 Forbidden Error Mean? How Do You Fix It?
The 403 Forbidden error is an HTTP status code that means that access to the page or resource you were trying to reach...
Read more >
How to Fix a 403 Forbidden Error on Your WordPress Site
The 403 Forbidden error means that your server is working, but you no longer have permission to view all or some of your...
Read more >
403 Forbidden - HTTP - MDN Web Docs - Mozilla
The HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found